shard-kemal/docs/statics.md

32 lines
457 B
Markdown
Raw Normal View History

2015-12-04 11:45:35 +00:00
# Statics
Add your files to `public` directory and Kemal will serve these files immediately.
```
app/
src/
2015-12-07 20:03:35 +00:00
your_app.cr
2015-12-04 11:45:35 +00:00
public/
js/
jquery.js
2015-12-07 20:03:35 +00:00
your_app.js
2015-12-04 11:45:35 +00:00
css/
2015-12-07 20:03:35 +00:00
your_app.css
2015-12-04 11:45:35 +00:00
index.html
```
Open index.html and add
```html
<html>
<head>
<script src="/js/jquery.js"></script>
2015-12-07 20:03:35 +00:00
<script src="/js/your_app.js"></script>
<link rel="stylesheet" href="/css/your_app.css"/>
2015-12-04 11:45:35 +00:00
</head>
<body>
...
</body>
</html>
```