Comments (4)
Anyone, just need to know something is on the road map otherwise I can modify source on my side.
from hyde.
Hi,
It works fine for me.
You can test it with the basic template.
-
Create a new site with the basic template
hyde -s ~/test create
-
Edit site.yaml and add this at the root level (this is the part you are missing I think)
markdown:
extensions:
- toc
-
Edit about.html and add this below the meta data:
[TOC] # Header 1 ## Header 2 ## Header 22
Now if you generate the site, you should see the TOC generated nicely.
from hyde.
Thanks a lot and sorry for troubling on this small issue which finally worked out .
cheers
from hyde.
I found this issue post when searching for information regarding similar troubles with getting the [TOC]
construct to work. If anyone else finds this same thread, I can mention that my problems had to do with that the default Hyde setting of the Jinja2 templating engine sets trim_blocks = True
.
From the Jinja2 documentation:
trim_blocks
If this is set to True the first newline after a block is removed (block, not variable tag!). Defaults to False.
Because of this, the following does not work:
{% mark excerpt -%}
Dummy excerpt.
{%- endmark %}
[TOC]
After the whitespace gobbling by trim_blocks
, [TOC]
will be interpreted as being a continuation of the Dummy excerpt
paragraph and will not be rendered as a special command.
However, this works:
{% mark excerpt -%}
Dummy excerpt.
{%- endmark %}
[TOC]
It is thus easily worked around, but it was not immediately apparent where the problem lay.
from hyde.
Related Issues (20)
- SyntaxError on raising exception, invalid syntax HOT 1
- RFC: Enable branch protection on master HOT 3
- Tests involving Pygments are fragile
- Hyde themes/templates HOT 7
- Python Markdown attr_list syntax ignored by hyde
- 400 bad message error HOT 1
- Missing context-variables documentation
- Publisher documentation is 404 HOT 1
- Is this project no longer maintained? HOT 7
- HydeException, traceback error on python 3.8 (mac and windows) HOT 3
- Replace Nose tests
- Convert setup.py to modern standards
- Convert Tox integration to nox
- Convert Travis CI to Github Actions
- Add documentation about developing version 1.0.0
- Look into Deepsource for coverage/CVE scans
- should python-dateutil be listed as a dependency?
- I installed hyde, but the commands don't work. HOT 2
- "Error occured when calling imagethumbnails" message HOT 1
- SyntaxError when trying to create website HOT 2
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 hyde.