A Jekyll theme for open-source software and specification projects
Prexian is a powerful Jekyll theme designed to help organizations and individuals present open-source software and specifications in a navigable and elegant way. It supports both individual project sites and hub sites that aggregate multiple projects.
- Two Site Types: Create individual project sites or hub sites that aggregate multiple projects
- Smart Content Management: Automatically fetch and display software documentation, specifications, and project metadata from Git repositories
- Performance Optimized: Intelligent caching system with shallow clones and sparse checkout
- Modern Design: Clean, responsive design with customizable styling
- SEO Ready: Built-in SEO optimization with jekyll-seo-tag integration
- Blog Support: Full-featured blogging with author profiles and social links
- Search Integration: Optional Algolia search support
- AsciiDoc Support: First-class support for AsciiDoc content authoring
Add this line to your Jekyll site's Gemfile
:
gem "prexian"
And then execute:
$ bundle install
Or install it yourself as:
$ gem install prexian
-
Create a new Jekyll site:
jekyll new my-project-site cd my-project-site
-
Add Prexian to your Gemfile:
gem "prexian"
-
Configure your site in
_config.yml
:theme: prexian plugins: - prexian prexian: title: My Project description: An awesome open-source project tagline: Making the world a better place site_type: project # or 'hub'
-
Build and serve:
bundle exec jekyll serve
Every Prexian site must have these minimum configuration settings in _config.yml
:
# Basic Jekyll configuration
title: Your Site Title
description: Your site description
# Theme configuration
theme: prexian
plugins:
- prexian
# Prexian configuration (required)
prexian:
site_type: project # or 'hub' - REQUIRED
title: Your Project Title
description: Your project description
# Collections (required for content types you want to use)
collections:
software:
output: true
permalink: /software/:path/
specs:
output: true
permalink: /specs/:path/
posts:
output: true
permalink: /blog/:year-:month-:day-:title/
# For hub sites only:
projects:
output: false
# Defaults (required)
defaults:
- scope:
path: ""
values:
layout: default
- scope:
path: _posts
type: posts
values:
layout: post
- scope:
path: _software
type: software
values:
layout: product
- scope:
path: _specs
type: specs
values:
layout: spec
_config.yml
- Site configuration (see above)index.md
- Homepage content:--- layout: home --- Your homepage content here...
If your project site has a parent hub, add this to _config.yml
:
prexian:
hub:
git_repo_url: https://github.com/your-org/hub-site
git_repo_branch: main # optional, defaults to 'main'
home_url: https://your-hub-site.com/
assets/img/symbol.svg
- Your site's logo (SVG format recommended) inserted at the footertitle.html
- Your site's title (HTML format recommended) to be included in the footer
Without these two files the rendering of a project site will crash.
TODO: Fix this problem by detecting and skipping.
- a
_projects
directory with project definitions:
# _projects/my-project.md
---
title: My Project
description: Brief project description
site:
git_repo_url: https://github.com/your-org/my-project-site
git_repo_branch: main
home_url: https://your-org.github.io/my-project/
---
Detailed project description...
assets/favicon.png
- Site favicon
assets/css/style.scss
- Custom styles:--- --- ... @import "prexian"; @import "prexian/custom-styles"; // Your custom styles here
_pages/
- Static pages (about, contact, etc.)_posts/
- Blog posts_software/
- Software components_specs/
- Specifications
my-project-site/
βββ _config.yml # Required: Site configuration
βββ index.md # Required: Homepage
βββ Gemfile # Required: Dependencies
βββ title.html # Required (for hub): Title file
βββ assets/
β βββ symbol.svg # Required (for hub): Site logo
β βββ css/
β βββ style.scss # Optional: Custom styles
βββ _pages/ # Optional: Static pages
β βββ about.md
β βββ contact.md
βββ _posts/ # Optional: Blog posts
β βββ 2024-01-01-welcome.md
βββ _software/ # Optional: Software components
β βββ my-tool.md
βββ _specs/ # Optional: Specifications
βββ my-spec.md
This is the absolute minimum needed to get a Prexian site running. You can then add content and customize as needed.
Prexian supports two distinct types of sites, each with specific purposes and capabilities:
A project site describes one individual project and can contain:
- Software components: Individual software products with their documentation
- Specifications: Technical specifications and standards
- Blog posts: Project-specific announcements and articles
- Documentation: Project-wide documentation and guides
- Pages: Static pages for additional content
Project sites are designed to be comprehensive resources for a single project, providing everything users need to understand, use, and contribute to the project.
# _config.yml for project site
prexian:
site_type: project
hub:
git_repo_url: https://github.com/your-org/hub-site
git_repo_branch: main
home_url: https://your-org.github.io/
A hub site aggregates multiple project sites into a unified portal. Hub sites can contain:
- Projects collection: Links to individual project sites
- Aggregated software: Software from all projects in the hub
- Aggregated specifications: Specifications from all projects
- Hub-wide blog: Organization-level announcements and articles
- All project site components: Hub sites can also have their own software, specs, and content
Hub sites serve as the central entry point for organizations with multiple related projects, providing a unified view of all activities and resources.
# _config.yml for hub site
prexian:
site_type: hub
collections:
projects:
output: false
Projects are defined in the _projects
collection. Each project points to a separate Prexian project site:
# _projects/my-project.md
---
title: My Awesome Project
description: A sentence or two about what the project is for.
tagline: Because awesomeness is underrated
featured: true # Include in featured projects on hub home page
site:
git_repo_url: https://github.com/your-org/my-project-site
git_repo_branch: main
home_url: https://your-org.github.io/my-project/
tags: [awesome, project, open-source]
---
Detailed description of the project goes here...
Software components are defined in the _software
collection:
# _software/my-tool.md
---
title: My Development Tool
description: A powerful tool for developers
repo_url: https://github.com/your-org/my-tool
repo_branch: main # Optional, defaults to site's default_repo_branch
# Optional: Separate documentation repository
docs:
git_repo_url: https://github.com/your-org/my-tool-docs
git_repo_subtree: docs
git_repo_branch: main
tags: [Ruby, CLI, Developer Tools]
external_links:
- url: https://github.com/your-org/my-tool
- url: https://rubydoc.info/gems/my-tool
title: "API Documentation"
feature_with_priority: 1 # Featured on home page
---
Your software description goes here...
Software Logo: Place an SVG logo at _software/my-tool/assets/img/symbol.svg
Specifications are defined in the _specs
collection:
# _specs/my-spec.md
---
title: My Technical Specification
description: A comprehensive specification for X protocol
tags: [RFC, Standard, Protocol]
external_links:
- url: https://tools.ietf.org/html/rfc1234
title: "RFC 1234"
# Optional: Build specification from source
spec_source:
git_repo_url: https://github.com/your-org/spec-repo
git_repo_subtree: specification
git_repo_branch: main
build:
engine: png_diagram_page
options:
format: png
# Optional: Custom navigation for built specs
navigation:
sections:
- name: "Diagrams"
items:
- title: "Overview Diagram"
path: "overview"
description: "System overview"
---
Your specification description goes here...
You can extend Prexian with custom collections:
-
Define the collection in
_config.yml
:collections: advisories: output: true permalink: /advisories/:path/ defaults: - scope: path: _advisories type: advisories values: layout: advisory # Create this layout
-
Create content in
_advisories/
:# _advisories/security-advisory-001.md --- title: Security Advisory 001 severity: high date: 2024-01-15 affected_versions: ["< 2.1.0"] tags: [security, vulnerability] --- Description of the security issue...
-
Create an index page in
_pages/advisories.html
:--- title: Security Advisories layout: advisory-index # Create this layout hero_include: index-page-hero.html ---
Add a hero section to any page by specifying hero_include
in the frontmatter:
---
title: My Page
hero_include: index-page-hero.html
---
For project sites, you can add a custom introduction section:
-
Enable it in
_config.yml
:prexian: landing_priority: - custom_intro - software - specs - blog
-
Create the include file
custom-intro.html
:<section class="custom-intro"> <div class="summary"> <h2>Welcome to {{ site.title }}</h2> <p>{{ site.description }}</p> </div> <div class="call-to-action"> <a href="/getting-started" class="btn btn-primary">Get Started</a> <a href="/documentation" class="btn btn-secondary">Documentation</a> </div> </section>
Tag namespaces help organize and categorize content with semantic meaning:
# _config.yml
tag_namespaces:
software:
writtenin: "Written in" # Programming languages
bindingsfor: "Bindings for" # Language bindings
user: "Target user" # Target audience
interface: "Interface" # UI type (CLI, GUI, API)
specs:
audience: "Audience" # Who the spec is for
completion_status: "Status" # Draft, Final, etc.
domain: "Domain" # Technical domain
Use namespaced tags in your content:
tags: [writtenin:Ruby, user:Developer, interface:CLI, audience:Technical]
Collections define the types of content your site can contain:
# _config.yml
collections:
# Core Prexian collections
software:
output: true
permalink: /software/:path/
specs:
output: true
permalink: /specs/:path/
posts:
output: true
permalink: /blog/:year-:month-:day-:title/
# Hub sites only
projects:
output: false
# Custom collections
advisories:
output: true
permalink: /advisories/:path/
tutorials:
output: true
permalink: /tutorials/:path/
Prexian supports Jekyll's data collections for structured content. Create YAML files in _data/
:
# _data/team.yml
- name: John Doe
role: Lead Developer
github: johndoe
- name: Jane Smith
role: Technical Writer
github: janesmith
Use in templates:
{% for member in site.data.team %}
<div class="team-member">
<h3>{{ member.name }}</h3>
<p>{{ member.role }}</p>
</div>
{% endfor %}
# _config.yml
title: Your Project Name
description: A brief description of your project
url: https://your-project.github.io
prexian:
title: Your Project Name
description: A brief description of your project
tagline: Your project's tagline
site_type: project # 'project' or 'hub'
author: "Your Organization"
authors:
- name: Your Name
email: [email protected]
social:
links:
- https://github.com/your-org
- https://twitter.com/your-org
github_repo_url: https://github.com/your-org/your-project
default_repo_branch: main # Default branch for all repositories
All Git repository references support branch/version specification:
# For parent hub
prexian:
hub:
git_repo_url: https://github.com/your-org/hub-site
git_repo_branch: main # or version tag like 'v1.2.3'
# For software documentation
# _software/my-tool.md
docs:
git_repo_url: https://github.com/your-org/my-tool-docs
git_repo_branch: main # or 'develop', 'v2.0', etc.
# For specifications
# _specs/my-spec.md
spec_source:
git_repo_url: https://github.com/your-org/spec-repo
git_repo_branch: main # or 'draft', 'v1.0', etc.
Prexian provides several internal services for developers:
Centralized configuration management with validation:
config = Prexian::Configuration.new(site.config)
config.site_type # => 'project' or 'hub'
config.hub_site? # => true/false
config.default_repo_branch # => 'main'
Repository operations with caching:
git_service = Prexian::GitService.new
result = git_service.shallow_checkout(repo_url, branch: 'main')
git_service.copy_cached_content(result[:local_path], destination)
Aggregates content from multiple project repositories for hub sites.
Handles individual project site content and parent hub integration.
For project sites with a parent hub, Prexian automatically:
- Fetches hub content from the parent hub repository
- Copies it to
_hub-site/hub/
in your project site - Adds it to include paths so you can reference hub assets
This allows project sites to:
- Use the hub's logo:
{% include hub/assets/img/symbol.svg %}
- Reference hub branding:
{% include hub/title.html %}
- Maintain consistent styling with the hub
The _hub-site
directory structure:
_hub-site/
βββ hub/
βββ assets/
β βββ symbol.svg
βββ title.html
βββ other-hub-includes.html
Create custom styles in assets/css/style.scss
:
---
---
@import "prexian/custom-variables";
@import "prexian";
@import "prexian/custom-styles";
// Your custom styles here
.custom-class {
color: #your-color;
}
Override theme layouts by creating files in _layouts/
and includes in your site root (not _includes/
):
title.html
- Custom site title/logocustom-intro.html
- Custom introduction sectionproject-nav.html
- Additional navigation links
- Format: SVG
- Size: Should look good at 30x30px and 60x60px
- Location:
assets/img/symbol.svg
- Requirements:
- No IDs in SVG markup (appears multiple times on page)
- Root
<svg>
element must haveviewBox
attribute - No
width
orheight
attributes on root element
Provide PNG renders as:
assets/favicon.png
assets/favicon-192x192.png
Use transparent background for PNG files.
Prexian includes command-line tools for cache management:
# Check version
bundle exec prexian version
# Clear cache
bundle exec prexian cache clear
# Show cache status
bundle exec prexian cache status
The Prexian site itself is a project site of the ribose.com hub site.
./script/build
./script/test
./script/server
Use the provided test scripts to verify your site works correctly:
# Test hub site functionality
./script/test-hub
# Build hub site for production
./script/build-hub
# Verify these elements are present:
# - Project software components from all projects
# - Project specifications from all projects
# - Project blog posts alongside hub posts
# - Proper navigation and layout
# Test project site functionality
./script/test-project
# Build project site for production
./script/build-project
# Verify these elements are present:
# - Parent hub logo/link in footer
# - Proper /specs/ page layout and content
# - All project-specific content (software, specs, blog)
# - Consistent styling with parent hub
Ensure your _config.yml
has the required settings:
# For project sites
prexian:
site_type: project
hub:
git_repo_url: https://github.com/your-org/hub-site
git_repo_branch: main
home_url: https://your-hub-site.com/
# For hub sites
prexian:
site_type: hub
collections:
projects:
output: false
Check that all Git repositories are accessible:
# Test hub repository access (for project sites)
git ls-remote https://github.com/your-org/hub-site
# Test project repository access (for hub sites)
git ls-remote https://github.com/your-org/project-site
If you're seeing stale content:
bundle exec prexian cache clear
bundle exec jekyll clean
Look for error messages during build:
bundle exec jekyll build --verbose
Check that content is being loaded correctly:
# For project sites, verify hub content is loaded
ls -la _hub-site/hub/
# For hub sites, verify project content is loaded
ls -la _project-sites/
Symptoms: Hub site builds successfully but doesn't display software, specifications, or blog posts from projects.
Check:
- Verify project definitions in
_projects/
directory - Ensure project repositories are accessible
- Check that project sites have the correct
site_type: project
configuration - Clear cache and rebuild:
bundle exec prexian cache clear && bundle exec jekyll build
Symptoms: Project site builds but missing parent hub logo, branding, or styling.
Check:
- Verify
hub
configuration in_config.yml
- Ensure hub repository is accessible
- Check that hub site has the correct
site_type: hub
configuration - Verify
_hub-site/hub/
directory is created during build
Symptoms: Specifications page loads but has incorrect styling or missing content.
Check:
- Verify specifications are defined in
_specs/
collection - Check that
specs
collection is configured in_config.yml
- Ensure specification files have correct frontmatter
- Verify
spec-index
layout is available
All paths for software, specifications, and projects should use relative paths from the repository root, not absolute filesystem paths.
Correct:
# _software/my-tool.md
docs:
git_repo_url: https://github.com/your-org/my-tool
git_repo_subtree: docs # Relative path within the repository
# _specs/my-spec.md
spec_source:
git_repo_url: https://github.com/your-org/spec-repo
git_repo_subtree: specification # Relative path within the repository
Incorrect:
# Don't use absolute paths
docs:
git_repo_subtree: /Users/username/projects/docs # β Absolute path
- Use
git_repo_branch
to pin to specific versions for stability - Use shallow clones (automatic) for faster builds
- Clear cache periodically:
bundle exec prexian cache clear
- Use
bundle exec jekyll serve --incremental
for faster development builds
When developing themes or debugging issues:
- Use test scripts:
./script/test-hub
or./script/test-project
- Check logs: Look for error messages in Jekyll build output
- Inspect generated files: Verify content is loaded in
_hub-site/
or_project-sites/
- Clear cache: Use
bundle exec prexian cache clear
when switching between configurations - Test incrementally: Make small changes and test frequently
When developing the Prexian theme itself, you cannot use the standard _config.yml
file because it gets inherited by user gems. Instead, use one of these methods:
# Build with theme development config
bundle exec jekyll build --config _config_theme-dev.yml
# Serve with theme development config
bundle exec jekyll serve --config _config_theme-dev.yml
# Build the example site
script/build
# Serve the example site
script/server
The _config_theme-dev.yml
file contains the proper configuration for testing the theme with example content, while _config.yml
is kept minimal for gem users.
_config.yml
: Minimal configuration inherited by gem users_config_theme-dev.yml
: Full development configuration with example contentscript/build
: Convenience script that uses the theme development configscript/server
: Development server script
After making changes to the theme:
-
Test the build:
script/build
-
Test the CLI tools:
bundle exec prexian version bundle exec prexian cache status
-
Run the test suite:
bundle exec rspec
-
Serve locally to verify:
script/server
Content is expected to be authored in AsciiDoc for full feature support:
---
title: My Documentation Page
layout: docs-base
---
:page-liquid:
= My Documentation
== Introduction
This is an AsciiDoc document with full Prexian support.
[source,ruby]
----
puts "Hello, World!"
----
By default, code listings have copy buttons. To disable for a specific listing:
[.nocopy]
[source,sh]
----
some command
----
---
layout: post
title: "Announcing Version 2.0"
date: 2024-01-15
authors:
- name: John Doe
email: [email protected]
use_picture: gravatar # 'gravatar', 'assets', 'no', or path
social_links:
- https://github.com/johndoe
- https://twitter.com/johndoe
excerpt: >-
We're excited to announce the release of version 2.0 with many new features.
card_image: /assets/blog/v2-announcement.png # Optional cover image
---
Your blog post content goes here...
If you're migrating from the old jekyll-theme-open-project
:
-
Update Gemfile:
# Remove old gems # gem "jekyll-theme-open-project" # gem "jekyll-theme-open-project-helpers" # Add new gem gem "prexian"
-
Update _config.yml:
# Remove old plugins plugins: - prexian # Replace all old plugins with this # Update site type configuration prexian: site_type: hub # instead of is_hub: true
-
Update SCSS imports:
// Old @import 'jekyll-theme-open-project'; // New @import 'prexian';
-
Update engine references:
# Old engine: png_diagrams # New engine: png_diagram_page
-
Make sure you have required files:
assets/img/symbol.svg
title.html
See Prexian in action:
- Metanorma - Standards authoring platform
- RNP - OpenPGP implementation
- Relaton - Bibliographic data toolkit
Bug reports and pull requests are welcome on GitHub at https://github.com/riboseinc/prexian.
The theme is available as open source under the terms of the MIT License.
- Documentation: Full documentation available in this README
- Issues: Report bugs and request features on GitHub Issues
- Discussions: Join the conversation on GitHub Discussions
Click to expand complete configuration options
# _config.yml
title: Your Project
description: Project description
url: https://your-project.github.io
prexian:
title: Your Project
description: Project description
tagline: Your project tagline
# Site type (required)
site_type: project # 'project' or 'hub'
# Repository settings
default_repo_branch: main
github_repo_url: https://github.com/your-org/your-project
github_repo_branch: main
# Author information
author: "Your Organization"
authors:
- name: Your Name
email: [email protected]
contact_email: [email protected]
# Parent hub (for project sites)
hub:
git_repo_url: https://github.com/your-org/hub-site
git_repo_branch: main
home_url: https://your-org.github.io/
# Social links
social:
links:
- https://github.com/your-org
- https://twitter.com/your-org
# Legal information
legal:
name: Your Organization
tos_link: https://your-org.com/terms
privacy_policy_link: https://your-org.com/privacy
# Search (optional)
algolia_search:
api_key: 'your-api-key'
index_name: 'your-index'
# Landing page sections order
landing_priority:
- software
- specs
- blog
- custom_intro
# Call-to-action buttons
home_calls_to_action:
- url: "/getting-started"
title: "Get Started"
- url: "/documentation"
title: "Documentation"
# Tag namespaces
tag_namespaces:
software:
writtenin: "Written in"
user: "Target user"
interface: "Interface"
specs:
audience: "Audience"
completion_status: "Status"
# Jekyll collections (required)
collections:
projects: # Only for hub sites
output: false
software:
output: true
permalink: /software/:path/
specs:
output: true
permalink: /specs/:path/
posts:
output: true
permalink: /blog/:year-:month-:day-:title/
pages:
output: true
permalink: /:name/
# Jekyll defaults (required)
defaults:
- scope:
path: ""
values:
layout: default
- scope:
path: _posts
type: posts
values:
layout: post
- scope:
path: _software
type: software
values:
layout: product
- scope:
path: _specs
type: specs
values:
layout: spec
# Plugins
plugins:
- prexian
# Exclude files
exclude:
- .git
- Gemfile*
- README.*
- vendor
- script
Available layouts:
default
: Main layout withhtml-class
supporthome
: Homepage layoutpost
: Blog post layoutproduct
: Software product layoutspec
: Specification layoutblog-index
: Blog index pagesoftware-index
: Software index page (hub sites)spec-index
: Specification index page (hub sites)project-index
: Project index page (hub sites)docs-base
: Documentation base layoutpage
: Generic page layout
Commonly overridden includes:
title.html
: Site name/logocustom-intro.html
: Custom introduction sectionproject-nav.html
: Additional navigation linksassets/img/symbol.svg
: Site symbolhead.html
: Custom head contentscripts.html
: Custom JavaScript
- Project/Software/Spec titles: 1-3 words, title case
- Descriptions: ~12 words, no markup
- Featured descriptions: ~20-24 words, no markup
- Blog post titles: 3-7 words
- Blog post excerpts: ~20-24 words, no markup
- Taglines: Short, memorable phrases