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

Allow Overriding of ToC #329

Merged
merged 1 commit into from
Mar 30, 2021
Merged

Conversation

JannikArndt
Copy link
Contributor

Motivation: I'd like to use the title of a post as the title of the ToC as well (since I have it floating left of the text).

Problem: The "outer" part of the ToC (which includes the title) is currently defined in the single.html, and only the <ul> is defined in the toc.html-partial.

This PR moves the complete html-code of the ToC into the toc.html partial.

  • note: The condition if the ToC is displayed stays inside the single.html, to be consistent with with other conditional partials comments and share_icons.
  • note: I did not re-indent the toc.html to keep the diff easier. If you prefer proper indentation, I'll gladly do that 👍

@kdkasad
Copy link
Contributor

kdkasad commented Mar 28, 2021

This PR moves the complete html-code of the ToC into the toc.html partial.

I like this idea.

  • note: I did not re-indent the toc.html to keep the diff easier. If you prefer proper indentation, I'll gladly do that +1

I'd say add the proper indentation but keep it as a separate commit. That way it's still easy to see what's changed by just not looking at that commit (or by using git diff -w).

Copy link
Contributor

@kdkasad kdkasad left a comment

Choose a reason for hiding this comment

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

Everything looks good except for that one style change. Testing all looks fine; nothing else seems to break.

@@ -210,7 +210,7 @@
display: block;
margin: auto 0;
padding: 10px;
color: rgba(255, 255, 255, .8);
color: var(--primary);
Copy link
Contributor

@kdkasad kdkasad Mar 28, 2021

Choose a reason for hiding this comment

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

This change breaks the text color of code blocks in light mode.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Arg, I should not have used my master branch for the PR 🙈 I reverted this change there 👍 (b46ada5)

Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks! It might make sense to rebase on top of upstream's master, so there aren't two extra commits, but that's up to you and/or @adityatelange.

@JannikArndt
Copy link
Contributor Author

I'd say add the proper indentation but keep it as a separate commit.

Done in 8d3c7fd 👍

@kdkasad
Copy link
Contributor

kdkasad commented Mar 28, 2021

I'd say add the proper indentation but keep it as a separate commit.

Done in 8d3c7fd

Awesome, thanks! I ran git diff -w and it shows that only whitespace has changed, so even though it's a large commit, it's all good.

Copy link
Contributor

@kdkasad kdkasad left a comment

Choose a reason for hiding this comment

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

Everything looks good now. No side effects appeared during testing.

I say it's ready to merge.

Fix color of "Name" class in Code Highlighting

Revert "Fix color of "Name" class in Code Highlighting"

This reverts commit a94d424.

Fix indentation
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@JannikArndt
Copy link
Contributor Author

Haha, I usually just click the green "Squash and Merge" for this, but okay, I gathered all my git knowledge and did a rebase 🤪

If you ask GitHub to hide whitespace changes, it shows the actual changes pretty well:
image

@adityatelange adityatelange merged commit 6d6fe2c into adityatelange:master Mar 30, 2021
kylethedeveloper pushed a commit to kylethedeveloper/hugo-PaperMod that referenced this pull request Feb 21, 2023
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.

3 participants