Skip to content

Provide original markdown title in TOC#3024

Draft
ccjmne wants to merge 18 commits intogetzola:nextfrom
ccjmne:provide-original-markdown-in-toc
Draft

Provide original markdown title in TOC#3024
ccjmne wants to merge 18 commits intogetzola:nextfrom
ccjmne:provide-original-markdown-in-toc

Conversation

@ccjmne
Copy link
Copy Markdown
Contributor

@ccjmne ccjmne commented Nov 17, 2025

Provide original markdown title in TOC.

This commit introduces the "title_raw" property to the Heading struct,
so that the user may get adequately formatted entries in their table of
contents when the original title contains, for example, code highlight
content.

For example:

### The `<summary>` in the `<details>`

Would offer, in heading.title:

The <summary> in the <details>

And in the newly introduced heading.title_raw:

The <code>&lt;summary&gt;</code> in the <code>&lt;details&gt;</code>

Resolves #3023.


Sanity check:

  • Not already addressed by another ongoing PR
  • PR made against next?
  • Documentation updated?

Keats and others added 18 commits July 14, 2025 23:03
* Metainfo: Add 0.21.0

* Metainfo: Replace <developer_name> with <developer>

The developer_name tag is deprecated[1].

 [1]: https://freedesktop.org/software/appstream/docs/chap-Validation.html#asv-developer-name-tag-deprecated
* Update to 2024 edition

Includes fixing all `cargo clippy --workspace` warnings.

* Fix toml formatting
* Correctly remove footnote-reference from summary

This commit updates and fixes the regular expression to find and delete
footnote references in the pages' summaries.

fecc3cf introduces the desired behaviour.

6a2b890 broke the suppression of footnote-reference in the summary by
adding an id parameter to the <sup> elements for back-reference.

Fixes getzola#2961.

Ref: fecc3cf
Ref: 6a2b890
Ref: getzola#2961
Ref: https://zola.discourse.group/t/drop-footnote-references-from-summary-if-bottom-footnotes-true/2841/2

* Test suppression of footnote-reference w/ back-ref

Ref: 74fa93d
Ref: 6a2b890
- This is a required field for flathub metainfo check

Signed-off-by: Ayush Singh <ayush@beagleboard.org>
* Fix unwrap on checking timeout

* Cargo fmt first when testing (fail fast to save time)
* Add option to attach rel=external to external links

Ref: getzola#2717

* Write test for external_link_external option

Ref: getzola#2717

* Document external_links_external option

Ref: getzola#2717

* Mark external links with rel=external by default

Signed-off-by: Vincent Prouillet <balthek@gmail.com>
Ref: getzola#2969

* Update snapshots to reflect rel=external default

Ref: getzola#2969

---------

Signed-off-by: Vincent Prouillet <balthek@gmail.com>
Currently, a page filename beginning with a date must include a delimiter
(`_` or `-`) followed by a slug. That means `2018-10-10-hello-world.md`
works, but a date-only filename like `2018-10-10.md` is rejected.

This commit makes date-only filenames (e.g. `2018-10-10.md`) valid.

There is one configuration option that affects page name behavior:
`paths_keep_dates`. Here is the new behavior with this commit:

- paths_keep_dates = false
  - 2018-10-10.md -> [base_url]/2018-10-10
  - 2018-10-10-hello-world.md -> [base_url]/hello-world

- paths_keep_dates = true
  - 2018-10-10.md -> [base_url]/2018-10-10
  - 2018-10-10-hello-world.md -> [base_url]/2018-10-10-hello-world

Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
…ola#2938)

* Introduce -d|--debounce <VALUE> flag for serve

Let the file watcher use a configurable debounce value.

This commit preserves the (until now hard-coded) 1-second debounce value
as the default, but adds a new flag for the `serve` command, which lets
the user configure a debounce duration for consecutive rebuilds in watch
mode.

Closes getzola#2937.

Ref: getzola#2937
Ref: https://zola.discourse.group/t/watch-debounce-configuration/2666

* Document serve's --debounce flag in cli-usage.md

Ref: 6737349
Ref: getzola#2937
Ref: https://zola.discourse.group/t/watch-debounce-configuration/2666

* Explicitly prohibit --debounce 0

The `tick_rate` at which the debouncer library checks whether any events
should now be dispatched shouldn't be 0.  It cannot either be any
greater than the debounce rate itself.

Ideally, we may want to *disable* debouncing altogether when the user
passes --debounce 0, but that'd require a special case to be made in the
instrumentation, where we'd bypass the debouncer: that's another package
to depend on, and ultimately deemed no worth the hassle.

Ref: getzola#2937
Ref: https://zola.discourse.group/t/watch-debounce-configuration/2666

* Fix formatting style

The line was too long.  I pruned the /*tick_rate=*/ inline comment that
was indicating the name of the argument it was annotating, since it was
*the exception*: there are zero other occurrences of such notation
throughout this codebase.
This commit introduces the "title_raw" property to the Heading struct,
so that the user may get adequately formatted entries in their table of
contents when the original title contains, for example, code highlight
content.

For example:

    ### The `<summary>` in the `<details>`

Would offer, in heading.title:

    The <summary> in the <details>

And in the newly introduced heading.title_raw:

    The <code>&lt;summary&gt;</code> in the <code>&lt;details&gt;</code>

Ref: getzola#3023
@ccjmne ccjmne force-pushed the provide-original-markdown-in-toc branch from e887be2 to 9aa2e77 Compare November 17, 2025 22:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants