jekyll-theme-rop 2.1.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/LICENSE.txt +21 -0
- data/README.md +1084 -0
- data/_config.yml +89 -0
- data/_data/placeholder.yml +0 -0
- data/_includes/_nav-item.html +38 -0
- data/_includes/_post-meta.html +24 -0
- data/_includes/external-link.html +59 -0
- data/_includes/featured_posts.html +11 -0
- data/_includes/featured_software.html +55 -0
- data/_includes/featured_specs.html +31 -0
- data/_includes/head.html +9 -0
- data/_includes/home-hero.html +27 -0
- data/_includes/home-hub.html +81 -0
- data/_includes/home-project.html +19 -0
- data/_includes/index-page-hero.html +3 -0
- data/_includes/index-page-item-filter.html +83 -0
- data/_includes/item-doc-page.html +138 -0
- data/_includes/item-external-links.html +5 -0
- data/_includes/legal.html +24 -0
- data/_includes/logo.html +1 -0
- data/_includes/nav-links.html +45 -0
- data/_includes/nav-page-link.html +17 -0
- data/_includes/post-author-pic.html +13 -0
- data/_includes/post-card.html +59 -0
- data/_includes/project-doc-page.html +0 -0
- data/_includes/project-nav.html +0 -0
- data/_includes/scripts.html +0 -0
- data/_includes/social-links.html +23 -0
- data/_includes/software-card-hub.html +45 -0
- data/_includes/software-symbol.html +6 -0
- data/_includes/symbol.svg +19 -0
- data/_includes/tag-list.html +17 -0
- data/_includes/title.html +1 -0
- data/_layouts/blog-index.html +19 -0
- data/_layouts/default.html +156 -0
- data/_layouts/docs-base.html +87 -0
- data/_layouts/home.html +13 -0
- data/_layouts/page.html +5 -0
- data/_layouts/post.html +57 -0
- data/_layouts/product.html +9 -0
- data/_layouts/project-index.html +45 -0
- data/_layouts/software-index.html +31 -0
- data/_layouts/spec-index.html +31 -0
- data/_layouts/spec.html +6 -0
- data/_pages/blog.html +8 -0
- data/_pages/software.html +6 -0
- data/_pages/specs.html +6 -0
- data/_sass/headroom.scss +22 -0
- data/_sass/jekyll-theme-open-project.scss +2 -0
- data/_sass/jekyll-theme-rop.scss +798 -0
- data/_sass/normalize.scss +424 -0
- data/_sass/rop-base.scss +572 -0
- data/_sass/rop-header-footer.scss +366 -0
- data/_sass/rop-mixins.scss +871 -0
- data/assets/css/style.scss +13 -0
- data/assets/fa/fa-brands.js +456 -0
- data/assets/fa/fa-solid.js +915 -0
- data/assets/fa/fontawesome.js +1805 -0
- data/assets/img/external-link.svg +4 -0
- data/assets/js/adoc-toc.js +175 -0
- data/assets/js/anchor-scroll.js +81 -0
- data/assets/js/clipboard.min.js +7 -0
- data/assets/js/headroom.min.js +7 -0
- data/assets/js/opf.js +289 -0
- data/assets/listing-widget.js +19 -0
- metadata +276 -0
data/README.md
ADDED
@@ -0,0 +1,1084 @@
|
|
1
|
+
# The ROP Jekyll theme (Ribose Open Project theme)
|
2
|
+
|
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.
|
6
|
+
|
7
|
+
The gem is released as `jekyll-theme-rop`.
|
8
|
+
|
9
|
+
ROP fits two types of sites:
|
10
|
+
|
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,
|
15
|
+
[Metanorma](https://www.metanorma.com),
|
16
|
+
[RNP](https://www.rnpgp.com),
|
17
|
+
[Cryptode](https://www.cryptode.com),
|
18
|
+
[Relaton](https://www.relaton.com).
|
19
|
+
|
20
|
+
See also: CI_OPS for how to set up automated build and deployment of sites
|
21
|
+
to AWS S3.
|
22
|
+
|
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
|
+
|
59
|
+
## Contents
|
60
|
+
|
61
|
+
* Creating a site: [how to](#starting-a-site-with-this-theme)
|
62
|
+
|
63
|
+
* [General site setup](#general-setup)
|
64
|
+
* [Hub site setup](#hub-site)
|
65
|
+
* [Project site setup](#project-site) and describing your software and specs
|
66
|
+
|
67
|
+
* Customizing site looks:
|
68
|
+
|
69
|
+
* [Style customization](#style-customization)
|
70
|
+
* [SVG guidelines](#svg-guidelines)
|
71
|
+
* [Content guidelines](#content-guidelines)
|
72
|
+
|
73
|
+
* [Authoring content](#authoring-content)
|
74
|
+
|
75
|
+
* References:
|
76
|
+
|
77
|
+
* [Layouts](#theme-layouts)
|
78
|
+
* [Includes](#theme-includes)
|
79
|
+
|
80
|
+
|
81
|
+
## Getting started
|
82
|
+
|
83
|
+
### Set up Ruby and Jekyll
|
84
|
+
|
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.
|
89
|
+
|
90
|
+
The currently recommended Jekyll version is 3 or newer
|
91
|
+
(read about [Jekyll installation](https://jekyllrb.com/docs/#instructions)).
|
92
|
+
|
93
|
+
NOTE: This theme is known to not work with Ruby older than 2.3.
|
94
|
+
It has not been tested on newer versions.
|
95
|
+
|
96
|
+
### Start a new Jekyll site
|
97
|
+
|
98
|
+
```sh
|
99
|
+
jekyll new my-open-site
|
100
|
+
```
|
101
|
+
|
102
|
+
If you use Git for site source version management,
|
103
|
+
see the “Extra .gitignore rules” section below
|
104
|
+
for additional lines you should add to your `.gitignore`.
|
105
|
+
|
106
|
+
### Install Open Site theme into the Jekyll site
|
107
|
+
|
108
|
+
Add this line to your Jekyll site's `Gemfile`,
|
109
|
+
replacing default theme requirement:
|
110
|
+
|
111
|
+
```ruby
|
112
|
+
gem "jekyll-theme-rop"
|
113
|
+
```
|
114
|
+
|
115
|
+
(Jekyll’s default theme was “minima” at the time of this writing.)
|
116
|
+
|
117
|
+
Also in the `Gemfile`, add two important plugins to the `:jekyll_plugins` group.
|
118
|
+
(The SEO tag plugin is not mandatory, but these docs assume you use it.)
|
119
|
+
|
120
|
+
```ruby
|
121
|
+
group :jekyll_plugins do
|
122
|
+
gem "jekyll-theme-rop"
|
123
|
+
|
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"
|
130
|
+
|
131
|
+
# ...other plugins, if you use any
|
132
|
+
end
|
133
|
+
```
|
134
|
+
|
135
|
+
Execute the following to install dependencies:
|
136
|
+
|
137
|
+
$ bundle
|
138
|
+
|
139
|
+
### Configure your Open Site for the first time
|
140
|
+
|
141
|
+
Edit `_config.yml` to add necessary site-wide configuration options,
|
142
|
+
and add files and folders to site contents. This step depends
|
143
|
+
on the type of site you’re creating: hub or individual project site.
|
144
|
+
|
145
|
+
Further sections explain core concepts of open project and hub, and go
|
146
|
+
into detail about how to configure a project or hub site.
|
147
|
+
|
148
|
+
Before building the first time you must do this:
|
149
|
+
|
150
|
+
1. Configure [common settings](#common-settings)
|
151
|
+
2. Add your logo(s) according to [logo](#logo)
|
152
|
+
|
153
|
+
Please see the [configuration section](#configuration) for more details.
|
154
|
+
|
155
|
+
NOTE: It may be required to copy the following properties from
|
156
|
+
this theme’s `_config.yaml` to your site’s: `collections`, `includes_dir`.
|
157
|
+
|
158
|
+
This is likely caused by changed behavior of jekyll-data gem in recent versions,
|
159
|
+
which is responsible for “inheritance” of `_config.yaml` between theme and site.
|
160
|
+
|
161
|
+
You can add any custom collections for your site
|
162
|
+
after collections copied from theme’s config.
|
163
|
+
|
164
|
+
|
165
|
+
### Building site
|
166
|
+
|
167
|
+
Execute to build the site locally and watch for changes:
|
168
|
+
|
169
|
+
$ bundle exec jekyll serve --host mysite.local --port 4000
|
170
|
+
|
171
|
+
This assumes you have mysite.local mapped in your hosts file,
|
172
|
+
otherwise omit --host and it’ll use “localhost” as domain name.
|
173
|
+
|
174
|
+
|
175
|
+
## Configuration
|
176
|
+
|
177
|
+
There are 3 areas to configure when you first create an Open Site, namely:
|
178
|
+
|
179
|
+
* [Common setup](#common-setup), settings that apply to both Hub and Project sites;
|
180
|
+
* [Hub site](#hub-site);
|
181
|
+
* [Project site](#project-site)
|
182
|
+
|
183
|
+
|
184
|
+
## Common setup
|
185
|
+
|
186
|
+
### Git repository branch behavior
|
187
|
+
|
188
|
+
You’ll see many instances of document frontmatter
|
189
|
+
referencing Git repository URLs.
|
190
|
+
|
191
|
+
Note that, wherever a `[*_]repo_url` property is encountered,
|
192
|
+
a sibling property `[*_]repo_branch` is supported.
|
193
|
+
(This is new in 2.1.17, until that version branch “master” was used for all repositories.)
|
194
|
+
|
195
|
+
If you reference repositories that don’t use branch name “main”,
|
196
|
+
you must either:
|
197
|
+
|
198
|
+
- use a sibling `[*_]repo_branch` property to specify your custom branch name
|
199
|
+
(you can search for `git_repo_branch`, `repo_branch`, `github_repo_branch`
|
200
|
+
in this document for examples), or
|
201
|
+
|
202
|
+
- specify `default_repo_branch` property in `config.yml`
|
203
|
+
|
204
|
+
(in this case, in scenarios with project sites being used in conjunction
|
205
|
+
with a hub site, `default_repo_branch` must be the same
|
206
|
+
across all project sites’ and their hub site’s `config.yml`—otherwise you’re advised
|
207
|
+
to use the previous option to avoid site build failure).
|
208
|
+
|
209
|
+
Note that, when a referenced Git repository doesn’t contain the necessary branch
|
210
|
+
(either explicitly specified custom branch, or `default_repo_branch`, or branch called “main”),
|
211
|
+
this will cause build failure of that project site, or a hub site using that project site.
|
212
|
+
|
213
|
+
### Common settings
|
214
|
+
|
215
|
+
(mandatory)
|
216
|
+
|
217
|
+
These settings apply to both site types (hub and project).
|
218
|
+
|
219
|
+
- You may want to remove the default `about.md` page added by Jekyll,
|
220
|
+
as this theme does not account for its existence.
|
221
|
+
|
222
|
+
- Add `hero_include: home-hero.html` to YAML frontmatter
|
223
|
+
in your main `index.md`.
|
224
|
+
|
225
|
+
- Add following items to site’s `_config.yml`
|
226
|
+
(and don’t forget to remove default theme requirement there):
|
227
|
+
|
228
|
+
```yaml
|
229
|
+
url: https://example.com
|
230
|
+
# Site’s URL with protocol, without optional www. prefix
|
231
|
+
# and without trailing slash.
|
232
|
+
# Used e.g. for marking external links in docs and blog posts.
|
233
|
+
|
234
|
+
github_repo_url: https://github.com/example-org/example.com
|
235
|
+
# URL to GitHub repo for the site.
|
236
|
+
# Using GitHub & specifying this setting is currently required
|
237
|
+
# for “suggest edits” buttons to show on documentation pages.
|
238
|
+
github_repo_branch: main
|
239
|
+
# Optional, default is `main`.
|
240
|
+
|
241
|
+
title: Example
|
242
|
+
description: The example of examples
|
243
|
+
# The above two are used by jekyll-seo-tag for things such as
|
244
|
+
# `<title>` and `<meta>` tags, as well as elsewhere by the theme.
|
245
|
+
|
246
|
+
default_repo_branch: main
|
247
|
+
# Optional, default is `main`.
|
248
|
+
# Whenever branch name isn’t specified for some repository
|
249
|
+
# (such as project docs or specs), this name will be used
|
250
|
+
# during site’s build.
|
251
|
+
# (See branch behavior section for details.)
|
252
|
+
|
253
|
+
tagline: Because examples are very important
|
254
|
+
# Used in hero unit on main page.
|
255
|
+
|
256
|
+
social:
|
257
|
+
links:
|
258
|
+
- https://twitter.com/<orgname>
|
259
|
+
- https://github.com/<orgname>
|
260
|
+
|
261
|
+
legal:
|
262
|
+
name: Full Organization Name
|
263
|
+
tos_link: https://www.example.com/tos
|
264
|
+
privacy_policy_link: https://www.example.com/privacy
|
265
|
+
|
266
|
+
# no_auto_fontawesome: yes
|
267
|
+
# Specify this only if you want to disable free Font Awesome CDN.
|
268
|
+
# IMPORTANT: In this case your site MUST specify include head.html with appropriate scripts.
|
269
|
+
# Theme design relies on Font Awesome “solid” and “brands” icon styles
|
270
|
+
# and expects them to be included in SVG mode.
|
271
|
+
# Without this setting, one-file FA distribution, all.js, is included from free FA CDN.
|
272
|
+
|
273
|
+
theme: jekyll-theme-rop
|
274
|
+
|
275
|
+
permalink: /blog/:month-:day-:year-:title/
|
276
|
+
# It’s important that dash-separated permalink is used for blog posts.
|
277
|
+
# There’re no daily or monthly blog archive pages generated.
|
278
|
+
# Hub sites reference posts using that method, and it’s currently non-customizable.
|
279
|
+
# With `collections` configuration, specify permalink for posts
|
280
|
+
# correctly as well (for an example, see https://github.com/metanorma/metanorma.org/blob/d2b15f6d8c4cea73d45ad899374845ec38348ff1/_config.yml#L60).
|
281
|
+
```
|
282
|
+
|
283
|
+
### Logo
|
284
|
+
|
285
|
+
(mandatory)
|
286
|
+
|
287
|
+
By “logo” is meant the combination of site symbol as a graphic
|
288
|
+
and name as word(s).
|
289
|
+
|
290
|
+
- **Symbol** is basically an icon for the site.
|
291
|
+
Should look OK in dimensions of 30x30px, and fit inside a square.
|
292
|
+
Should be in SVG format (see also the SVG guidelines section).
|
293
|
+
|
294
|
+
- Provide your site-wide symbol in <site root>/assets/symbol.svg.
|
295
|
+
|
296
|
+
- Provide the symbol as PNG renders as `favicon.png` and `favicon-192x192.png`
|
297
|
+
under `<site root>/assets/`; use transparent background.
|
298
|
+
|
299
|
+
- **Site name** displayed to the right of the symbol.
|
300
|
+
Limit the name to 1-3 words.
|
301
|
+
|
302
|
+
Drop a file called `title.html` in the root of your site.
|
303
|
+
In its contents you can go as simple as `{{ site.name }}`
|
304
|
+
and as complex as a custom SVG shape.
|
305
|
+
|
306
|
+
Note that it must look good when placed inside ~30px tall container.
|
307
|
+
In case of SVG, SVG guidelines apply.
|
308
|
+
|
309
|
+
If you want to style SVG with CSS specifying rules for .site-logo descendants:
|
310
|
+
take care, as this may cause issues when hub site’s logo is used in context
|
311
|
+
of a project site. (You can use inline styling within the SVG.)
|
312
|
+
|
313
|
+
### Blog
|
314
|
+
|
315
|
+
Project sites and hub site can have a blog.
|
316
|
+
|
317
|
+
In case of the hub, blog index will show combined timeline
|
318
|
+
from hub blog and projects’ blogs.
|
319
|
+
|
320
|
+
#### Index
|
321
|
+
|
322
|
+
Create blog index page as _pages/blog.html, with nothing but frontmatter.
|
323
|
+
Use layout called "blog-index", pass `hero_include: index-page-hero.html`,
|
324
|
+
and set `title` and `description` as appropriate for blog index page.
|
325
|
+
|
326
|
+
Example:
|
327
|
+
|
328
|
+
```yaml
|
329
|
+
---
|
330
|
+
title: Blog
|
331
|
+
description: >-
|
332
|
+
Get the latest announcements and technical how-to’s
|
333
|
+
about our software and projects.
|
334
|
+
layout: blog-index
|
335
|
+
hero_include: index-page-hero.html
|
336
|
+
---
|
337
|
+
```
|
338
|
+
|
339
|
+
#### Posts
|
340
|
+
|
341
|
+
In general, posts are authored as per usual Jekyll setup.
|
342
|
+
|
343
|
+
It is recommended that you provide explicit hand-crafted post excerpts,
|
344
|
+
as automatically-generated excerpts may break the post card layout.
|
345
|
+
|
346
|
+
Theme also anticipates author information within frontmatter.
|
347
|
+
Together with excerpts, here’s how post frontmatter (in addition to anything
|
348
|
+
already required by Jekyll) looks like:
|
349
|
+
|
350
|
+
```yaml
|
351
|
+
---
|
352
|
+
# Required
|
353
|
+
authors:
|
354
|
+
- email: <author’s email, required>
|
355
|
+
use_picture: <`gravatar` (default), `assets`, an image path relative to assets/, or `no`>
|
356
|
+
name: <author’s full name>
|
357
|
+
social_links:
|
358
|
+
- https://twitter.com/username
|
359
|
+
- https://facebook.com/username
|
360
|
+
- https://linkedin.com/in/username
|
361
|
+
|
362
|
+
# Recommended
|
363
|
+
excerpt: >-
|
364
|
+
Post excerpt goes here, and supports inline HTML formatting only.
|
365
|
+
|
366
|
+
# Optional. Cover image. Would normally refer to an illustration from within the post.
|
367
|
+
# First post, if it has card_image specified, will be displayed with bigger layout
|
368
|
+
# featuring the image.
|
369
|
+
card_image: <path, starting with /assets/>
|
370
|
+
---
|
371
|
+
```
|
372
|
+
|
373
|
+
For hub-wide posts, put posts under _posts/ in site root and name files e.g.
|
374
|
+
`2018-04-20-welcome-to-jekyll.markdown` (no change from the usual Jekyll setup).
|
375
|
+
|
376
|
+
If ``use_picture`` is set to "assets", author photo would be expected to
|
377
|
+
reside under `assets/blog/authors/<author email>.jpg`.
|
378
|
+
|
379
|
+
For project posts, see below the project site section.
|
380
|
+
|
381
|
+
|
382
|
+
## Hub site
|
383
|
+
|
384
|
+
The hub represents your company or department, links to all projects
|
385
|
+
and offers a software and specification index.
|
386
|
+
|
387
|
+
Note that a hub site is expected to have at least one document
|
388
|
+
in the `projects` collection (see below).
|
389
|
+
|
390
|
+
Additional items allowed/expected in _config.yml:
|
391
|
+
|
392
|
+
```yaml
|
393
|
+
# Since a hub would typically represent an organization as opposed
|
394
|
+
# to individual, this would make sense:
|
395
|
+
seo:
|
396
|
+
type: Organization
|
397
|
+
|
398
|
+
tag_namespaces:
|
399
|
+
software:
|
400
|
+
namespace_id: "Human-readable namespace name"
|
401
|
+
# E.g.:
|
402
|
+
# writtenin: "Written in"
|
403
|
+
specs:
|
404
|
+
namespace_id: "Human-readable namespace name"
|
405
|
+
```
|
406
|
+
|
407
|
+
### Project, spec and software data
|
408
|
+
|
409
|
+
Each project subdirectory
|
410
|
+
must contain a file "index.md" with frontmatter like this:
|
411
|
+
|
412
|
+
```yaml
|
413
|
+
title: Sample Awesome Project
|
414
|
+
description: A sentence or two about what the project is for.
|
415
|
+
tagline: Because awesomeness is underrated
|
416
|
+
|
417
|
+
# Whether the project is included in featured three projects on hub home page
|
418
|
+
featured: true | false
|
419
|
+
|
420
|
+
site:
|
421
|
+
git_repo_url: <Git URL to standalone project site source repo>
|
422
|
+
git_repo_branch: <branch name in the above repo>
|
423
|
+
|
424
|
+
home_url: <URL to standalone project site>
|
425
|
+
|
426
|
+
tags: [some, tags]
|
427
|
+
```
|
428
|
+
|
429
|
+
### Project index page
|
430
|
+
|
431
|
+
Create software index in _pages/projects.html, with nothing but frontmatter.
|
432
|
+
Use layout called "project-index", pass `hero_include: index-page-hero.html`,
|
433
|
+
and set `title` and `description` as appropriate.
|
434
|
+
|
435
|
+
Example:
|
436
|
+
|
437
|
+
```yaml
|
438
|
+
---
|
439
|
+
title: Open projects
|
440
|
+
description: Projecting goodness into the world!
|
441
|
+
layout: project-index
|
442
|
+
hero_include: index-page-hero.html
|
443
|
+
---
|
444
|
+
```
|
445
|
+
|
446
|
+
### Software index page
|
447
|
+
|
448
|
+
Create software index in _pages/software.html, with nothing but frontmatter.
|
449
|
+
Use layout called "software-index", pass `hero_include: index-page-hero.html`,
|
450
|
+
and set `title` and `description` as appropriate.
|
451
|
+
|
452
|
+
Example:
|
453
|
+
|
454
|
+
```yaml
|
455
|
+
---
|
456
|
+
title: Software
|
457
|
+
description: Open-source software developed with MyCompany’s cooperation.
|
458
|
+
layout: software-index
|
459
|
+
hero_include: index-page-hero.html
|
460
|
+
---
|
461
|
+
```
|
462
|
+
|
463
|
+
### Specification index page
|
464
|
+
|
465
|
+
Create spec index in _pages/specs.html, with nothing but frontmatter.
|
466
|
+
Use layout called "spec-index", pass `hero_include: index-page-hero.html`,
|
467
|
+
and set `title` and `description` as appropriate.
|
468
|
+
|
469
|
+
Example:
|
470
|
+
|
471
|
+
```yaml
|
472
|
+
---
|
473
|
+
title: Specifications
|
474
|
+
description: Because specifications are cool!
|
475
|
+
layout: spec-index
|
476
|
+
hero_include: index-page-hero.html
|
477
|
+
---
|
478
|
+
```
|
479
|
+
|
480
|
+
|
481
|
+
## Project site
|
482
|
+
|
483
|
+
For standalone sites of each of your projects, _config.yml should include
|
484
|
+
site-wide `title` that is the same as project name.
|
485
|
+
|
486
|
+
Additional items allowed/expected in _config.yml:
|
487
|
+
|
488
|
+
```yaml
|
489
|
+
authors:
|
490
|
+
- name: Your Name
|
491
|
+
email: your-email@example.com
|
492
|
+
|
493
|
+
author: "Company or Individual Name Goes Here"
|
494
|
+
|
495
|
+
# Any given open project site is assumed to be part of a hub,
|
496
|
+
# and hub details in this format are required to let project site
|
497
|
+
# reference the hub.
|
498
|
+
parent_hub:
|
499
|
+
git_repo_url: git@example.com:path/to-repo.git
|
500
|
+
git_repo_branch: somebranchname
|
501
|
+
home_url: https://www.example.com/
|
502
|
+
|
503
|
+
algolia_search:
|
504
|
+
api_key: '<your Algolia API key>'
|
505
|
+
index_name: '<your Algolia index name>'
|
506
|
+
|
507
|
+
# Only add this if you want to use Algolia’s search on your project site.
|
508
|
+
|
509
|
+
tag_namespaces:
|
510
|
+
software:
|
511
|
+
namespace_id: "Human-readable namespace name"
|
512
|
+
# E.g.:
|
513
|
+
# writtenin: "Written in"
|
514
|
+
specs:
|
515
|
+
namespace_id: "Human-readable namespace name"
|
516
|
+
# NOTE: Tag namespaces must match corresponding hub site’s configuration entry.
|
517
|
+
|
518
|
+
landing_priority: [custom_intro, blog, specs, software]
|
519
|
+
# Which order should sections be displayed on landing.
|
520
|
+
#
|
521
|
+
# Default order: [software, specs, blog]
|
522
|
+
# Depending on your project’s focus & pace of development you may want to change that.
|
523
|
+
# Supported sections: featured_posts, featured_software, featured_specs, custom_intro.
|
524
|
+
#
|
525
|
+
# If you use custom_intro, project site must define an include "custom-intro.html".
|
526
|
+
# The contents of that include will be wrapper in section.custom-intro tag.
|
527
|
+
# Inside the include you’d likely want to have introductory summary wrapped
|
528
|
+
# in section.summary, and possibly custom call-to-action buttons
|
529
|
+
# (see Metanorma.com site for an example).
|
530
|
+
```
|
531
|
+
|
532
|
+
### File structure
|
533
|
+
|
534
|
+
Each project is expected to have a machine-readable and unique name, a title,
|
535
|
+
a description, a symbol, one or more software products and/or specs.
|
536
|
+
Blog, docs, and other pages are optional.
|
537
|
+
|
538
|
+
Following data structure is used for project sites:
|
539
|
+
|
540
|
+
- <project-name>/ # Jekyll site root containing _config.yml
|
541
|
+
- assets/
|
542
|
+
- symbol.svg # Required — project logo
|
543
|
+
- _software/
|
544
|
+
- <name>.adoc
|
545
|
+
- <name>/
|
546
|
+
- assets/
|
547
|
+
- symbol.svg
|
548
|
+
- _specs/
|
549
|
+
- <name>.adoc
|
550
|
+
- _pages/
|
551
|
+
- blog.html
|
552
|
+
- software.html # Software index
|
553
|
+
- specs.html # Spec index
|
554
|
+
- docs.html
|
555
|
+
- docs/ # Project-wide documentation
|
556
|
+
- getting-started.adoc
|
557
|
+
- <some-page>.adoc
|
558
|
+
- _posts/ # Blog
|
559
|
+
- 2038-02-31-blog-post-title.markdown
|
560
|
+
- _layouts/
|
561
|
+
- docs.html
|
562
|
+
|
563
|
+
### Blog
|
564
|
+
|
565
|
+
Author project site blog posts as described in the general site setup section.
|
566
|
+
|
567
|
+
### Project docs
|
568
|
+
|
569
|
+
Two kinds of docs can coexist on a given open project site:
|
570
|
+
|
571
|
+
- Project-wide documentation. It’s well-suited for describing the idea behind the project,
|
572
|
+
the “whys”, for tutorials and similar.
|
573
|
+
- Documentation specific to a piece of software (of which there can be more than one
|
574
|
+
for any given open project). This may go in detail about that piece of software,
|
575
|
+
and things like implementation specifics, extended installation instructions,
|
576
|
+
development guidelines may go here.
|
577
|
+
|
578
|
+
This section is about project-wide docs, for software docs see software and specs section.
|
579
|
+
|
580
|
+
The suggested convention is to create
|
581
|
+
_pages/docs.adoc for the main documentation page, put other pages under docs/,
|
582
|
+
and create custom layout `docs.html` that inherits from `docs-base`, specifies
|
583
|
+
`html-class: docs-page` and provides `navigation` structure linking to all docs pages
|
584
|
+
in a hierarchy.
|
585
|
+
|
586
|
+
Example _layouts/docs.html:
|
587
|
+
|
588
|
+
```
|
589
|
+
---
|
590
|
+
layout: docs-base
|
591
|
+
html-class: docs-page
|
592
|
+
docs_title: <Project name>
|
593
|
+
navigation:
|
594
|
+
items:
|
595
|
+
- title: Introduction
|
596
|
+
items:
|
597
|
+
- title: "Overview"
|
598
|
+
path: /docs/
|
599
|
+
- title: "Get started"
|
600
|
+
path: /docs/getting-started/
|
601
|
+
---
|
602
|
+
|
603
|
+
{{ content }}
|
604
|
+
```
|
605
|
+
|
606
|
+
Example _pages/docs.adoc:
|
607
|
+
|
608
|
+
```
|
609
|
+
---
|
610
|
+
layout: docs
|
611
|
+
title: Overview
|
612
|
+
html-class: >-
|
613
|
+
overview
|
614
|
+
# ^^ classes you can use to style the page in your custom CSS rules
|
615
|
+
---
|
616
|
+
:page-liquid:
|
617
|
+
|
618
|
+
Your main docs page goes here.
|
619
|
+
```
|
620
|
+
|
621
|
+
### Software and specs
|
622
|
+
|
623
|
+
An open project serves as an umbrella for related
|
624
|
+
software products and/or specifications.
|
625
|
+
|
626
|
+
Each product or spec is described by its own <name>.adoc file with frontmatter,
|
627
|
+
placed under _software/ or _specs/ subdirectory (respectively)
|
628
|
+
of your open project’s Jekyll site.
|
629
|
+
|
630
|
+
A software product additionally is required to have a symbol in SVG format,
|
631
|
+
placed in <name>/assets/symbol.svg within _software/ directory.
|
632
|
+
|
633
|
+
YAML frontmatter that is expected with both software and specs:
|
634
|
+
|
635
|
+
```yaml
|
636
|
+
title: A Few Words
|
637
|
+
# Shown to the user
|
638
|
+
# and used for HTML metadata if jekyll-seo-tag is enabled
|
639
|
+
|
640
|
+
description: A sentence.
|
641
|
+
# Not necessarily shown to the user,
|
642
|
+
# but used for HTML metadata if jekyll-seo-tag is enabled
|
643
|
+
|
644
|
+
tags: [Ruby, Python, RFC, "<some_namespace_id>:<appropriate_tag>"]
|
645
|
+
# NOTE: Avoid whitespaces and other characters that may make Jekyll
|
646
|
+
# percent-encode the tag in URLs. Replace " " (a regular space)
|
647
|
+
# with "_" (underline); underlines will be rewritten as spaces when tags
|
648
|
+
# are presented to site users.
|
649
|
+
# Tag can be prepended with a namespace to signify the type,
|
650
|
+
# e.g. chosen programming language or target viewer audience
|
651
|
+
# (see hub site configuration for tag namespace setup).
|
652
|
+
# Avoid long namespace/tag combos as they can overflow item’s card widget.
|
653
|
+
|
654
|
+
external_links:
|
655
|
+
- url: https://github.com/metanorma/metanorma
|
656
|
+
- url: https://docs.rs/proj/ver/…/
|
657
|
+
- { url: https://example.com/, title: "Custom title" }
|
658
|
+
# External links.
|
659
|
+
# For software, typically points to docs sites or source code repository.
|
660
|
+
# For specs, this usually contains RFC, IETF links, spec source code.
|
661
|
+
# * Link label can be specified with the title key.
|
662
|
+
# Select URLs are recognized and an appropriate label
|
663
|
+
# (possibly icon) is shown by default,
|
664
|
+
# otherwise you **should** specify the title.
|
665
|
+
# Currently, recognized URLs include
|
666
|
+
# GitHub, Docs.rs, RubyDoc,
|
667
|
+
# ietf.org/html/rfcN, datatracker.ietf.org/doc/…
|
668
|
+
# * Order links according to importance for project site visitors.
|
669
|
+
# The first link will be highlighted as primary.
|
670
|
+
|
671
|
+
feature_with_priority: 1
|
672
|
+
# With this key, software or spec will be featured on home
|
673
|
+
# page of project site. Lower number means higher priority
|
674
|
+
# (as in, priority no. 1 means topmost item on home page,
|
675
|
+
# as long as there aren’t others with the same value).
|
676
|
+
# If no documents in the collection have this key,
|
677
|
+
# items on home will be ordered according to Jekyll’s
|
678
|
+
# default behavior.
|
679
|
+
```
|
680
|
+
|
681
|
+
### Software product
|
682
|
+
|
683
|
+
YAML frontmatter required for software:
|
684
|
+
|
685
|
+
```yaml
|
686
|
+
repo_url: https://github.com/riboseinc/asciidoctor-rfc
|
687
|
+
# Required.
|
688
|
+
# Used for things like showing how long ago
|
689
|
+
# the was project updated last.
|
690
|
+
|
691
|
+
repo_branch: main
|
692
|
+
|
693
|
+
docs_source:
|
694
|
+
git_repo_url: git@example.com:path/to-repo.git
|
695
|
+
git_repo_subtree: docs
|
696
|
+
git_repo_branch: main
|
697
|
+
# Documentation, the contents of which will be made part of the project site.
|
698
|
+
# See the nearby section about documentation.
|
699
|
+
```
|
700
|
+
|
701
|
+
#### Displaying software docs
|
702
|
+
|
703
|
+
Inside the repository and optionally subtree specified under `docs`
|
704
|
+
in above sample, place a file `navigation.adoc` (or `navigation.md`) containing
|
705
|
+
only frontmatter, following this sample:
|
706
|
+
|
707
|
+
```yaml
|
708
|
+
---
|
709
|
+
items:
|
710
|
+
- title: Introduction
|
711
|
+
path: intro/
|
712
|
+
items:
|
713
|
+
- { title: Overview, path: intro/overview/ }
|
714
|
+
- { title: Installation, path: intro/installation/ }
|
715
|
+
- { title: Usage, path: usage/ }
|
716
|
+
---
|
717
|
+
|
718
|
+
= Navigation
|
719
|
+
```
|
720
|
+
|
721
|
+
In the same directory, place the required document pages—in this case, `overview.adoc`,
|
722
|
+
`installation.adoc`, and `basic-usage.adoc`. Each file must contain
|
723
|
+
standard YAML frontmatter with at least `title` specified.
|
724
|
+
|
725
|
+
During project site build, Jekyll pulls docs for software that’s part of the
|
726
|
+
site and builds them, converting pages from Markdown/AsciiDoc to HTML and adding
|
727
|
+
the navigation.
|
728
|
+
|
729
|
+
|
730
|
+
### Specification
|
731
|
+
|
732
|
+
YAML frontmatter specific to specs:
|
733
|
+
|
734
|
+
```yaml
|
735
|
+
spec_source:
|
736
|
+
git_repo_url: https://github.com/<user>/<repo>
|
737
|
+
git_repo_subtree: images
|
738
|
+
git_repo_branch: main
|
739
|
+
build:
|
740
|
+
engine: png_diagrams
|
741
|
+
# See below about building the spec from its source
|
742
|
+
# to be displayed on the site.
|
743
|
+
|
744
|
+
navigation:
|
745
|
+
sections:
|
746
|
+
- name: Model diagrams
|
747
|
+
items:
|
748
|
+
- title: "CSAND Normal Document"
|
749
|
+
path: "Csand_NormalDocument"
|
750
|
+
description: ""
|
751
|
+
ignore_missing: yes
|
752
|
+
```
|
753
|
+
|
754
|
+
#### Displaying specification contents
|
755
|
+
|
756
|
+
While software doc pages are currently simply generated using standard
|
757
|
+
Jekyll means from Markdown/AsciiDoc into HTML,
|
758
|
+
building specs is handled in a more flexible way,
|
759
|
+
delegating the source -> Open Project site-compatible HTML conversion
|
760
|
+
to an engine.
|
761
|
+
|
762
|
+
For specs to be built, provide build config and navigation
|
763
|
+
in the YAML frontmatter of corresponding `_specs/<specname>.adoc` file
|
764
|
+
as described in spec YAML frontmatter sample.
|
765
|
+
|
766
|
+
For now, only the `png_diagrams` engine is supported, with Metanorma-based
|
767
|
+
project build engine to come.
|
768
|
+
|
769
|
+
During project site build, Jekyll pulls spec sources that’s part of the
|
770
|
+
site and builds them, converting pages from source markup to HTML using
|
771
|
+
the engine specified, and adding the navigation.
|
772
|
+
|
773
|
+
### Symbol
|
774
|
+
|
775
|
+
Should look OK in dimensions of about 30x30, 60x60px. Must fit in a square.
|
776
|
+
Should be in SVG format (see also the SVG guidelines section).
|
777
|
+
Place the symbol in assets/symbol.svg within project directory.
|
778
|
+
|
779
|
+
|
780
|
+
## SVG guidelines
|
781
|
+
|
782
|
+
- Ensure SVG markup does not use IDs. It may appear multiple times
|
783
|
+
on the page hence IDs would fail markup validation.
|
784
|
+
- Ensure root `<svg>` element specifies the `viewBox` attribute,
|
785
|
+
and no `width` or `height` attributes.
|
786
|
+
- You can style SVG shapes by adding custom rules to site’s assets/css/style.scss.
|
787
|
+
- Project symbols only: the same SVG is used both in hub site’s project list
|
788
|
+
(where it appears on white, and is expected to be colored)
|
789
|
+
and in project site’s top header
|
790
|
+
(where it appears on colored background, and is expected to be white).
|
791
|
+
It is recommended to use a normal color SVG, and style it in project site’s
|
792
|
+
custom CSS. The SVG must be created in a way that allows this to happen.
|
793
|
+
|
794
|
+
|
795
|
+
## Content guidelines
|
796
|
+
|
797
|
+
- Project, software, spec title: 1-3 words, capital case
|
798
|
+
- Project, software, spec description: about 12 words, no markup
|
799
|
+
- Project description (featured): about 20-24 words, no markup
|
800
|
+
- Blog post title: 3–7 words
|
801
|
+
- Blog post excerpt: about 20–24 words, no markup
|
802
|
+
|
803
|
+
|
804
|
+
## Authoring content
|
805
|
+
|
806
|
+
Content is expected to be authored in AsciiDoc.
|
807
|
+
Some features, such as in-page navigation in software/project documentation
|
808
|
+
and code listing copy buttons,
|
809
|
+
require HTML structure to match the one generated from AsciiDoc by jekyll-asciidoc
|
810
|
+
and won’t work with content is authored in Markdown, for example.
|
811
|
+
|
812
|
+
### Disabling copy button on code listings
|
813
|
+
|
814
|
+
By default, each code listing widget, like below, will have a copy button
|
815
|
+
next to the `<pre>` element.
|
816
|
+
|
817
|
+
```
|
818
|
+
[source,sh]
|
819
|
+
----
|
820
|
+
docker pull ribose/metanorma
|
821
|
+
----
|
822
|
+
```
|
823
|
+
|
824
|
+
To disable that button for a particular listing, add `.nocopy` class to it:
|
825
|
+
|
826
|
+
```
|
827
|
+
[.nocopy]
|
828
|
+
[source,sh]
|
829
|
+
----
|
830
|
+
docker pull ribose/metanorma
|
831
|
+
----
|
832
|
+
```
|
833
|
+
|
834
|
+
## Theme includes
|
835
|
+
|
836
|
+
Commonly used overridable includes are (paths relative to your site root):
|
837
|
+
|
838
|
+
- title.html: Site name in case you want to provide custom typography,
|
839
|
+
possibly as SVG.
|
840
|
+
|
841
|
+
- project-nav.html (currently project sites only): Additional
|
842
|
+
links in project site’s top navigation, if needed.
|
843
|
+
|
844
|
+
- assets/symbol.svg: Site-wide symbol is used as an include
|
845
|
+
to facilitate path fill color overrides via CSS rules.
|
846
|
+
|
847
|
+
### Include location gotcha
|
848
|
+
|
849
|
+
Theme configuration adds `includes_dir: .` to your site.
|
850
|
+
This means when Jekyll encounters `{% include <include_name> %}`
|
851
|
+
in a template, it looks first in `<site root>/<include_name>`,
|
852
|
+
and then in `<theme root>/_includes/<include_name>`. Consequently,
|
853
|
+
you put your include overrides directly in site root, **not** inside
|
854
|
+
`_includes/` directory of your site.
|
855
|
+
|
856
|
+
|
857
|
+
## Theme layouts
|
858
|
+
|
859
|
+
Normally you don’t need to specify layouts manually, except where
|
860
|
+
instructed in site setup sections of this document.
|
861
|
+
|
862
|
+
Commonly used layouts are:
|
863
|
+
|
864
|
+
- blog-index: Blog index page. Pages using this layout are recommended
|
865
|
+
to supply hero_include.
|
866
|
+
|
867
|
+
- post: Blog post.
|
868
|
+
|
869
|
+
- project-index: Open project index page (hub site only).
|
870
|
+
Suggested to supply hero_include.
|
871
|
+
Will show a list of open projects across the hub.
|
872
|
+
|
873
|
+
- software-index: Software index page (hub site only).
|
874
|
+
Suggested to supply hero_include.
|
875
|
+
Will show a list of software across projects within the hub.
|
876
|
+
|
877
|
+
- spec-index: Specification index page (hub site only).
|
878
|
+
Suggested to supply hero_include.
|
879
|
+
Will show a list of specs across projects within the hub.
|
880
|
+
|
881
|
+
- product: Software product (project site only).
|
882
|
+
|
883
|
+
- spec: Open specification (project site only).
|
884
|
+
|
885
|
+
- default: Main layout; among other things adds `html-class` specified in frontmatter
|
886
|
+
of last inheriting layout and the concrete page frontmatter to the `<body>` element.
|
887
|
+
|
888
|
+
### Page frontmatter
|
889
|
+
|
890
|
+
Typical expected page frontmatter is `title` and `description`. Those are
|
891
|
+
also used by jekyll-seo-tag plugin to add the appropriate meta tags.
|
892
|
+
|
893
|
+
Commonly supported in page frontmatter is the hero_include option,
|
894
|
+
which would show hero unit underneath top header.
|
895
|
+
Currently, theme supports _includes/index-page-hero.html as the only value
|
896
|
+
you can pass for hero_include (or you can leave hero_include out altogether).
|
897
|
+
|
898
|
+
|
899
|
+
## Style customization
|
900
|
+
|
901
|
+
To customize site appearance, create a file in your Jekyll site
|
902
|
+
under assets/css/style.scss with following exact contents:
|
903
|
+
|
904
|
+
```
|
905
|
+
---
|
906
|
+
---
|
907
|
+
// Font imports can go here
|
908
|
+
|
909
|
+
// Variable redefinitions can go here
|
910
|
+
|
911
|
+
@import 'jekyll-theme-rop';
|
912
|
+
|
913
|
+
// Custom rules can go here
|
914
|
+
```
|
915
|
+
|
916
|
+
There are two aspects to theme customization:
|
917
|
+
|
918
|
+
* Cutomize SASS variables before the import (such as colors)
|
919
|
+
* Define custom style rules after the import
|
920
|
+
|
921
|
+
### Custom rules
|
922
|
+
|
923
|
+
One suggested custom rule would be to change the fill color for SVG paths
|
924
|
+
used for your custom site symbol to white, unless it’s white by default.
|
925
|
+
|
926
|
+
The rule would look like this:
|
927
|
+
|
928
|
+
```scss
|
929
|
+
.site-logo svg path {
|
930
|
+
fill: white;
|
931
|
+
}
|
932
|
+
```
|
933
|
+
|
934
|
+
### SASS variables
|
935
|
+
|
936
|
+
Following are principal variables that define the appearance of a site
|
937
|
+
built with this theme, along with their defaults.
|
938
|
+
|
939
|
+
For a project site, wisely choosing primary and accent colors should be enough
|
940
|
+
as a minimum.
|
941
|
+
|
942
|
+
```scss
|
943
|
+
$font-family: Helvetica, Arial, sans-serif !default;
|
944
|
+
$main-font-color: black !default;
|
945
|
+
|
946
|
+
# Primary color & accent colors are used throughout site’s UI.
|
947
|
+
# Make sure to use shades dark enough that white text is readable on top,
|
948
|
+
# especially with the primary color.
|
949
|
+
# Make sure these colors go well with each other.
|
950
|
+
$primary-color: lightblue !default;
|
951
|
+
$accent-color: red !default;
|
952
|
+
|
953
|
+
# These colors are used for warning/info blocks within body text.
|
954
|
+
$important-color: orange !default;
|
955
|
+
$warning-color: red !default;
|
956
|
+
|
957
|
+
# Background used on home page body & other pages’ hero unit backgrounds.
|
958
|
+
$main-background: linear-gradient(315deg, $accent-color 0%, $primary-color 74%) !default;
|
959
|
+
|
960
|
+
# This background defaults to $main-background value.
|
961
|
+
$header-background: $main-background !default;
|
962
|
+
|
963
|
+
|
964
|
+
# Below does not apply to project sites (only the hub site):
|
965
|
+
|
966
|
+
$hub-software--primary-color: lightsalmon !default;
|
967
|
+
$hub-software--primary-dark-color: tomato !default;
|
968
|
+
$hub-software--hero-background: $hub-software--primary-dark-color !default;
|
969
|
+
|
970
|
+
$hub-specs--primary-color: lightpink !default;
|
971
|
+
$hub-specs--primary-dark-color: palevioletred !default;
|
972
|
+
$hub-specs--hero-background: $hub-specs--primary-dark-color !default;
|
973
|
+
```
|
974
|
+
|
975
|
+
TIP: A good way to find a good match for primary-color and accent-color
|
976
|
+
may be the eggradients.com website. Find a suitable, dark enough gradient and pick
|
977
|
+
one color as primary, and the other as accent.
|
978
|
+
|
979
|
+
|
980
|
+
## Extra .gitignore rules
|
981
|
+
|
982
|
+
Add these lines to your .gitignore to prevent
|
983
|
+
theme-generated files and directories from adding chaos to your Git staging.
|
984
|
+
|
985
|
+
```
|
986
|
+
_software/*/.git
|
987
|
+
_software/*/docs
|
988
|
+
_software/_*_repo
|
989
|
+
_specs/*/
|
990
|
+
!_specs/*.*
|
991
|
+
parent-hub/*
|
992
|
+
```
|
993
|
+
|
994
|
+
|
995
|
+
## Contributing
|
996
|
+
|
997
|
+
Bug reports and pull requests are welcome on GitHub
|
998
|
+
at https://github.com/riboseinc/jekyll-theme-rop.
|
999
|
+
|
1000
|
+
This project is intended to be a safe, welcoming space for collaboration,
|
1001
|
+
and contributors are expected to adhere
|
1002
|
+
to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
1003
|
+
|
1004
|
+
|
1005
|
+
## Theme development
|
1006
|
+
|
1007
|
+
Generally, this directory is setup like a Jekyll site. To set it up,
|
1008
|
+
run `bundle install`.
|
1009
|
+
|
1010
|
+
To experiment with this code, add content (projects, software, specs)
|
1011
|
+
and run `bundle exec jekyll serve`. This starts a Jekyll server
|
1012
|
+
using this theme at `http://localhost:4000`.
|
1013
|
+
|
1014
|
+
Put your layouts in `_layouts`, your includes in `_includes`,
|
1015
|
+
your sass files in `_sass` and any other assets in `assets`.
|
1016
|
+
|
1017
|
+
Add pages, documents, data, etc. like normal to test your theme's contents.
|
1018
|
+
|
1019
|
+
As you make modifications to your theme and to your content, your site will
|
1020
|
+
regenerate and you should see the changes in the browser after a refresh,
|
1021
|
+
like normal.
|
1022
|
+
|
1023
|
+
When your theme is released, only files specified with gemspec file
|
1024
|
+
will be included. If you modify theme to add more directories that
|
1025
|
+
need to be included in the gem, edit regexp in the gemspec.
|
1026
|
+
|
1027
|
+
### Building and releasing
|
1028
|
+
|
1029
|
+
#### Manual test during development
|
1030
|
+
|
1031
|
+
When you’re working on visual aspects of the theme, it’s useful
|
1032
|
+
to see how it would affect the end result (a site *built with* this theme).
|
1033
|
+
|
1034
|
+
Here’s how to develop the theme while simultaneously previewing the changes
|
1035
|
+
on a site. The sequence would be as follows, assuming you have a local copy
|
1036
|
+
of this repo and have a Jekyll site using this theme:
|
1037
|
+
|
1038
|
+
1. For the Jekyll site, change Gemfile to point to local copy
|
1039
|
+
of the theme (the root of this repo) and run `bundle`.
|
1040
|
+
|
1041
|
+
For example, you’d change `gem "jekyll-theme-rop", "~> 1.0.6"`
|
1042
|
+
to `gem "jekyll-theme-rop", :path => "../jekyll-theme-rop"`.
|
1043
|
+
The relative path assumes your site root and theme root are sibling directories.
|
1044
|
+
|
1045
|
+
2. Run `bundle exec jekyll serve` to start Jekyll’s development server.
|
1046
|
+
|
1047
|
+
3. Make changes to both theme and site directory contents.
|
1048
|
+
|
1049
|
+
4. If needed, kill with Ctrl+C then relaunch the serve command
|
1050
|
+
to apply the changes you made to the theme
|
1051
|
+
(it may not reload automatically if changes only affect the theme and not the site
|
1052
|
+
you’re serving).
|
1053
|
+
|
1054
|
+
4. Once you’re satisfied, release a new version of the theme — see below.
|
1055
|
+
|
1056
|
+
5. (To later bump the site to this latest version: revert the Gemfile change,
|
1057
|
+
update theme dependency version to the one you’ve just released,
|
1058
|
+
run `bundle --full-index` to update lockfile properly,
|
1059
|
+
and your site is ready to go.)
|
1060
|
+
|
1061
|
+
#### Releasing
|
1062
|
+
|
1063
|
+
Make sure theme works: build script is under construction,
|
1064
|
+
so use good judgement and thorough manual testing.
|
1065
|
+
|
1066
|
+
1. Decide whether this is a patch, minor or major change.
|
1067
|
+
|
1068
|
+
2. Run the automated "release" workflow to release the gem.
|
1069
|
+
|
1070
|
+
|
1071
|
+
#### Testing with build script (TBD)
|
1072
|
+
|
1073
|
+
May not work at the moment — see #26. Please use the other test option.
|
1074
|
+
|
1075
|
+
To check your theme, run:
|
1076
|
+
|
1077
|
+
./develop/build
|
1078
|
+
|
1079
|
+
It’ll build Jekyll site and run some checks, like HTML markup validation.
|
1080
|
+
|
1081
|
+
|
1082
|
+
## License
|
1083
|
+
|
1084
|
+
The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|