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

Added optional rendering of code block titles #148

Merged
merged 28 commits into from
Jul 1, 2022

Conversation

geoffreygarrett
Copy link
Contributor

Hi,

I added something I put together for my notes website. It's an optional feature to render code titles for code blocks. The steps to enable them are:

  1. add enableCodeBlockTitle: true to data/config.yaml
  2. add title=<title> attribute to code block as demonstrated here with other attributes available in hugo.

An afterthought: Perhaps a little extra should be added to the documentation for setting the title via highlight shortcode and markdown code fences.

code-title

@jackyzha0
Copy link
Owner

Woah this looks great! Would love to have this feature. Could you add documentation for using this feature as well? Happy to merge as soon as you do

Copy link
Owner

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

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

this is great, just a few comments on documentation!

assets/styles/code-title.scss Outdated Show resolved Hide resolved
assets/styles/code-title.scss Show resolved Hide resolved
content/notes/config.md Outdated Show resolved Hide resolved
content/notes/config.md Outdated Show resolved Hide resolved
content/notes/config.md Outdated Show resolved Hide resolved
content/notes/config.md Outdated Show resolved Hide resolved
@geoffreygarrett
Copy link
Contributor Author

geoffreygarrett commented Jun 29, 2022

Everything seems to be in order. The only unresolved comment was the use of variables from the custom.scss file @jackyzha0. I looked into using ExecuteAsTemplate as you suggested (#149), and it did yield some results, but there seems to be some some collisions between :root and the dark scope. I think swapping out the style sheets entirely using a script may be the solution there.

@geoffreygarrett
Copy link
Contributor Author

Everything seems to be in order. The only unresolved comment was the use of variables from the custom.scss file @jackyzha0. I looked into using ExecuteAsTemplate as you suggested (#149), and it did yield some results, but there seems to be some some collisions between :root and the dark scope. I think swapping out the style sheets entirely using a script may be the solution there.

ftr, separate syntax styling was added successfully.

@jackyzha0
Copy link
Owner

pushed a few changes to master, do you mind bringing your branch up to date + resolving merge conflicts?

Copy link
Owner

@jackyzha0 jackyzha0 left a comment

Choose a reason for hiding this comment

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

small question, rest looks good! excited to merge this soon

assets/js/darkmode.js Outdated Show resolved Hide resolved
@geoffreygarrett
Copy link
Contributor Author

Had a delay there thanks to load shedding and a concern that I might have broken something. I now confirmed that it's not just my branch, but also yours (#154).

This is all ready for you to merge, if everything works well on your side.

@jackyzha0 jackyzha0 merged commit d3e20b8 into jackyzha0:hugo Jul 1, 2022
j0nesma pushed a commit to j0nesma/quartz that referenced this pull request Sep 22, 2023
tomoyanonymous pushed a commit to tomoyanonymous/quartz-research-note that referenced this pull request Oct 20, 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.

None yet

2 participants