Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

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

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

Already on GitHub? # to your account

TOC error with more than one H1 #2892

Closed
Gravy59 opened this issue Mar 28, 2021 · 2 comments
Closed

TOC error with more than one H1 #2892

Gravy59 opened this issue Mar 28, 2021 · 2 comments

Comments

@Gravy59
Copy link

Gravy59 commented Mar 28, 2021

Environment

  • Minimal Mistakes version: 4.22.0
  • Ruby gem or remote theme version: github-pages 213
  • Jekyll version: 3.9.0
  • Git repository URL: gravy59/gravy59.github.io
  • GitHub Pages hosted (if yes provide URL to site): gravy59.github.io
  • Operating system: Windows 10 19042.867 (20H2)

Expected behavior

I just want my TOC to work properly but when I open up the tutorials/stars in blender page the first H1 and beyond is correct but the second H1 and subsequent paragraphs are unformatted. A quick inspection in the compiled html shows that the li is outside of the ul.

Steps to reproduce the behavior

Set up a TOC with more than one H1 (#) and the extra paragraphs are not formatted.

@iBug
Copy link
Collaborator

iBug commented Mar 29, 2021

The generated HTML contains quite some strange markup. This needs further investigations.

<nav class="toc">
<header><h4 class="nav__title"><i class="fas fa-clipboard-check"></i> Steps</h4></header>
<ul class="toc__menu">
	<li>
		<a href="#creating-basic-stars">Creating Basic Stars</a>
		<ul>
			<li>
				<a href="#setting-up-the-scene">Setting up the scene</a>
			</li>
			<li>
				<a href="#shading-the-stars">Shading the stars</a>
			</li>
		</ul>
	</li>
</ul>
</li>
<li>
	<a href="#creating-a-milky-way">Creating a Milky Way</a>
	<ul>
		<li>
			<a href="#putting-stars-on-the-milky-way">Putting stars on the Milky Way</a>
		</li>
		<li>
			<a href="#adding-the-milky-way-to-the-scene">Adding the Milky Way to the scene</a>
		</li>
	</ul>
</li>
</ul>
</li>
</ul>
</nav>

For the record, the page is https://gravy59.github.io/tutorials/stars-blender/ (Wayback Machine) and the source file is stars-blender.md (Wayback Machine).

@iBug
Copy link
Collaborator

iBug commented Mar 29, 2021

OK not too hard to find out. This is the offending content:

# Creating Basic Stars
### Setting up the scene
### Shading the stars
# Creating a Milky Way
### Putting stars on the Milky Way
### Adding the Milky Way to the scene

You need to use contiguous levels of headings so as not to confuse the TOC generator. "Upgrading" the H3's to H2's produces expected layout for me.

# Creating Basic Stars
## Setting up the scene
## Shading the stars
# Creating a Milky Way
## Putting stars on the Milky Way
## Adding the Milky Way to the scene

iBug added a commit to iBug/minimal-mistakes that referenced this issue Mar 29, 2021
mjt91 pushed a commit to mjt91/mjt91-blog-backup that referenced this issue Jun 23, 2021
Repository owner locked and limited conversation to collaborators Jun 28, 2021

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Projects
None yet
Development

No branches or pull requests

3 participants