diff --git a/CHANGELOG.md b/CHANGELOG.md index e535364..206857c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,10 @@ # Docs0 Changelog +## 1.0.2 (2024-03-08) +- Add unlisted property + +## 1.0.1 (2024-03-02) +- Make hidden + ## 1.0.0 (2024-02-28) - Initial commit \ No newline at end of file diff --git a/README.md b/README.md index e04cd4d..049a1c3 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 <todo></todo> 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. diff --git a/_includes/nav b/_includes/nav index a8a497e..df398d2 100644 --- a/_includes/nav +++ b/_includes/nav @@ -1,6 +1,9 @@ {% 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 %} @@ -8,7 +11,7 @@ {% 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 %}
  • diff --git a/package.json b/package.json index ecc9441..b4ebf49 100644 --- a/package.json +++ b/package.json @@ -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"