mirror of
https://github.com/thangisme/notes.git
synced 2025-01-02 23:26:41 -05:00
Merge branch 'v0.2.9' of github.com:pmarsceill/just-the-docs into v0.2.9
This commit is contained in:
commit
10d6abd356
45
.github/workflows/ci-master.yml
vendored
Normal file
45
.github/workflows/ci-master.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
|
||||
name: CI
|
||||
|
||||
jobs:
|
||||
|
||||
jekyll-latest:
|
||||
name: Build Jekyll site (latest)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Build the site in the jekyll/builder container
|
||||
run: |
|
||||
docker run --rm \
|
||||
--volume="${{ github.workspace }}:/srv/jekyll" \
|
||||
jekyll/builder:latest /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && jekyll build && bundle exec just-the-docs rake search:init"
|
||||
jekyll-3-8-5:
|
||||
name: Build Jekyll site (v3.8.5)
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Build the site in the jekyll/builder container
|
||||
run: |
|
||||
docker run --rm \
|
||||
--volume="${{ github.workspace }}:/srv/jekyll" \
|
||||
jekyll/builder:3.8.5 /bin/bash -c "gem install bundler && chmod -R 777 /srv/jekyll && jekyll build && bundle exec just-the-docs rake search:init"
|
||||
assets:
|
||||
name: Format and test CSS and JS
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js 12.x
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
- run: npm install
|
||||
- run: npm test
|
@ -38,6 +38,9 @@ aux_links:
|
||||
"Just the Docs on GitHub":
|
||||
- "//github.com/pmarsceill/just-the-docs"
|
||||
|
||||
# Makes Aux links open in a new tab. Default is false
|
||||
aux_links_new_tab: false
|
||||
|
||||
# Sort order for navigation links
|
||||
nav_sort: case_insensitive # default, equivalent to nil
|
||||
# nav_sort: case_sensitive # Capital letters sorted before lowercase
|
||||
|
@ -2,12 +2,12 @@
|
||||
<ul class="navigation-list">
|
||||
{%- assign ordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order != nil" -%}
|
||||
{%- assign unordered_pages_list = site.html_pages | where_exp:"item", "item.nav_order == nil" -%}
|
||||
{%- if site.nav_sort == 'case_sensitive' -%}
|
||||
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%}
|
||||
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
|
||||
{%- else -%}
|
||||
{%- if site.nav_sort == 'case_insensitive' -%}
|
||||
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort_natural:"nav_order" -%}
|
||||
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort_natural:"title" -%}
|
||||
{%- else -%}
|
||||
{%- assign sorted_ordered_pages_list = ordered_pages_list | sort:"nav_order" -%}
|
||||
{%- assign sorted_unordered_pages_list = unordered_pages_list | sort:"title" -%}
|
||||
{%- endif -%}
|
||||
{%- assign pages_list = sorted_ordered_pages_list | concat: sorted_unordered_pages_list -%}
|
||||
{%- for node in pages_list -%}
|
||||
@ -29,7 +29,7 @@
|
||||
{%- endif -%}
|
||||
<a href="{{ child.url | absolute_url }}" class="navigation-list-link{% if page.url == child.url %} active{% endif %}">{{ child.title }}</a>
|
||||
{%- if child.has_children -%}
|
||||
{%- assign grand_children_list = pages_list | where: "parent", child.title -%}
|
||||
{%- assign grand_children_list = pages_list | where: "parent", child.title | where: "grand_parent", node.title -%}
|
||||
<ul class="navigation-list-child-list">
|
||||
{%- for grand_child in grand_children_list -%}
|
||||
<li class="navigation-list-item {% if page.url == grand_child.url %} active{% endif %}">
|
||||
|
@ -43,7 +43,15 @@ layout: table_wrappers
|
||||
{% if site.aux_links != nil %}
|
||||
<ul class="list-style-none text-small aux-nav">
|
||||
{% for link in site.aux_links %}
|
||||
<li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}"><a href="{{ link.last }}">{{ link.first }}</a></li>
|
||||
<li class="d-inline-block my-0{% unless forloop.last %} mr-2{% endunless %}">
|
||||
<a href="{{ link.last }}"
|
||||
{% if site.aux_links_new_tab %}
|
||||
target="_blank" rel="noopener noreferrer"
|
||||
{% endif %}
|
||||
>
|
||||
{{ link.first }}
|
||||
</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
@ -75,8 +83,9 @@ layout: table_wrappers
|
||||
<hr>
|
||||
<h2 class="text-delta">Table of contents</h2>
|
||||
<ul>
|
||||
{% for child in pages_list %}
|
||||
{% if child.parent == page.title and child.title != page.title %}
|
||||
{%- assign children_list = pages_list | where: "parent", node.title -%}
|
||||
{% for child in children_list %}
|
||||
{% if child.parent == page.title and child.title != page.title and child.grand_parent == page.parent %}
|
||||
<li>
|
||||
<a href="{{ child.url | absolute_url }}">{{ child.title }}</a>{% if child.summary %} - {{ child.summary }}{% endif %}
|
||||
</li>
|
||||
|
@ -47,6 +47,9 @@ search_tokenizer_separator: /[\s/]+/
|
||||
aux_links:
|
||||
"Just the Docs on GitHub":
|
||||
- "//github.com/pmarsceill/just-the-docs"
|
||||
|
||||
# Makes Aux links open in a new tab. Default is false
|
||||
aux_links_new_tab: false
|
||||
```
|
||||
|
||||
## Heading anchor links
|
||||
|
@ -41,8 +41,9 @@ nav_order: 4
|
||||
The specified `nav_order` parameters on a site should be all integers or all strings.
|
||||
Pages without a `nav_order` parameter are ordered alphabetically by their `title`,
|
||||
and appear after the explicitly-ordered pages at each level.
|
||||
To sort all Capital letters before lowercase letters,
|
||||
add `nav_sort: case_sensitive` in the configuration file.
|
||||
By default, all Capital letters are sorted before all lowercase letters;
|
||||
adding `nav_sort: case_insensitive` in the configuration file ignores case
|
||||
when sorting strings (but also sorts numbers lexicographically: `10` comes before `1`).
|
||||
|
||||
---
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user