Skip to main content

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

Kickstarter for Trinidad

It is Saturday before Christmas and the beginning of the long weekend. The place where I live is extremely quiet. There are hardly any cars on the road. I ate my breakfast and I am surfing the web. Then I came across Kickstarter and I started asking questions. Mainly, can Trinidadians use Kickstarter? Are Trinidadians using Kickstarter? Do we need a Kickstarter type website for Trinidad and Tobago/Caribbean? There is fundmetnt but the idea is not the same. Kickstarter is for creatives and you are creating a tangible deliverable that is shared with backers. Also there is a vetting process. Fundmetnt is more akin to gofundme. I went to the Kickstarter website and I filtered by Trinidad and Tobago and only 17 projects were returned and many of them dated. This is not much. I contacted @kickstarter on Twitter and asked them "Hi. Can Trinidadians 🇹🇹 use Kickstarter? Will they be able to get the funds to their local bank?". I will also send an email. I will also send an email to ...

Google Pay in Trinidad

Update : It is prepaid and credit cards not debit. Linx on facebook said that the Linx machines do not fascilitate Google Pay.

Stop and stare at the crotons

It is 147pm. I just woke up from a nap. I had Sunday lunch which was chicken soup. My mobile phone does not have much charge left. I decided to write. What can I write about? I asked my mom what to write about. She said to write about flowers plants. She wants flowers in the yard. Flowers are beautiful. Flowers are attractive. Flowers are calming. Flowers are part of God's creation. I am reminded of the saying that we should stop and smell the roses. We should appreciate the now. Learn from the past, plan for the future but live in the now. I asked my mom why she likes flowers? She says it is therapy for the mind, it helps her to elevate her spirits and it makes the place look beautiful. That is flower power I would say. My favorite plant is the croton. I love passing through the countryside, especially in Tobago, and seeing the rich croton plants. Crotons are flowers-like I would say. Let us say they are pseudo flowers plants because of the mixture of colors on the leaves that see...