This is the repo for generating PR podcast website. In essence, this is a simple static site generator with no dependencies.
- Make sure you have
nodeinstalled - No need to runnpm install - Build your website:
./build.sh servebuild, serve and watch the repo./build.sh testto run the tests./build.shto generate the website indocsdirectory
All the contents for the website are int site directory:
content: Markdown files for postsstatic: Static files, which can have templateslayout: Layouts that can be reused in posts and pagesinclude: Partial HTML files that can be included in other HTML files
We have our own template engine. Rules are simple:
- You can write JS code in lines starting with
%:% let name = 5 - Literal templates (
${}) are evaluated as JS values:<p> Hello ${ name }</p> - Special commands are:
% includewill add the HTML file fromincludedirectory.
- In every page you have access to all the values defined
config.jsonfile, e.g.${ site.title }
All the files in static directory are pages. They have access to:
posts: List containing all the posts data
Posts are in site/content directory and their file name should in this format: YYYY-MM-DD-title.md. Every post has access to:
post: Collection of the post data defined in FrontMattercontent: Post contenturl: Post relative URL from base URLpublishDate: Post publish date, from file name
- Why the
docsdirectory is included in the repo? I tried to build thedocson CloudFlare and then serve the directory. For some reason it didn't work (Couldn't find the pages). I also tried the same thing on Netlify and again, the same problem.
- Update links in header and footer
- Deploy with Github actions
-
formspreein configs - Add Tailwind
- Rename
staticdir - Pages are there too - Remove TS please
- Add proper Markdown support for posts
- All data defined in Front-Matter should be accessible in the template
- Make transformations faster
- Parse lists in Front-Matter
- Install
servelocally - Remove
.posts_cache.jsonfrom root directory