Comments (14)
@DishanRajapaksha I added param named hideToc. Maybe you want to set this param like this
params.toml file
...
hideToc = true
...
@fandean Bro, I added the toc. You can replace enableToc to toc in params.toml file. Something like this. Now, enableToc and toc params are logically the same.
params.toml file
enableToc = true
toc = true
You can also use toc at front matter in your content md file.
---
...
tags:
- javascript
- programming
series:
-
categories:
-
toc: true
---
from hugo-theme-zzo.
Ok, It makes sense.
I'll add a param named hideToc
on params.toml file.
from hugo-theme-zzo.
Did you mean that you want to enable the Toc conditionally?
from hugo-theme-zzo.
Did you mean that you want to enable the Toc conditionally?
Yes. As in to set a default state, whether it is open or not. Currently, when it is enabled, it is open by default.
from hugo-theme-zzo.
I think it could be done by setting the front matter.
First, update the Zzo theme. I fixed a bug.
Next, set the enableToc Param at the front matter something like this
content/posts/mypost.md
---
title: "my post"
date: 2019-12-26T12:00:24+09:00
description: post desc
tags:
-
series:
-
categories:
-
enableToc: false
---
In this way, you can disable / enable the single page Toc
from hugo-theme-zzo.
Ah yes, I found that, thanks. What I'm talking about is another matter I'm afraid because it disables the Toc. Let me show you.
When we enable Toc and open a page, it looks like this right?
What I'm talking about is opening the page like this, so that a user can toggle the Toc.
from hugo-theme-zzo.
Hi,Can you use common parameters here? such as toc:false
from hugo-theme-zzo.
@fandean Did you mean change the enableToc to toc?
from hugo-theme-zzo.
yes
from hugo-theme-zzo.
Actually, I do want to change some param names to another,
Why I can't do this is because if I change the params name, other people who use the Zzo theme may conflict with their Hugo site until they change the params as we changed.
from hugo-theme-zzo.
The way I think about it is that some of the jekyll site themes I've used before support toc
to control the display of the TOC, so I think toc
is more general, and this is the first time this parameter has been discussed in a zzo theme
from hugo-theme-zzo.
I think that change the existing param name is not a good idea. Someone will get in trouble by the param. In case that if the toc is more general naming, then we can keep enableToc and toc both of them that behave the same role.
from hugo-theme-zzo.
OK
from hugo-theme-zzo.
@zzossig Thank you, that was fast 😄 I just checked, and it works just as I expected. Maybe we can close this issue?
from hugo-theme-zzo.
Related Issues (20)
- Deploy to Github page in subdirectory not work HOT 3
- found no layout file for "searchindex" for kind "page" HOT 2
- Replace `markdownify` with `.Page.RenderString`
- Typo at 'Getting Started' HOT 1
- Ability to define file name in code listing snippet
- Language dependent values in params.toml HOT 1
- favicon HOT 1
- How to modify the landing page? HOT 1
- Utterance comments does not work HOT 1
- Contact form netlify HOT 2
- SEO crucial issue with title HOT 1
- [Question] Change props of a specific theme
- Adapt zzo theme to SEO best practices
- Website title taken from languages.toml instead of config.toml
- Unable to change font color on slides
- Solution for a mobile icon for languages:
- add target="_blank" rel="noreferrer" to social links
- Missing comma
- Header title redirects to "/". But my home page is on"/blog", how can I change it. Please help. HOT 1
- WARN deprecated - hugo version v0.122.0-b9a03bd59d5f71a529acb3e33f995e0ef332b3aa+extended linux/amd64
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hugo-theme-zzo.