# Jekyll Gemini Plugin for Jekyll to allow publishing to both the Web and Geminispace from a single set of sources. This relies on the source files using Gemtext instead of Markdown, which are converted automatically via the Jekyll-Gemtext. Any Gemtext files will be converted to HTML in _site via the usual jekyll build command. A _capsule folder can also be generated by running jekyll gemini - only Static files and Gemtext source files are included - markdown Pages and Documents are ignored. The built _capsule folder can then be uploaded to a Geminispace hosting service. NOTE: This is the first release and very much still Alpha at the moment ## Installation Add the gem to your Gemfile ```ruby # Gemfile gem 'jekyll-gemini' ``` Then install the gems, ```bash bundle install ``` ## Layouts Next you need to add layouts for the Gemini capsule - these go in a _gemini_layouts folder, and need to be Gemtext equivalents of the HTML layouts you will already have, eg using liquid to embed content within the Gemtext layouts. These use liquid tags the same as html layouts but are likely to be very simple, eg, _gemini_layouts/default.gmi might be -: ```gemtext # {{ site.title }} {{ content }} ``` ## Pages Jekyll relies on HTML files with liquid tags embedded within to generate the index pages. There are two ways to extend this ### Option 1 - use Gemtext for index pages If your requirements are simple you may be able to convert your index.html to index.gmi and use the same page for both Website and Capsule ### Option 2 - separate index pages for Website and Capsule If you need to make fuller use of HTML features in your index.html, you can keep your existing index.html - this will be ignore when building the Geminispace capsule. You will need to add an index.gmi, but mark this to target just the Capsule (otherwise you'll end up with both index.html and index.gmi included in your website) ```gemtext --- layout: default target: capsule --- {% for post in site.posts limit:1 %} # {{ post.title }} {{ post.date | date: "%b %-d, %Y" }}{% if post.author %} • {{ post.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %} {{ post.content }} {% endfor %} {% for post in site.posts offset:1 %} => {{ post.url }} {{ post.title }} ## {{ post.title }} {{ post.date | date: "%b %-d, %Y" }}{% if post.author %} • {{ post.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %} {{ post.excerpt }} => {{ post.url }} Read More {% endfor %} ``` ## Links => https://gemini.circumlunar.space/docs/gemtext.gmi Gemtext docs => https://gemini.circumlunar.space/ About Gemini ## To do 1. Add RSS/Atom generation - this seems common in Geminispace, currently generators are just disabled when building the Capsule 2. Add specs ## Problems Please raise an issue on GitHub - https://github.com/jebw/jekyll-gemini/issues
Project
jekyll-gemini
Plugin for Jekyll to publish your Jekyll site to both the Web and
Geminispace from the same set of source Pages and Posts
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
Development
Dependencies
Development
~> 2.2
~> 11.1
~> 13.0
~> 3.10
~> 1.23
~> 0.6
~> 2.6
~> 0.21
~> 0.9.26
Runtime
>= 3.7, < 5.0
~> 0.1
Project Readme