Jeckyll theme Minima with automatic Javascript Breadcrumbs
Table of Contents
- Description
- Features
- Status
- Installation
- Configuration
- GH-Page content (folders and pages)
- Dependencies
- Documentation
- Screenshots
- Authors and License
- Code Contributors
Jeckyll theme Minima with automatic Javascript Breadcrumbs, Auto-TOC and Auto-Indexing
- works as designed
- no bugs
- Github Action for automated markdown indexing
- Github Action for automated TOC
- automated Breadcrumbs in GH-Pages
.github/workflows/ghp-markdown_index.yml
Create / Update markdown indexes for GH Pages
Github Marketplace Markdown action: create indexes
.github/workflows/repo-create_doctoc.yml
Create / Update Table of Contents
This is a GitHub Actions to generate TOC (Table of Contents), which executes DocToc and commits if changed.
gha-toc-generator (fork from technote-space)
Jekyll is a blog-aware, site generator written in Ruby. It takes raw text files, runs it through a renderer and produces a publishable static website. Perfect for Github Pages.
Jeckyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site’s presentation. Jekyll themes specify plugins and package up assets, layouts, includes, and stylesheets in a way that can be overridden by your site’s content.
Minima v3 It's Jekyll's default (and first) theme. It's what you get when you run jekyll new.
easy to use Javascript function, documentation comming soon.
Tip
see branch gh-pages as well as the content of .github/workflows
.
- via Github UI or
- command line
git branch gh-pages
git push -all
- Source
Deploy from a branch
- Branch
gh-pages
- folder
docs
Tip
Content modifications on Branch gh-pages will be automatically deployed from Github to gh-pages.
Automatical deployment via Github works only on branch gh-pages
Clone the repo and checkout branch gh-pages
git clone git@github.com:Zheng-Bote/gha-gh-pages_minima.git
git checkout gh-pages
In branch gh-pages
in folder docs
configure / customize file _config.yml
. For details see Minima v3
Create folder structure within folder docs
and add one or more markdown files.
Warning
Don't name your markdown files README.md
.
Filename README.md
is reserved for GH-Action automatic markdown indexing
Push your modification in branch gh-pages
back to your central Github respository
Note
If your GH-Pages in Settings
configured for branch gh-pages
, Github will deploy your pages automatically.
Otherwise you have to handle your GH-Pages deployment yourself
After content modifications and pushed back to your central GH repo, wait some time so the GH Actions can do their jobs.
.github/workflows/ghp-markdown_index.yml
Create / Update markdown indexes for GH Pages
Github Marketplace Markdown action: create indexes
.github/workflows/repo-create_doctoc.yml
Create / Update Table of Contents
This is a GitHub Actions to generate TOC (Table of Contents), which executes DocToc and commits if changed.
gha-toc-generator (fork from technote-space)
Jekyll is a blog-aware, site generator written in Ruby. It takes raw text files, runs it through a renderer and produces a publishable static website. Perfect for Github Pages.
Jeckyll has an extensive theme system that allows you to leverage community-maintained templates and styles to customize your site’s presentation. Jekyll themes specify plugins and package up assets, layouts, includes, and stylesheets in a way that can be overridden by your site’s content.
Minima v3 It's Jekyll's default (and first) theme. It's what you get when you run jekyll new.
Note
There is currently (2024-09) a bug in the Minima v3 theme so custom header content is not correctly parsed. See also Minima v3 issues.
Due to this bug, the Breadcrumb function is integrated within docs/_includes/header.html
<style>
ul.breadcrumb {
padding: 10px 16px;
list-style: none;
background-color: #eee;
}
ul.breadcrumb li {
display: inline;
font-size: 1rem;
}
ul.breadcrumb li+li:before {
padding: 8px;
color: black;
content: ">";
}
ul.breadcrumb li a {
color: #0275d8;
text-decoration: none;
}
ul.breadcrumb li a:hover {
color: #01447e;
text-decoration: underline;
}
</style>
<script>
window.onload = start;
function start() {
const url = window.location;
const origin = "{{ site.page_url }}/";
const path = url.pathname;
let a_arr = path.split("/");
let html = "false";
const arr = a_arr.filter(rmEmpty);
if (path.endsWith(".html")) {
arr.length = arr.length - 1;
}
const bread = document.getElementById("bread");
bread.innerHTML = `<li><a href="${origin}">Main</a>`;
if (a_arr.length === 0) {
return;
}
const uri_arr = [];
for (let i = 1; i < arr.length; i++) {
uri_arr.push(arr[i]);
let text = origin;
text += uri_arr.join("/");
if (i === arr.length - 1) {
if (path.endsWith(".html")) {
bread.innerHTML += `<li><a href="${text}">${arr[i]}</a></li>`;
} else {
bread.innerHTML += `<li>${arr[i]}</li>`;
}
} else {
bread.innerHTML += `<li><a href="${text}">${arr[i]}</a></li>`;
}
}
function rmEmpty(item) {
if (item.length > 0) {
return item;
}
}
}
</script>
.
├── .github
│ └── workflows
│ ├── ghp-markdown_index.yml
│ ├── repo-actions_docu.yml
│ ├── repo-create_doctoc.yml
│ └── repo-create_tree_readme.yml
├── README.md
├── docs
│ └── img
│ ├── screenshot_breadcrumbs_1.png
│ ├── screenshot_breadcrumbs_2.png
│ ├── screenshot_deployment.png
│ ├── screenshot_folder-structure.png
│ ├── screenshot_jeckyll_minima.png
│ ├── screenshot_markdown-indexes.png
│ ├── screenshot_minima.png
│ ├── screenshot_settings_pages.png
│ └── screenshot_toc.png
└── tree.bak
4 directories, 15 files
flowchart TD
A[Repo-Settings] --> B[Pages]
B-->C(Branch)-->D(Folder)
flowchart TD
A[Branch 'gh-pages'] --> B(add or modify content)
B --> C(push to GH Repo)
C-->D(Deployment)-->E[GH-Pages]
flowchart TD
A(push to central GH-Repo) --> B(Workflow 'markdown indexing')
B --> C(Workflow 'create ToC')
C-->D(GH Workflow 'pages-build-deployment')-->E[GH-Pages]
https://zheng-bote.github.io/gha-gh-pages_minima/
see also: https://www.github.com/Zheng-Bote/gha-gh-pages_minima
MIT License
Copyright (c) 2024 Zheng Robert
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
https://choosealicense.com/licenses/mit/
🖖