An example of getting started with 11ty in Termux

The first thing I did was watch some youtubes on static site generators and then I decided on one. I chose 11ty because it popular now and it is highly configurable with minimal opinions.

I followed the instructuons from the Getting started guide


You must use the Termux builtin storage and not shared Android storage because 11ty node install uses symlinks. Let me know if there is a way to circumvent this. It would be nice to use my android editor apps instead of vim.

I removed index.html
I removed README.md

Created this file structure


I used python to create my poems.json file from a poem.dat file that was exported from Google Keep and @ prefixed to each title

Make sure the field used for pagination is unique. I had 3 duplicates that I manually fixed but I will change my python code to include index in the json.

The two main things I learnt was creating pagination in nunjucks and looping through the json data in nunjucks to create a listing of links to my pagination.

I would like to use AI to interpret the best color to use for the poem and make that the text color with a contrasting background color. An example prompt:

this is the json file


I need forecolor and bgcolor added between title and lines. Colors will be chosen by you based on text in title and lines. These are poems.

To push to github I followed the instructions from here


This is the resulting website


The next thing to do is create a build script that changes the base_url to localhost or github pages depending on if I specify dev or prod. Share your questions, comments and experiences with us in the comments below.

Comments

Popular posts from this blog

Who makes the best cheesecake?

My notes from the book "Sick to fit"

Book Review - Outliers

Prayers

What comes after technology?