Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore teaser headline in table of contents #2558

Merged
merged 1 commit into from
Jul 22, 2020

Conversation

lsolesen
Copy link
Contributor

@lsolesen lsolesen commented Jun 8, 2020

If you use archive-single.html on e.g. a single page, then the TOC will break. One solution is to no include the H2 deliverede by archive-single.html in the TOC.

This is a bug fix.

Summary

When using this to include posts in another post:

{% assign site_posts = site.routes | where: "tags", "børnevenlig" | sort: "title" %}

{% if site_posts.size > 0 %}
  {% for post in site_posts %}
    {% include archive-single.html %}
  {% endfor %}
{% endif %}

I end up with this TOC:

Screenshot (27)

Context

Copy link
Collaborator

@iBug iBug left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks OK to me.

@mmistakes mmistakes changed the title Do not include in toc Ignore teaser headline in table of contents Jul 22, 2020
@mmistakes mmistakes merged commit 4f8e2b4 into mmistakes:master Jul 22, 2020
mzaffran pushed a commit to mzaffran/mzaffran.github.io that referenced this pull request Jan 4, 2021
kaitokikuchi pushed a commit to kaitokikuchi/kaitokikuchi.github.io that referenced this pull request Sep 4, 2023
chukycheese pushed a commit to chukycheese/chukycheese.github.io that referenced this pull request Sep 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants