-
Notifications
You must be signed in to change notification settings - Fork 1
Jekyll plugin to publish a Geminispace capsule
License
jebw/jekyll-gemini
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
# 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
About
Jekyll plugin to publish a Geminispace capsule
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published