💾 Archived View for gemi.dev › gemini-mailing-list › 000072.gmi captured on 2023-11-04 at 12:23:29. Gemini links have been rewritten to link to archived content

View Raw

More Information

➡️ Next capture (2023-12-28)

-=-=-=-=-=-=-

Creating a Gemini site from an (advanced) Jekyll site

Travis Briggs <audiodude (a) gmail.com>

Hello,

Thanks for the warm welcome in the other thread, solderpunk! I'm not sure
if I read about Gemini on HN, but probably around the same time, being on
tilde.club and other tildes.

I just wanted to share some of the work I did to create the content for
gemini://gem.bestalbumsintheuniverse.com.

This site has existed for a number of years now, and probably isn't updated
as much as it should be (like all blogs of course). My intuition was
confirmed by solderpunk's call to content in the other thread, that
Geminispace needs content that isn't about Gemini. So I thought I'd re-work
my album listings as .gmi files.

You can see the whole source of the website here:
https://github.com/audiodude/best-albums

Currently I am running Jetforce, since I am primarily a Javascript and
Python developer, though I have done Ruby as you can see in the repo linked
above.

The basic layout of the site is that it is a Jekyll site, but it uses
advanced features of Jekyll to create an albums.json file, which is then
dynamically loaded by the Javascript of the frontend of the website. For
the Gemini version, I decided to use Pandoc (https://pandoc.org/) to
convert from my markdown files into what is essentially plain text, but
with a custom template for putting a header hash and the like. Pandoc was
really convenient for this because it automatically reads YAML
"frontmatter" in Markdown files and makes them available in templates.

I then wrote a simple script to take the albums.json file and generate an
overall index.gmi file for the site (write_gemini_index.rb). Finally there
is a Makefile that ties it all together and generates best-albums.tgz,
which I then scp to the gemini host and copy to /var/gemini.

While I think a general purpose Jekyll -> Gemini converter would be useful
for people, I don't have any desire to attempt such a project based on 1)
not wanting to use Ruby and 2) the fact that Jekyll isn't particularly
extensible. I wonder if there is a project to be created adding plugins for
some other popular static site generator (Hugo? Gatsby?) to output Gemini
content.

Cheers,
-Travis

Link to individual message.

Jason McBrayer <jmcbray (a) carcosa.net>


Travis Briggs writes:

> I wonder if there is a project to be created adding plugins for some
> other popular static site generator (Hugo? Gatsby?) to output Gemini
> content.

I have written an output format for Hugo to build Gopher sites, and I
could pretty easily retool it to build Gemini sites. It doesn't convert
from Markdown, but just builds all of the index/list pages as
gophermaps.

The writeup is here:
gopher://jfm.carcosa.net:70/0/blog/computing/hugo-gopher.txt



--
+-----------------------------------------------------------+
| Jason F. McBrayer                    jmcbray at carcosa.net  |
| If someone conquers a thousand times a thousand others in |
| battle, and someone else conquers himself, the latter one |
| is the greatest of all conquerors.  --- The Dhammapada    |

Link to individual message.

---

Previous Thread: Welcome, newcomers!

Next Thread: New Twin, Mobile?