hello-markdown
Server-side markdown renderer, using hello-webpage
π€·ββοΈ How does it work?
hello-webpage templates use something called lws (local web server) to serve static files (e.g. stylesheets, html files, javascript files, images, basically anything that does not need to be rendered by a server). lws also allows you to configure the webserver (like setting up a username/password, setting up logs, etc) using a javascript file. The way you can config lws to fit your needs. You can also βtrickβ lws into running code that is not configuration (like rendering markdown, getting posts from GhostCMS, etc)
β How does it render markdown/save it?
markdown-it renders the markdown and fs (file system) saves it.
π¨ What stylesheet does this use?
β±οΈ Can I use this to keep my app on 24/7?
No. As wh0 pointed out, Glitch will initially use lws to serve the files, then move it to S3 (apparently) which is why some static sites go to sleep.
π» How do I get started?
- Remix this project
- Make some pages (markdown is obviously supported, they must end with .md). If you make a page called
contact.md
, the path would be/contact
. - Run
refresh
. You have to runrefresh
to refresh lws because since hello-webpage is a static site, Glitch does monitor/reload lws.
π©βπ¨ How do I customize the layout?
The layout is stored in layout.html
. The main content can be access by using the keyword: {{ content }}
(sort of like nunjucks)
π Examples
π NEW! Blogging feature.
Place your posts in the posts
folder with the following format:
[YYYY]-[MM]-[DD]-[TITLE].md
Your post archive can be found at /posts
. Example