💾 Archived View for sergio-101.mywire.org › posts › using-gssg-to-build-site.gmi captured on 2022-06-03 at 22:51:25. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
" mmm mmmm mmm mmm mmm m mm mmmm mmm mmm # m" "m # # " #" # #" " #" "# # #" "# # # m # # """m #"""" # # # # # # """ # # # # "mmm" "#mm" # "#m"# mm#mm "#m#" mm#mm #mm# mm#mm m # ""
Last updated: 2022-05-09
As soon as I got a few pages set up in my Gemini capsule, I realized that what I was building was a blog. This presented a few other issues. How do I go about setting up a feed? How can I automate this? Can I make templates?
I started to think about how to go about this and quickly found that someone else had already set up such a tool, called gssg.
Check the link below for more in-depth information on the technical bits, but the human language bits go like this:
- You set up your templates. There are three templates included, one for posts, one for the home page, and one for your atom feed.
- You put anything you want to be presented as a blog in the "posts" directory.
- You set up your templates. You don't have to do this. All I did was put an ASCII art header on all my pages. I also put a link back to my home page (see "Some problems" section on this page).
Once you have set up the above (and your config file), you can run "gssg" at any time to recreate your site. This will do the following:
- Format all of your pages with the appropriate page template.
- Create an atom feed "atom.xml" for your site with all current gemlog entries.
- Update your home page to reflect links to all blog pages.
This should save users a ton of time and errors. It will also allow you to update your site at will.
The documentation says I can use Config.URL to insert the main url in my page, but I got an error when trying this. For now, I just hardcoded it.
In case you run into trouble installing
On automating a gemini capsule with gssg was published on 2022-05-09