This repository contains the source files for the website half-stack.dev.
Currently nothing more than a static blog generator:
- Use marked to compile markdown files
- Use Lit to build web components
- Use esbuild as transpiler and bundler
- Minimal templating with template-html
- Use Workbox for service worker caching
- And the good old gulp to build the whole thing
This will be my blog mainly for web development topics written in English.
Posts are content sorted by date, think of blog posts.
Say you want to write a post named "Foo Bar":
- Create a folder
foo-bar
undercontent/posts
- Folder name should be lower case with minus sign, it will be part of the URL. E.g.
content/posts/foo-bar
. The URL would then beexample.dev/posts/foo-bar
- Under that folder, create a markdown file, its name MUST be
YYYY-MM-DD_index.md
, where YYYY-MM-DD is the date you'd like the post to be shown as published. E.g.2021-07-30_index.md
. This date is important for display order on homepage - All related assets, like images, downloadable files etc., should also be put into the folder
Pages are just pages, think of "about", "contact" sections of a website.
For an "About" page:
- Create a folder
about
undercontent/pages
- Folder naming is the same as for posts, e.g.
content/pages/about
. The URL would then beexample.dev/pages/about
- Under that folder, create a markdonw file, its name MUST be
index.md
Run npm build
.
The build output files are stored in the public
folder, set this folder for yout static site hosting service.
TODO