🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

jekyll-gemini

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jekyll-gemini

0.1.0
Rubygems
Version published
Maintainers
1
Created
Source

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

# Gemfile

gem 'jekyll-gemini'

Then install the gems,

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 -:

# {{ 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)

---
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 %}

=> https://gemini.circumlunar.space/docs/gemtext.gmi Gemtext docs => https://gemini.circumlunar.space/ About Gemini

To do

  • Add RSS/Atom generation - this seems common in Geminispace, currently generators are just disabled when building the Capsule
  • Add specs

Problems

Please raise an issue on GitHub - https://github.com/jebw/jekyll-gemini/issues

FAQs

Package last updated on 28 Dec 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts