jekyll-theme-open-project 1.1.25 → 1.1.26

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e09f5fa2c2fd4362589ab6084c27892a7a9074a4bca12cf5eee38724552891da
4
- data.tar.gz: 01de902102f9fdf21af5c09b0622825b813cdb4a3c5625ac8ee18d8cba58f369
3
+ metadata.gz: f54c864f92c1990c16c57ba81232c3656ca564c42d361031d3c9b0856c3da8ef
4
+ data.tar.gz: afa0d424a4a9dddbd6d5084918724adc2a2d93fbb9982d48dd85855d0d06d41f
5
5
  SHA512:
6
- metadata.gz: faf6286e377c24a56a813e202dbf31fb423f97a446123c35aa75721eeb7fb7c3b00cf427b8891dabb60cc9b27956713d45f871017c89584cd340da8d3cecb5bd
7
- data.tar.gz: c92a53183417eaa8496cf4c0cdaee5d7fc9d8dfe85082b1778414c3958bf2e6f9f64d38812950fa2be9420509a67ffe9e38d9249d08a707103eff23bdb7dec28
6
+ metadata.gz: 9d2b238dc44d3e0169c9a7b15515c2b4bcb8a71b2fe71ec19bd3aa2025a157833511ece3997448091776e5e852cf2b2314e4ee0a18f52ba7ce47789f186f47b0
7
+ data.tar.gz: 540c37e4228591bc114c575c49b333ca3b38e9542eb51bd84f1c0e7a790bb1a1e0395e77ea0d01f99679f8dea826545b3c15d2398ec54c1b9da57bf7c54ffe0a
data/README.md CHANGED
@@ -449,6 +449,31 @@ docs_url: https://docs.rs/proj/ver/…/
449
449
  # like docs.rs and rubydoc, special icon and/or label will be shown.
450
450
  ```
451
451
 
452
+ #### Displaying software docs
453
+
454
+ Inside the repository and optionally subtree specified under `docs`
455
+ in above sample, place a file called `navigation.md` containing
456
+ only frontmatter, following this sample:
457
+
458
+ ```yaml
459
+ sections:
460
+ - name: Introduction
461
+ items:
462
+ - overview
463
+ - installation
464
+ - name: Usage
465
+ items:
466
+ - basic
467
+ ```
468
+
469
+ In the same directory, place the required document pages—in this case, `overview.md`,
470
+ `installation.md`, and `basic.md`. Each document page is required to contain
471
+ standard YAML frontmatter with at least `title` specified.
472
+
473
+ During project site build, Jekyll pulls docs for software that’s part of the
474
+ site and builds them, converting pages from Markdown/AsciiDoc to HTML and adding
475
+ the navigation.
476
+
452
477
 
453
478
  ### Specification
454
479
 
@@ -466,35 +491,10 @@ ietf_datatracker_ver: "01"
466
491
 
467
492
  source_url: https://example.com/spec-source-markup
468
493
  # Required.
469
- ```
470
494
 
471
- ### Documentation for software, and specification contents
472
495
 
473
- **Software docs** should be kept in software
474
- package’s own repository, under a directory such as `docs/`.
475
- Inside that directory, place a file called `navigation.md` containing
476
- only frontmatter, in format like this:
496
+ # For displaying spec contents, see below:
477
497
 
478
- ```yaml
479
- sections:
480
- - name: Introduction
481
- items:
482
- - overview
483
- - installation
484
- - name: Usage
485
- items:
486
- - basic
487
- ```
488
-
489
- In the same directory, place the required document pages—in this case, `overview.md`,
490
- `installation.md`, and `basic.md`. Each document page is required to contain
491
- standard YAML frontmatter with at least `title` specified.
492
-
493
- For **specification contents** to be built, provide configuration
494
- and navigation in YAML frontmatter of corresponding `_specs/<specname>.adoc` file,
495
- following this example:
496
-
497
- ```yaml
498
498
  spec_source:
499
499
  git_repo_url: https://github.com/<user>/<repo>
500
500
  git_repo_subtree: images
@@ -511,12 +511,24 @@ navigation:
511
511
  ignore_missing: yes
512
512
  ```
513
513
 
514
+ #### Displaying specification contents
515
+
516
+ While software doc pages are currently simply generated using standard
517
+ Jekyll means from Markdown/AsciiDoc into HTML,
518
+ building specs is handled in a more flexible way,
519
+ delegating the source -> Open Project site-compatible HTML conversion
520
+ to an engine.
521
+
522
+ For specs to be built, provide build config and navigation
523
+ in the YAML frontmatter of corresponding `_specs/<specname>.adoc` file
524
+ as described in spec YAML frontmatter sample.
525
+
514
526
  For now, only the `png_diagrams` engine is supported, with Metanorma-based
515
527
  project build engine to come.
516
528
 
517
- During project site build, Jekyll pulls software docs or spec contents
518
- that are hosted under that project site. For spec contents, Jekyll runs
519
- a build, if specified.
529
+ During project site build, Jekyll pulls spec sources that’s part of the
530
+ site and builds them, converting pages from source markup to HTML using
531
+ the engine specified, and adding the navigation.
520
532
 
521
533
  ### Symbol
522
534
 
@@ -569,7 +581,7 @@ This means when Jekyll encounters `{% include <include_name> %}`
569
581
  in a template, it looks first in `<site root>/<include_name>`,
570
582
  and then in `<theme root>/_includes/<include_name>`. Consequently,
571
583
  you put your include overrides directly in site root, **not** inside
572
- `_includes/` directory of your side.
584
+ `_includes/` directory of your site.
573
585
 
574
586
 
575
587
  ## Theme layouts
@@ -694,8 +706,8 @@ theme-generated files and directories from adding chaos to your Git staging.
694
706
  _software/*/.git
695
707
  _software/*/docs
696
708
  _software/_*_repo
697
- _specs/*/.git
698
- _specs/*/docs
709
+ _specs/*/
710
+ !_specs/*.*
699
711
  parent-hub/*
700
712
  ```
701
713
 
@@ -11,7 +11,7 @@
11
11
  {% assign nav = item_docs | where_exp: "item", "item.path contains 'docs/navigation'" | first %}
12
12
 
13
13
  {% if nav == nil %}
14
- {% assign nav = page.navigation %}
14
+ {% assign nav = page.navigation || layout.navigation %}
15
15
  {% endif %}
16
16
 
17
17
  {% assign num_nav_sections = nav.sections | size %}
@@ -20,7 +20,7 @@
20
20
 
21
21
  <nav class="docs-nav">
22
22
 
23
- {% if is_docs_landing == false %}
23
+ {% if is_docs_landing != true %}
24
24
  <header class="sidebar-header">
25
25
  {% if include.item_type == 'software' %}
26
26
  <div class="logo-container">
@@ -30,6 +30,9 @@
30
30
  <h3 class="title">
31
31
  <a href="{{ product_base_url | relative_url }}">{{ item_data.title }}</a>
32
32
  </h3>
33
+ <span class="section-title">
34
+ &rarr;&nbsp;{{ page.title|replace: " ", "&nbsp;" }}
35
+ </span>
33
36
  </header>
34
37
 
35
38
  <section class="external-links">
@@ -106,7 +109,7 @@
106
109
  </div>
107
110
  {% endif %}
108
111
 
109
- <h1 class="text">{{ page.title }}</h1>
112
+ <h1 class="text">{{ page.article_header_title | default: page.title }}</h1>
110
113
  </div>
111
114
 
112
115
  {% if is_docs_landing == false and item_data.docs.git_repo_url %}
@@ -0,0 +1,96 @@
1
+ {% assign product_base_url = page.url | split: "/" | slice: 0, 3 | join: "/" | append: "/" %}
2
+
3
+ <section class="documentation">
4
+ {% assign docs_base_url = product_base_url | append: "docs/" %}
5
+ {% assign nav = page.navigation | default: layout.navigation %}
6
+ {% assign num_nav_sections = nav.sections | size %}
7
+
8
+ <nav class="docs-nav">
9
+
10
+ <header class="sidebar-header">
11
+ <h3 class="title">
12
+ <a href="javascript: void 0;">{{ include.header_main }}</a>
13
+ </h3>
14
+ {% if include.header_side %}
15
+ <span class="section-title">
16
+ &rarr;&nbsp;{{ include.header_side|replace: " ", "&nbsp;" }}
17
+ </span>
18
+ {% endif %}
19
+ </header>
20
+
21
+ {% for section in nav.sections %}
22
+ <section>
23
+ <h4 class="section-title">{{ section.name }}</h4>
24
+ <ul class="section-items">
25
+ {% for item in section.items %}
26
+ {% if item.path %}
27
+ {% comment %}Spec contents{% endcomment %}
28
+ {% assign item_path = item.path %}
29
+ {% assign link = product_base_url | append: item_path | append: "/" %}
30
+ {% else %}
31
+ {% comment %}Software docs{% endcomment %}
32
+ {% assign item_path = item %}
33
+ {% assign link = docs_base_url | append: item_path | append: "/" %}
34
+ {% endif %}
35
+
36
+ {% assign linked_page = include.items | where_exp: "item", "item.url contains link" | first %}
37
+
38
+ {% if item.title %}
39
+ {% assign item_title = item.title %}
40
+ {% elsif item.ignore_missing != true %}
41
+ {% assign item_title = linked_page.title %}
42
+ {% endif %}
43
+
44
+ {% if linked_page or item.ignore_missing %}
45
+ {% if page.url != link %}
46
+ <li class="item">
47
+ <a href="{{ link | relative_url }}">
48
+ {{ item_title }}
49
+ </a>
50
+ {% else %}
51
+ <li class="item selected">
52
+ <span>
53
+ {{ item_title }}
54
+ </span>
55
+ {% endif %}
56
+ {% else %}
57
+ <li class="item">
58
+ <span class="tbd">
59
+ {% if item.title %}
60
+ {{ item.title }}
61
+ {% else %}
62
+ {{ item }}
63
+ {% endif %}
64
+ </span>
65
+ {% endif %}
66
+
67
+ {% assign link = "" %}
68
+ {% endfor %}
69
+ </ul>
70
+ </section>
71
+ {% endfor %}
72
+ </nav>
73
+
74
+ <article>
75
+ <header>
76
+ <div class="title">
77
+ {% if include.item_type == 'software' and page.url == product_base_url %}
78
+ <div class="logo-container">
79
+ {% include software-symbol.html item_id=page.id %}
80
+ </div>
81
+ {% endif %}
82
+
83
+ <h1 class="text">{{ page.article_header_title | default: page.title }}</h1>
84
+ </div>
85
+
86
+ <div>
87
+ <h3 class="lead">{{ page.description }}</h3>
88
+ </div>
89
+ </header>
90
+
91
+ <div class="body">
92
+ {{ content }}
93
+ </div>
94
+
95
+ </article>
96
+ </section>
@@ -10,7 +10,7 @@
10
10
  }
11
11
 
12
12
  body.with-headroom {
13
- &.layout--product, &.layout--spec {
13
+ &.layout--docs, &.layout--product, &.layout--spec {
14
14
  .underlay.header {
15
15
  position: fixed;
16
16
  top: 0;
@@ -666,7 +666,8 @@ main {
666
666
  @extend .main-article;
667
667
  }
668
668
  &.layout--spec > main,
669
- &.layout--product > main {
669
+ &.layout--product > main,
670
+ &.layout--docs > main {
670
671
  > .documentation:only-child {
671
672
  @include docs-page($primary-dark-color);
672
673
  }
@@ -132,6 +132,7 @@ a {
132
132
  background: white;
133
133
  display: block;
134
134
  position: relative;
135
+ overflow: hidden;
135
136
 
136
137
  &:link, &:hover, &:visited {
137
138
  color: inherit;
@@ -204,6 +205,8 @@ a {
204
205
  .tags {
205
206
  list-style: none;
206
207
  padding: 0;
208
+ overflow: hidden;
209
+ text-overflow: ellipsis;
207
210
 
208
211
  > li {
209
212
  display: inline;
@@ -517,6 +517,39 @@
517
517
  cursor: pointer;
518
518
  padding-top: 10px;
519
519
  padding-bottom: 10px;
520
+
521
+ &:after {
522
+ content: "▼";
523
+ }
524
+
525
+ .item-type {
526
+ display: none;
527
+ margin-right: 10px;
528
+ }
529
+ .title {
530
+ flex-grow: 0;
531
+ }
532
+ .section-title {
533
+ margin-left: 10px;
534
+ margin-right: 10px;
535
+ overflow: hidden;
536
+ text-overflow: ellipsis;
537
+ flex-grow: 1;
538
+ transition: transform .2s ease-out;
539
+ }
540
+
541
+ &.headroom--top {
542
+ .section-title {
543
+ transform: translateY(-5em);
544
+ transition: none;
545
+ }
546
+ }
547
+
548
+ &.unpinned {
549
+ .item-type, .subsection {
550
+ display: inline-block;
551
+ }
552
+ }
520
553
  }
521
554
 
522
555
  &.expanded {
@@ -527,11 +560,6 @@
527
560
  border-bottom: none;
528
561
  }
529
562
  }
530
-
531
- &.pinned {
532
- z-index: 4;
533
- transform: translateY(0);
534
- }
535
563
  }
536
564
  }
537
565
  }
@@ -127,7 +127,6 @@
127
127
  docsNav.classList.add('top-expandable');
128
128
 
129
129
  docsNav.style.top = '' + topHeaderHeight + 'px';
130
- docsNavHeader.innerHTML = docsNavHeader.innerHTML + ' ▼';
131
130
  docsNavSections.forEach(function (el) {
132
131
  el.style.transition = 'opacity .2s cubic-bezier(0.23, 1, 0.32, 1)';
133
132
  });
@@ -244,13 +243,13 @@
244
243
 
245
244
  var collapsibleHeader;
246
245
 
247
- if (document.querySelector('body.layout--product .documentation:not(.docs-landing), body.layout--spec .documentation:not(.docs-landing)') != null) {
246
+ if (document.querySelector('body.layout--docs .documentation, body.layout--product .documentation:not(.docs-landing), body.layout--spec .documentation:not(.docs-landing)') != null) {
248
247
  collapsibleHeader = initCollapsibleHeader(
249
248
  document.querySelector('.underlay.header'),
250
249
  hamburgerMenu);
251
250
  }
252
251
 
253
- var docsRoot = body.querySelector('body.layout--product .documentation:not(.docs-landing), body.layout--spec .documentation:not(.docs-landing)');
252
+ var docsRoot = body.querySelector('body.layout--docs .documentation, body.layout--product .documentation:not(.docs-landing), body.layout--spec .documentation:not(.docs-landing)');
254
253
  var collapsibleDocsNav;
255
254
 
256
255
  if (docsRoot !== null) {
@@ -258,11 +257,17 @@
258
257
  collapsibleHeader.assignCollapsibleDocsNav(collapsibleDocsNav);
259
258
  }
260
259
 
261
- var docArticleSelectorPrefix = 'body.layout--product .documentation:not(.docs-landing) > article ';
262
- var docArticleHeaderNavToggle = document.querySelector(docArticleSelectorPrefix + '> header > nav > button.docs-nav-toggle');
263
- var docArticleFooterNavToggle = document.querySelector(docArticleSelectorPrefix + '> footer > nav > button.docs-nav-toggle');
264
- for (var el of [docArticleFooterNavToggle, docArticleHeaderNavToggle]) {
265
- if (el) { el.addEventListener('click', collapsibleDocsNav.toggle); }
260
+ var docArticleSelectorPrefixes = [
261
+ 'body.layout--docs .documentation > article',
262
+ 'body.layout--spec .documentation > article',
263
+ 'body.layout--product .documentation:not(.docs-landing) > article '];
264
+
265
+ for (var prefix of docArticleSelectorPrefixes) {
266
+ var docArticleHeaderNavToggle = document.querySelector(prefix + '> header > nav > button.docs-nav-toggle');
267
+ var docArticleFooterNavToggle = document.querySelector(prefix + '> footer > nav > button.docs-nav-toggle');
268
+ for (var el of [docArticleFooterNavToggle, docArticleHeaderNavToggle]) {
269
+ if (el) { el.addEventListener('click', collapsibleDocsNav.toggle); }
270
+ }
266
271
  }
267
272
 
268
273
  if (triggerEl !== null && inputEl !== null && topMenuEl !== null) {
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-theme-open-project
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.25
4
+ version: 1.1.26
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-26 00:00:00.000000000 Z
11
+ date: 2018-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -72,14 +72,14 @@ dependencies:
72
72
  requirements:
73
73
  - - '='
74
74
  - !ruby/object:Gem::Version
75
- version: 1.1.25
75
+ version: 1.1.26
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
80
  - - '='
81
81
  - !ruby/object:Gem::Version
82
- version: 1.1.25
82
+ version: 1.1.26
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: bundler
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -172,6 +172,7 @@ files:
172
172
  - _includes/nav-links.html
173
173
  - _includes/nav-page-link.html
174
174
  - _includes/post-card.html
175
+ - _includes/project-doc-page.html
175
176
  - _includes/project-nav.html
176
177
  - _includes/scripts.html
177
178
  - _includes/social-links.html