| name | blog-tools |
| description | A collection of helpers to build the blog. |
Building the blog with automatic-restarts on changes
This app uses a combination of Gradle (to build the Ktor web archive), and a set of tools to build the actual static HTML for the blog posts.
Building static content
cd src/main/tools
fnm use
npm run-script build
npm run-script watch
Running Ktor with automatic restart
Use 2 Terminal windows to do the following:
- Run the server
./gradlew run
- Automatically restart Ktor when content changes
./gradlew -t build
Stopping
./gradlew --stop
Adding a new blog entry
- In
src/main/resources/blog/md add a new markdown file for the blog entry. The filename should be in the format title.md where title is _ separated and in lower case.
- Add an entry in the
"posts" array in src/main/resources/blog/md/manifest.json to include the new file in the build process. The entry should have the format:
{
"title": "Title of the blog entry",
"path": "title.md"
}
- The content of the markdown file should include the current date, and day with the following format:
Month Date Day, Year
For example:
October 10 Thursday, 2026
- Add an entry for the blog in
src/main/resources/blog/md/toc.md. The format should look like this:
* [Title of the blog entry](/blog/title_of_blog_entry.html)
Make sure to add this link under the right year (based on the current date).
Deploying to Google App Engine
Make sure you do the following:
cd src/main/tools && npm run-script build && cd -
./gradlew appengineStage
cd build/staged-app && gcloud app deploy && cd -