Skip to content

Commit 4264e3a

Browse files
committed
Site structure and script metadata
1 parent 5e3fe1f commit 4264e3a

File tree

228 files changed

+1019
-616
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

228 files changed

+1019
-616
lines changed

Gemfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,5 @@ source 'https://rubygems.org'
33
gem "jekyll", "~> 4.3.3" # installed by `gem jekyll`
44
# gem "webrick" # required when using Ruby >= 3 and Jekyll <= 4.2.2
55

6-
gem "just-the-docs", "0.9.0" # pinned to the current release
7-
# gem "just-the-docs" # always download the latest release
6+
gem "just-the-docs", "0.10.0" # pinned to the current release
87
gem "git"

Gemfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ GEM
6565
jekyll (>= 3.8, < 5.0)
6666
jekyll-watch (2.2.1)
6767
listen (~> 3.0)
68-
just-the-docs (0.9.0)
68+
just-the-docs (0.10.0)
6969
jekyll (>= 3.8.5)
7070
jekyll-include-cache
7171
jekyll-seo-tag (>= 2.0)
@@ -113,7 +113,7 @@ PLATFORMS
113113
DEPENDENCIES
114114
git
115115
jekyll (~> 4.3.3)
116-
just-the-docs (= 0.9.0)
116+
just-the-docs (= 0.10.0)
117117

118118
BUNDLED WITH
119119
2.3.26

_config.yml

Lines changed: 162 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,173 @@
11
title: OS2BorgerPC dokumentationssite
2-
description: Dokumentation af administrationssites, images og scripts.
3-
theme: just-the-docs
2+
description: Dokumentation af administrationssite, images og scripts.
43

4+
theme: just-the-docs
55
url: https://just-the-docs.github.io
66

77
aux_links:
8-
Template Repository: https://github.com/just-the-docs/just-the-docs-template
9-
10-
collections:
11-
pages:
12-
permalink: "/:collection/:path/"
13-
output: true
14-
scripts:
15-
permalink: "/:collection/:path/"
16-
output: true
17-
just_the_docs:
18-
collections:
19-
pages:
20-
name: Sider
21-
nav_fold: false
22-
scripts:
23-
name: Scripts
24-
nav_fold: false
25-
8+
Intro til OS2BorgerPC: https://os2.eu/os2borgerpc
9+
OS2BorgerPC på Github: https://github.com/OS2borgerPC
10+
11+
# Makes Aux links open in a new tab. Default is false
12+
aux_links_new_tab: true
13+
14+
# Enable or disable the side/mobile menu globally
15+
# Nav menu can also be selectively enabled or disabled using page variables or the minimal layout
16+
nav_enabled: true
17+
18+
# Sort order for navigation links
19+
# nav_sort: case_insensitive # default, equivalent to nil
20+
nav_sort: case_sensitive # Capital letters sorted before lowercase
21+
22+
# External navigation links
23+
nav_external_links:
24+
- title: Just the Docs on GitHub
25+
url: https://github.com/just-the-docs/just-the-docs
26+
27+
# Show navigation error report
28+
nav_error_report: true # default is false/nil.
29+
30+
permalink: pretty
31+
2632
defaults:
27-
# _pages
28-
- scope:
29-
path: ""
30-
type: pages
31-
values:
32-
layout: default
33-
# _scripts
3433
- scope:
35-
path: ""
36-
type: scripts
34+
path: "docs" # an empty string here means all files in the project
35+
type: "pages"
3736
values:
38-
layout: script
37+
layout: "docs"
3938
submodules:
4039
- "/assets/os2borgerpc-scripts/"
40+
41+
42+
exclude:
43+
# from https://github.com/jekyll/jekyll/blob/master/lib/site_template/_config.yml:
44+
- .sass-cache/
45+
- .jekyll-cache/
46+
- gemfiles/
47+
- Gemfile
48+
- Gemfile.lock
49+
- node_modules/
50+
- vendor/bundle/
51+
- vendor/cache/
52+
- vendor/gems/
53+
- vendor/ruby/
54+
# specific to the theme website:
55+
- bin/
56+
- lib/
57+
- "*.gemspec"
58+
- "*.gem"
59+
- LICENSE.txt
60+
- package.json
61+
- package-lock.json
62+
- Rakefile
63+
- README.md
64+
- CODE_OF_CONDUCT.md
65+
- docker-compose.yml
66+
- Dockerfile
67+
# theme test code
68+
- fixtures/
69+
70+
# Enable or disable the site search
71+
# Supports true (default) or false
72+
search_enabled: true
73+
search:
74+
# Split pages into sections that can be searched individually
75+
# Supports 1 - 6, default: 2
76+
heading_level: 2
77+
# Maximum amount of previews per search result
78+
# Default: 3
79+
previews: 2
80+
# Maximum amount of words to display before a matched word in the preview
81+
# Default: 5
82+
preview_words_before: 3
83+
# Maximum amount of words to display after a matched word in the preview
84+
# Default: 10
85+
preview_words_after: 3
86+
# Set the search token separator
87+
# Default: /[\s\-/]+/
88+
# Example: enable support for hyphenated search words
89+
tokenizer_separator: /[\s/]+/
90+
# Display the relative url in search results
91+
# Supports true (default) or false
92+
rel_url: true
93+
# Enable or disable the search button that appears in the bottom right corner of every page
94+
# Supports true or false (default)
95+
button: false
96+
# Focus the search input by pressing `ctrl + focus_shortcut_key` (or `cmd + focus_shortcut_key` on macOS)
97+
focus_shortcut_key: "k"
98+
99+
# For copy button on code
100+
enable_copy_code_button: true
101+
102+
# By default, consuming the theme as a gem leaves mermaid disabled; it is opt-in
103+
mermaid:
104+
# Version of mermaid library
105+
# Pick an available version from https://cdn.jsdelivr.net/npm/mermaid/
106+
version: "9.1.6"
107+
# Put any additional configuration, such as setting the theme, in _includes/mermaid_config.js
108+
# See also docs/ui-components/code
109+
# To load mermaid from a local library, also use the `path` key to specify the location of the library; e.g.
110+
# for (v10+):
111+
# path: "/assets/js/mermaid.esm.min.mjs"
112+
# for (<v10):
113+
# path: "/assets/js/mermaid.min.js"
114+
# Note: copy both `mermaid.esm.min.mjs` (v10+) or `mermaid.min.js` (<v10) and the associated `.map` file from the specified version of `mermaid/dist` to `/assets/js/`.
115+
116+
# Enable or disable heading anchors
117+
heading_anchors: true
118+
119+
# Aux links for the upper right navigation
120+
aux_links:
121+
"Just the Docs on GitHub":
122+
- "https://github.com/just-the-docs/just-the-docs"
123+
124+
# Makes Aux links open in a new tab. Default is false
125+
aux_links_new_tab: false
126+
127+
# Enable or disable the side/mobile menu globally
128+
# Nav menu can also be selectively enabled or disabled using page variables or the minimal layout
129+
nav_enabled: true
130+
131+
# Sort order for navigation links
132+
# nav_sort: case_insensitive # default, equivalent to nil
133+
nav_sort: case_sensitive # Capital letters sorted before lowercase
134+
135+
# External navigation links
136+
nav_external_links:
137+
- title: Just the Docs on GitHub
138+
url: https://github.com/just-the-docs/just-the-docs
139+
140+
# Footer content
141+
# appears at the bottom of every page's main content
142+
143+
# Back to top link
144+
back_to_top: true
145+
back_to_top_text: "Back to top"
146+
147+
footer_content: 'Copyright &copy; 2017-2020 Patrick Marsceill. Distributed by an <a href="https://github.com/just-the-docs/just-the-docs/tree/main/LICENSE.txt">MIT license.</a> <a href="https://www.netlify.com/">This site is powered by Netlify.</a>'
148+
149+
# Footer last edited timestamp
150+
last_edit_timestamp: true # show or hide edit time - page must have `last_modified_date` defined in the frontmatter
151+
last_edit_time_format: "%b %e %Y at %I:%M %p" # uses ruby's time format: https://ruby-doc.org/stdlib-2.7.0/libdoc/time/rdoc/Time.html
152+
153+
# Footer "Edit this page on GitHub" link text
154+
gh_edit_link: true # show or hide edit this page link
155+
gh_edit_link_text: "Edit this page on GitHub"
156+
gh_edit_repository: "https://github.com/just-the-docs/just-the-docs" # the github URL for your repo
157+
gh_edit_branch: "main" # the branch that your docs is served from
158+
# gh_edit_source: docs # the source that your files originate from
159+
gh_edit_view_mode: "tree" # "tree" or "edit" if you want the user to jump into the editor immediately
160+
161+
162+
163+
translations:
164+
checkbox: "Afkrydsningsfelt"
165+
string: "Streng"
166+
integer: "Heltal"
167+
date: "Dato"
168+
password: "Adgangskode"
169+
file: "Fil"
170+
time: "Tid"
171+
172+
41173

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
{%- comment -%}
2+
Include as: {%- include components/children_nav.html -%}
3+
Depends on: page, site, nav_breadcrumbs.
4+
Results in: HTML for the children-navigation component.
5+
Includes: components/nav/sorted.html, toc_heading_custom.html.
6+
Overwrites:
7+
nav_ancestor_links, nav_top_node_titles, nav_child_candidates, nav_children,
8+
nav_child, nav_child_ok, nav_child_ancestor, nav_sorted.
9+
{%- endcomment -%}
10+
11+
{%- comment -%}
12+
Whether a page has any children is checked efficiently by inspecting the cached
13+
site_nav. If the page has no children, nav_children is set to an empty array;
14+
otherwise nav_children is left unset.
15+
{%- endcomment -%}
16+
17+
{%- if page.has_children == false -%}
18+
{%- assign nav_children = "" | split: "" -%}
19+
{%- else -%}
20+
21+
{%- assign nav_children = nil -%}
22+
23+
{%- capture nav_list_link -%}
24+
<a href="{{ page.url | relative_url }}" class="nav-list-link">
25+
{%- endcapture -%}
26+
27+
{%- capture site_nav -%}
28+
{%- include_cached components/site_nav.html all=true -%}
29+
{%- endcapture -%}
30+
31+
{%- capture nav_list_simple -%}
32+
<ul class="nav-list">
33+
{%- endcapture -%}
34+
35+
{%- assign nav_child_start = site_nav
36+
| split: nav_list_link | last
37+
| split: "</a>" | slice: 1 | first -%}
38+
39+
{%- assign nav_child_test = nav_child_start
40+
| remove_first: nav_list_simple | prepend: nav_list_simple -%}
41+
42+
{%- if nav_child_start != nav_child_test -%}
43+
{%- assign nav_children = "" | split: "" -%}
44+
{%- endif -%}
45+
46+
{%- endif -%}
47+
48+
{%- unless nav_children -%}
49+
50+
{%- comment -%}
51+
The layout is assumed to include components/breadcrumbs.html before this file,
52+
otherwise it needs to be included here.
53+
{%- endcomment -%}
54+
55+
{%- assign nav_ancestors = "" | split: "" -%}
56+
{%- for nav_link in nav_breadcrumbs -%}
57+
{%- assign nav_title = nav_link | split: ">" | slice: 1 | first | append: ">" | remove: "</a>" -%}
58+
{%- assign nav_ancestors = nav_ancestors | push: nav_title -%}
59+
{%- endfor -%}
60+
61+
{%- assign nav_parenthood = site[page.collection] | default: site.html_pages
62+
| where_exp: "item", "item.title != nil" | group_by: "parent" -%}
63+
64+
{%- assign nav_top_nodes = nav_parenthood
65+
| where_exp: "item", "item.name == ''" | map: "items" | first -%}
66+
67+
{% assign nav_top_node_titles = nav_top_nodes | map: "title" -%}
68+
69+
{%- include components/nav/children.html node=page ancestors=nav_ancestors all=true -%}
70+
71+
{%- endunless -%}
72+
73+
{%- if nav_children.size >= 1 -%}
74+
75+
{%- if page.child_nav_order == 'desc' or page.child_nav_order == 'reversed' -%}
76+
{%- assign nav_children = nav_children | reverse -%}
77+
{%- endif -%}
78+
79+
<hr>
80+
{% include toc_heading_custom.html %}
81+
<div class="toc">
82+
{% for nav_child in nav_children %}
83+
<div class="toc-item">
84+
<a class="fs-5 fw-500" href="{{ nav_child.url | relative_url }}">{{ nav_child.title }}</a>
85+
{% if nav_child.summary %}{{ nav_child.summary }}{% endif %}
86+
<div>{% if nav_child.summary %}{{ nav_child.summary }}{% endif %}</div>
87+
</div>
88+
{% endfor %}
89+
90+
</div>
91+
92+
{%- endif -%}

_includes/script_metadata.html

Lines changed: 30 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,45 @@
1-
{% if page.title %}
2-
<h1>{{ page.title }}</h1>
3-
{% endif %}
4-
5-
{% if page.category %}
6-
<p><strong>Category:</strong> {{ page.category }}</p>
7-
{% endif %}
8-
91
{% if page.source %}
102
<p><strong>Source:</strong>
113
<a href="{{ page.source | relative_url }}" target="_blank">Download script</a>
12-
<button onclick="copyToClipboard('{{ page.source }}')">Copy to Clipboard</button>
4+
<button onclick="copyToClipboard('{{ page.source | relative_url }}')">Copy to Clipboard</button>
135
</p>
146

157
<p><strong>Last Updated:</strong> {% last_modified_at %}</p>
168
{% endif %}
179

1810
{% if page.parameters %}
19-
<p><strong>Parameters:</strong> {{ page.parameters }}</p>
11+
<p><strong>Parameters:</strong></p>
12+
<table class="script-parameters">
13+
<thead>
14+
<tr>
15+
<th>Navn</th>
16+
<th>Type</th>
17+
<th>Standardværdi</th>
18+
<th>Påkrævet</th>
19+
</tr>
20+
</thead>
21+
<tbody>
22+
{% for param in page.parameters %}
23+
{% capture translation_value %}
24+
{% include translation.html key=param.type %}
25+
{% endcapture %}
26+
27+
<tr>
28+
<td class="name"><input type="text" value="{{ param.name }}"></td>
29+
<td class="type"><input type="text" value="{{ translation_value | strip }}"></td>
30+
<td class="default"><input type="text" value="{{ param.default }}"></td>
31+
<td class="mandatory">
32+
<input type="checkbox" {% if param.mandatory %}checked{% endif %}>
33+
</td>
34+
</tr>
35+
{% endfor %}
36+
</tbody>
37+
</table>
2038
{% endif %}
2139

2240
<details>
23-
<summary>Click to see more details</summary>
24-
<p>This is the content inside the fold-out/fold-in element. It is hidden by default and can be toggled by clicking on the summary above.</p>
41+
<summary>Click to see the source code</summary>
42+
<pre><code>{% read_script_content %}</code></pre>
2543
</details>
2644

2745
<script>

_includes/translation.html

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{% assign key_to_search = include.key %}
2+
3+
{% if site.translations[key_to_search] %}
4+
{{ site.translations[key_to_search] }}
5+
{% else %}
6+
Key not found
7+
{% endif %}

0 commit comments

Comments
 (0)