Skip to content

Commit

Permalink
Doc0 v1.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
danieleperilli committed Mar 8, 2024
1 parent a4fdf93 commit 3e6284d
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
# Docs0 Changelog

## 1.0.2 (2024-03-08)
- Add unlisted property

## 1.0.1 (2024-03-02)
- Make <todo> hidden

## 1.0.0 (2024-02-28)
- Initial commit
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ Every file must contain a header (Front Matter) in the following format (note th
next_title: Document title in Next Reading section
body_class: Document body CSS class name
published: true
unlisted: false
draft: false
nodraft: false
date: 2021-11-15
Expand Down Expand Up @@ -109,7 +110,8 @@ Parameters:
- **menu_title:** (optional) set a title for the navigation menu, if you want to make it different from the main title.
- **next_title:** (optional) set a title for the ***Next Reading*** section of the pages, if you want to make it different from the main title.
- **body_class:** (optional) set a custom CSS class for the body of the document.
- **published:** set ***true*** to display the document on the website
- **published:** set ***true*** to display the document on the website.
- **unlisted:** set ***true*** to hide the document from the navigation menu.
- **draft:** (optional) set ***true*** to show a notice that the document is not completed (note that this notice appears automatically if the document is empty or if it contains a &lt;todo&gt;&lt;/todo&gt; tag. Set ***nodraft: true*** to avoid displaying the notice.
- **date:** set the creation date of the document.
- **modified:** set the date of the last modification of the document.
Expand Down
5 changes: 4 additions & 1 deletion _includes/nav
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{% assign sorted_pages = include.pages | sort: "order" %}
{% for _page in sorted_pages %}
{% unless _page.redirect %}
{% if _page.unlisted %}
{% continue %}
{% endif %}
{% assign page_url = _page.url | replace: "/index", "/" %}
{% assign page_url_parts = page_url | split: "/" %}
{% assign page_level = page_url_parts | size | minus: 1 | at_least: 0 %}
{% assign page_file = _page.url | split: "/" | last %}

{% assign include_url_size = include.url | size %}
{% assign page_url_sub = page_url | slice: 0, include_url_size %}

{% if page_url_sub == include.url and page_level == include.level %}
<li id="p-{{ _page.url | slugify }}" class="l{{ include.level }} url_{{ _page.url | remove: "index" }}">

Expand Down
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.0.1",
"lastUpdated": "2024-02-28",
"version": "1.0.2",
"lastUpdated": "2024-03-08",
"scripts": {
"run (incremental)": "bundle exec jekyll serve --incremental --port 4001",
"run (full)": "bundle exec jekyll serve --port 4001"
Expand Down

0 comments on commit 3e6284d

Please sign in to comment.