Skip to content

Commit c909cae

Browse files
committed
feat: rename to jekyll-theme-rop, combine jekyll-theme-open-project and jekyll-theme-open-project-helpers into a single gem, fixes #85
1 parent bfed96f commit c909cae

35 files changed

+1969
-1030
lines changed

.github/workflows/rake.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Auto-generated by Cimas: Do not edit it manually!
2+
# See https://github.com/metanorma/cimas
3+
name: rake
4+
5+
on:
6+
push:
7+
branches: [ master, main ]
8+
tags: [ v* ]
9+
pull_request:
10+
11+
jobs:
12+
rake:
13+
uses: metanorma/ci/.github/workflows/generic-rake.yml@main
14+
secrets:
15+
pat_token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Auto-generated by Cimas: Do not edit it manually!
2+
# See https://github.com/metanorma/cimas
3+
name: release
4+
5+
on:
6+
workflow_dispatch:
7+
inputs:
8+
next_version:
9+
description: |
10+
Next release version. Possible values: x.y.z, major, minor, patch (or pre|rc|etc).
11+
Also, you can pass 'skip' to skip 'git tag' and do 'gem push' for the current version
12+
required: true
13+
default: 'skip'
14+
repository_dispatch:
15+
types: [ do-release ]
16+
17+
jobs:
18+
release:
19+
uses: metanorma/ci/.github/workflows/rubygems-release.yml@main
20+
with:
21+
next_version: ${{ github.event.inputs.next_version }}
22+
secrets:
23+
rubygems-api-key: ${{ secrets.RIBOSE_RUBYGEMS_API_KEY }}
24+
pat_token: ${{ secrets.RIBOSE_CI_PAT_TOKEN }}
25+

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
_site/*
22
*.scssc
33
Gemfile.lock
4-
jekyll-theme-open-project-*.gem
4+
jekyll-theme-rop-*.gem

.rubocop.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
inherit_from: .rubocop_todo.yml

.rubocop_todo.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
# This configuration was generated by
2+
# `rubocop --auto-gen-config`
3+
# on 2025-05-24 10:37:55 UTC using RuboCop version 1.75.7.
4+
# The point is for the user to remove these configuration records
5+
# one by one as the offenses are removed from the code base.
6+
# Note that changes in the inspected code, or installation of new
7+
# versions of RuboCop, may require this file to be generated again.
8+
9+
# Offense count: 1
10+
# Configuration parameters: Severity, Include.
11+
# Include: **/*.gemspec
12+
Gemspec/RequiredRubyVersion:
13+
Exclude:
14+
- 'jekyll-theme-rop.gemspec'
15+
16+
# Offense count: 2
17+
# Configuration parameters: AllowedParentClasses.
18+
Lint/MissingSuper:
19+
Exclude:
20+
- 'lib/rop/filterable_index.rb'
21+
- 'lib/rop/png_diagram_page.rb'
22+
23+
# Offense count: 11
24+
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
25+
Metrics/AbcSize:
26+
Max: 62
27+
28+
# Offense count: 1
29+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
30+
# AllowedMethods: refine
31+
Metrics/BlockLength:
32+
Max: 30
33+
34+
# Offense count: 1
35+
# Configuration parameters: CountBlocks, CountModifierForms.
36+
Metrics/BlockNesting:
37+
Max: 4
38+
39+
# Offense count: 1
40+
# Configuration parameters: CountComments, CountAsOne.
41+
Metrics/ClassLength:
42+
Max: 217
43+
44+
# Offense count: 7
45+
# Configuration parameters: AllowedMethods, AllowedPatterns.
46+
Metrics/CyclomaticComplexity:
47+
Max: 14
48+
49+
# Offense count: 12
50+
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
51+
Metrics/MethodLength:
52+
Max: 63
53+
54+
# Offense count: 2
55+
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
56+
Metrics/ParameterLists:
57+
Max: 6
58+
59+
# Offense count: 7
60+
# Configuration parameters: AllowedMethods, AllowedPatterns.
61+
Metrics/PerceivedComplexity:
62+
Max: 17
63+
64+
# Offense count: 2
65+
# Configuration parameters: ExpectMatchingDefinition, CheckDefinitionPathHierarchy, CheckDefinitionPathHierarchyRoots, Regex, IgnoreExecutableScripts, AllowedAcronyms.
66+
# CheckDefinitionPathHierarchyRoots: lib, spec, test, src
67+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
68+
Naming/FileName:
69+
Exclude:
70+
- 'Rakefile.rb'
71+
- 'lib/jekyll-theme-open-project.rb'
72+
- 'lib/jekyll-theme-rop.rb'
73+
74+
# Offense count: 1
75+
# Configuration parameters: NamePrefix, ForbiddenPrefixes, AllowedMethods, MethodDefinitionMacros, UseSorbetSigs.
76+
# NamePrefix: is_, has_, have_, does_
77+
# ForbiddenPrefixes: is_, has_, have_, does_
78+
# AllowedMethods: is_a?
79+
# MethodDefinitionMacros: define_method, define_singleton_method
80+
Naming/PredicateName:
81+
Exclude:
82+
- 'spec/**/*'
83+
- 'lib/rop/project_reader.rb'
84+
85+
# Offense count: 1
86+
Style/ClassVars:
87+
Exclude:
88+
- 'lib/rop/project_reader.rb'
89+
90+
# Offense count: 9
91+
# Configuration parameters: AllowedConstants.
92+
Style/Documentation:
93+
Exclude:
94+
- 'spec/**/*'
95+
- 'test/**/*'
96+
- 'lib/jekyll-theme-rop.rb'
97+
- 'lib/rop/filterable_index.rb'
98+
- 'lib/rop/png_diagram_page.rb'
99+
- 'lib/rop/project_reader.rb'
100+
- 'lib/rop/spec_builder.rb'
101+
102+
# Offense count: 5
103+
# Configuration parameters: AllowedVariables.
104+
Style/GlobalVars:
105+
Exclude:
106+
- 'ci_ops/Rakefile'
107+
108+
# Offense count: 2
109+
# This cop supports safe autocorrection (--autocorrect).
110+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
111+
# URISchemes: http, https
112+
Layout/LineLength:
113+
Max: 136

Gemfile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,7 @@
22

33
source 'https://rubygems.org'
44
gemspec
5+
6+
gem 'bundler'
7+
gem 'rake'
8+
gem 'rubocop'

README.md

Lines changed: 72 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,17 @@
1-
# Open Project theme by Ribose
1+
# The ROP Jekyll theme (Ribose Open Project theme)
22

3-
Open Project is a Jekyll theme (with the accompanying plugin)
4-
aiming to help organizations and individuals present
5-
open-source software and specifications in a navigable and elegant way.
3+
ROP is a Jekyll theme (with accompanying plugin code) aiming to help
4+
organizations and individuals present open-source software and specifications in
5+
a navigable and elegant way.
66

7-
Open Project fits two types of sites:
7+
The gem is released as `jekyll-theme-rop`.
88

9-
* a site that describes one individual project
10-
* a site that combine projects into sort of an open hub.
9+
ROP fits two types of sites:
1110

12-
**Demo**: See [Ribose Open](https://open.ribose.com/) project sites -- for example,
11+
* a site that describes one individual project;
12+
* a site that combine multiple project sites into an open hub site.
13+
14+
**Demo**: See [Ribose](https://www.ribose.com/) project sites -- for example,
1315
[Metanorma](https://www.metanorma.com),
1416
[RNP](https://www.rnpgp.com),
1517
[Cryptode](https://www.cryptode.com),
@@ -18,6 +20,42 @@ Open Project fits two types of sites:
1820
See also: CI_OPS for how to set up automated build and deployment of sites
1921
to AWS S3.
2022

23+
NOTE: This theme was previously named `jekyll-theme-open-project` with a helper
24+
gem `jekyll-theme-open-project-helpers`.
25+
26+
27+
## Migrating from `jekyll-theme-open-project` to the new `jekyll-theme-rop`
28+
29+
Follow these steps:
30+
31+
1. Update your Open Project Gemfile to remove all previously used dependencies
32+
from `jekyll-theme-open-project` (including `git`), and replace it like this:
33+
```ruby
34+
# If you have any plugins, put them here!
35+
group :jekyll_plugins do
36+
gem "jekyll-theme-rop"
37+
end
38+
```
39+
40+
2. Update your `_config.yml` file to remove all previously used plugins from `jekyll-theme-open-project`, so it becomes:
41+
```yaml
42+
# plugins:
43+
# - jekyll-seo-tag
44+
# - jekyll-sitemap
45+
# - jekyll-theme-rop
46+
```
47+
48+
3. Replace in SCSS files all mention of import files with their renamed counterparts:
49+
* `@import 'jekyll-theme-open-project'` => ``@import 'jekyll-theme-rop'`
50+
* `'open-project-mixins'` => remove because it was already included.
51+
52+
4. If you use the `png_diagrams` feature in any page layout, replace as follows:
53+
```diff
54+
-engine: png_diagrams
55+
+engine: png_diagram_page
56+
```
57+
58+
2159
## Contents
2260

2361
* Creating a site: [how to](#starting-a-site-with-this-theme)
@@ -44,18 +82,22 @@ to AWS S3.
4482

4583
### Set up Ruby and Jekyll
4684

47-
The currently recommended Ruby version is 2.6.
48-
(In case you aren’t using Ruby often, the easiest way to install one may be with RVM.)
85+
The currently recommended Ruby version is 3.3.
86+
87+
NOTE: In case you don't use Ruby often, the easiest way to install one may be
88+
with RVM.
4989

5090
The currently recommended Jekyll version is 3 or newer
5191
(read about [Jekyll installation](https://jekyllrb.com/docs/#instructions)).
5292

53-
NOTE: this theme is known to not work with Ruby older than 2.3,
54-
and hasn’t been tested on newer versions.
93+
NOTE: This theme is known to not work with Ruby older than 2.3.
94+
It has not been tested on newer versions.
5595

5696
### Start a new Jekyll site
5797

58-
jekyll new my-open-site
98+
```sh
99+
jekyll new my-open-site
100+
```
59101

60102
If you use Git for site source version management,
61103
see the “Extra .gitignore rules” section below
@@ -67,7 +109,7 @@ Add this line to your Jekyll site's `Gemfile`,
67109
replacing default theme requirement:
68110

69111
```ruby
70-
gem "jekyll-theme-open-project"
112+
gem "jekyll-theme-rop"
71113
```
72114

73115
(Jekyll’s default theme was “minima” at the time of this writing.)
@@ -77,13 +119,14 @@ Also in the `Gemfile`, add two important plugins to the `:jekyll_plugins` group.
77119

78120
```ruby
79121
group :jekyll_plugins do
80-
gem "jekyll-seo-tag"
81-
gem "jekyll-sitemap"
82-
gem "jekyll-data"
83-
gem "jekyll-asciidoc"
122+
gem "jekyll-theme-rop"
84123

85-
gem "jekyll-theme-open-project-helpers"
86-
gem "jekyll-external-links"
124+
# The following gems are automatically included by jekyll-theme-rop
125+
# gem "jekyll-seo-tag"
126+
# gem "jekyll-sitemap"
127+
# gem "jekyll-data"
128+
# gem "jekyll-asciidoc"
129+
# gem "jekyll-external-links"
87130

88131
# ...other plugins, if you use any
89132
end
@@ -227,7 +270,7 @@ These settings apply to both site types (hub and project).
227270
# and expects them to be included in SVG mode.
228271
# Without this setting, one-file FA distribution, all.js, is included from free FA CDN.
229272

230-
theme: jekyll-theme-open-project
273+
theme: jekyll-theme-rop
231274

232275
permalink: /blog/:month-:day-:year-:title/
233276
# It’s important that dash-separated permalink is used for blog posts.
@@ -340,7 +383,7 @@ For project posts, see below the project site section.
340383

341384
The hub represents your company or department, links to all projects
342385
and offers a software and specification index.
343-
386+
344387
Note that a hub site is expected to have at least one document
345388
in the `projects` collection (see below).
346389

@@ -609,7 +652,7 @@ tags: [Ruby, Python, RFC, "<some_namespace_id>:<appropriate_tag>"]
609652
# Avoid long namespace/tag combos as they can overflow item’s card widget.
610653
611654
external_links:
612-
- url: https://github.com/riboseinc/asciidoctor-rfc
655+
- url: https://github.com/metanorma/metanorma
613656
- url: https://docs.rs/proj/ver/…/
614657
- { url: https://example.com/, title: "Custom title" }
615658
# External links.
@@ -865,7 +908,7 @@ under assets/css/style.scss with following exact contents:
865908

866909
// Variable redefinitions can go here
867910

868-
@import 'jekyll-theme-open-project';
911+
@import 'jekyll-theme-rop';
869912

870913
// Custom rules can go here
871914
```
@@ -952,7 +995,7 @@ parent-hub/*
952995
## Contributing
953996

954997
Bug reports and pull requests are welcome on GitHub
955-
at https://github.com/riboseinc/jekyll-theme-open-project.
998+
at https://github.com/riboseinc/jekyll-theme-rop.
956999

9571000
This project is intended to be a safe, welcoming space for collaboration,
9581001
and contributors are expected to adhere
@@ -995,8 +1038,8 @@ of this repo and have a Jekyll site using this theme:
9951038
1. For the Jekyll site, change Gemfile to point to local copy
9961039
of the theme (the root of this repo) and run `bundle`.
9971040

998-
For example, you’d change `gem "jekyll-theme-open-project", "~> 1.0.6"`
999-
to `gem "jekyll-theme-open-project", :path => "../jekyll-theme-open-project"`.
1041+
For example, you’d change `gem "jekyll-theme-rop", "~> 1.0.6"`
1042+
to `gem "jekyll-theme-rop", :path => "../jekyll-theme-rop"`.
10001043
The relative path assumes your site root and theme root are sibling directories.
10011044

10021045
2. Run `bundle exec jekyll serve` to start Jekyll’s development server.
@@ -1020,30 +1063,10 @@ of this repo and have a Jekyll site using this theme:
10201063
Make sure theme works: build script is under construction,
10211064
so use good judgement and thorough manual testing.
10221065

1023-
1. Pick the next version number (think whether it’s a patch, minor or major increment).
1024-
1025-
2. Release the chosen version of `jekyll-theme-open-project-helpers` gem:
1026-
see [https://github.com/riboseinc/jekyll-theme-open-project-helpers](gem’s docs).
1027-
1028-
(Theme and plugin are coupled tightly at this time,
1029-
and to simplify mental overhead of dependency management
1030-
we go with one version number for the whole suite.)
1031-
1032-
3. Inside .gemspec within this repo’s root, update main gem version,
1033-
and also the version for `jekyll-theme-open-project-helpers` runtime dependency,
1034-
to the one we are releasing.
1035-
1036-
4. Run `bundle --full-index`, ensure it pulls the newly released plugin gem.
1037-
(It may take a couple minutes after releasing helpers plugin for gem index to update.)
1038-
1039-
5. Make a commit for the new release (“chore: Release vX.X.X”).
1066+
1. Decide whether this is a patch, minor or major change.
10401067

1041-
6. Execute `./develop/release`. This does the following:
1068+
2. Run the automated "release" workflow to release the gem.
10421069

1043-
* Builds new gem version
1044-
* Pushes gem to rubygems.org
1045-
* Creates new version tag in this repository
1046-
* Pushes changes to GitHub
10471070

10481071
#### Testing with build script (TBD)
10491072

Rakefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
require "bundler/gem_tasks"
1+
# frozen_string_literal: true
2+
3+
require 'bundler/gem_tasks'
24
# require "rspec/core/rake_task"
35

46
# Uncomment to enable the "spec" task

0 commit comments

Comments
 (0)