diff --git a/README.md b/README.md index a79b849..4c002ed 100644 --- a/README.md +++ b/README.md @@ -6,13 +6,16 @@ Forked from [knadh](https://github.com/knadh/hugo-ink) with custom adjustments. ## Ink-Free vs Hugo-Ink -This repository is a purely local (i.e., no CDNs), simplified version of `hugo-ink` with several **simplifications** for the sake of privacy: +This repository is a purely local (i.e., no CDNs[^1]), simplified version of `hugo-ink` with several **simplifications** for the sake of privacy: - Removed all references to Google's font-CDN - Removed Analytics code, even if it was controlled by a variable As well as some additional **features**: - Added a Back button to all posts -- Added a TOC, controlled by a variable, to all posts +- Added a Table of Contents (TOC), controlled by a variable, to all posts + - The TOC can either be static at the top + - Or floating on the side + - Added a word count, tags, and an approximate read time to the overview - Added random footer messages - Added "Edit this on GitHub" button @@ -26,15 +29,20 @@ And some **bugfixes**: - Change the background color for Syntax Highlighting, otherwise we're looking at grey code on a grey background - Added some classes for a Back button -It is also missing some features, which might be added later: -- Dark mode - ## Demo -![Screenshot](https://raw.githubusercontent.com/chollinger93/ink-free/master/images/screenshot.png "Ink-Free theme") +### Overview + +![Screenshot](https://raw.githubusercontent.com/chollinger93/ink-free/master/images/screenshot.png "Ink-Free theme") ![Screenshot](https://raw.githubusercontent.com/chollinger93/ink-free/master/images/screenshot2.png "Ink-Free theme") +### Static vs Floating TOC + +![image-20230620114414684](images/floating_toc.png) + +![image-20230620114454738](images/static_toc.png) + ### Run the example ``` cd exampleSite @@ -110,3 +118,5 @@ EOF ## License Licensed under the MIT license. + +[^1]: Note that the Feather CDN can still be enabled, but you can also host it statically. diff --git a/exampleSite/config.toml b/exampleSite/config.toml index 154c456..0e32f72 100644 --- a/exampleSite/config.toml +++ b/exampleSite/config.toml @@ -22,8 +22,10 @@ copyright = "© Copyright notice" # Site color - dark/light/auto mode = "auto" - # Enable a table of contents - toc = true + # Enable a table of contents: + # Either "static"/true, "floating", or "none" + # The floating TOC dissapears on mobile and adds 200px vertical space + toc = "floating" # Max tags maxTags = 7 diff --git a/exampleSite/content/posts/post-8.md b/exampleSite/content/posts/post-8.md index ff0303c..33db67d 100644 --- a/exampleSite/content/posts/post-8.md +++ b/exampleSite/content/posts/post-8.md @@ -1,6 +1,6 @@ --- title: "Markdown Syntax Guide" -date: "2021-09-03" +date: "2023-06-20" description: "Sample article showcasing basic Markdown syntax and formatting for HTML elements." tags: [markdown, css, html, themes] categories: [themes, syntax] @@ -13,7 +13,6 @@ This article offers a sample of basic Markdown syntax that can be used in Hugo c The following HTML `