Skip to content

Commit

Permalink
Docs0 v1.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleperilli committed Oct 13, 2024
1 parent 72e5111 commit 3874adc
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 8 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Docs0 Changelog

## 1.1.3 (2024-10-13)
- Hide redirects and unlisted pages from "Next Reading" list and search index

## 1.1.2 (2024-10-06)
- Improve PDF generation

Expand Down
13 changes: 9 additions & 4 deletions _includes/next
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,15 @@
{% assign branch_level = page_url_branch_parts | size | minus: 1 | at_least: 0 %}
{% assign page_file = _page.url | split: "/" | last %}

{% if page_url_root == this_page_url and page_url != this_page_url and branch_level == 1%}
<li>
<a href="{{ page_url }}">{% if _page.next_title %}{{ _page.next_title }}{% else %}{{ _page.title }}{% endif %}</a>{% if _page.description %}: {{ _page.description }}{% endif %}
</li>
{% if page_url_root == this_page_url and page_url != this_page_url and branch_level == 1 %}
{% unless _page.redirect %}
{% if _page.unlisted %}
{% continue %}
{% endif %}
<li>
<a href="{{ page_url }}">{% if _page.next_title %}{{ _page.next_title }}{% else %}{{ _page.title }}{% endif %}</a>{% if _page.description %}: {{ _page.description }}{% endif %}
</li>
{% endunless %}
{% endif %}
{% endfor %}
{% endcapture %}
Expand Down
4 changes: 4 additions & 0 deletions assets/_sass/_markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,10 @@
width: 100%;
overflow: auto
}
.wide table, table.wide {
display: table;
width: 100%;
}

table th {
font-weight: 600
Expand Down
4 changes: 2 additions & 2 deletions assets/scripts/fuse-index.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
---
var searchIndex = [{% for collection in site.collections %}{% assign colsize = collection.files | size %}{% if colsize > 0 %}{% for page in site[collection.label] %}{% unless page.unlisted %}
var searchIndex = [{% for collection in site.collections %}{% assign colsize = collection.files | size %}{% if colsize > 0 %}{% for page in site[collection.label] %}{% unless page.unlisted %}{% unless page.redirect %}
{
"id": "{{ page.id | slugify }}",
"url": "{{ page.url | remove: 'index.html' }}",
"title": "{{ page.title }}",
"content": `{{ page.content | strip_html | newline_to_br | replace: '<br />', ' ' | strip_newlines | remove:'"' | remove:'`' }}`
}{% endunless %}{% unless forloop.last %},{% endunless %}{% endfor %}{% endif %}{% endfor %}
}{% endunless %}{% endunless %}{% unless forloop.last %},{% endunless %}{% endfor %}{% endif %}{% endfor %}
];
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Docs0",
"version": "1.1.2",
"lastUpdated": "2024-10-06",
"version": "1.1.3",
"lastUpdated": "2024-10-13",
"scripts": {
"run (incremental)": "bundle exec jekyll serve --incremental --port 4001",
"run (full)": "bundle exec jekyll serve --port 4001",
Expand Down

0 comments on commit 3874adc

Please sign in to comment.