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

Hyperlink blog post h1 title on index to post #4545

Closed
4 tasks done
jonaharagon opened this issue Oct 24, 2022 · 7 comments
Closed
4 tasks done

Hyperlink blog post h1 title on index to post #4545

jonaharagon opened this issue Oct 24, 2022 · 7 comments
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open

Comments

@jonaharagon
Copy link
Sponsor

Contribution guidelines

I want to suggest an idea and checked that ...

  • ... to my best knowledge, my idea wouldn't break something for other users
  • ... the documentation does not mention anything about my idea
  • ... there are no open or closed issues that are related to my idea

Description

Clicking a post title on the blog's index page should open that blog post.

I wonder if this is difficult because the post title is just part of the Markdown page content, but I've clicked the post headline only for it to do nothing enough times to warrant requesting this.

Use Cases

This is how every other blog works, it's the expected UX I think.

Screenshots / Mockups

No response

@squidfunk
Copy link
Owner

Thanks for suggesting. This is a reasonable request. It's not simple, because the blog index pages may contain any content that is before the post separator, so there doesn't even need to be an h1, but we can certainly try to add support for this. We will likely need to parse the resulting HTML of each blog post and wrap each h1 with a link.

@squidfunk squidfunk added the change request Issue requests a new feature or improvement label Oct 25, 2022
@squidfunk
Copy link
Owner

Added links to posts in squidfunk/mkdocs-material-insiders@b2c8cdac4. I've not added this as an option but by default, but if other users with to disable this behavior, we could retrofit an option for this. The commit also fixes an issue where assets are not correctly linked due to caching. After all, caching post excerpts to be reused in archive and category indexes is not feasible, because URLs are completely configurable, so caching was removed as well.

@squidfunk squidfunk added the resolved Issue is resolved, yet unreleased if open label Nov 1, 2022
@squidfunk
Copy link
Owner

Released as part of 8.5.8+insiders-4.26.2.

@hellt
Copy link
Contributor

hellt commented Nov 4, 2022

@squidfunk
Is it expected that only the permalink icon is clickable, and not the title string?
2022-11-04_11-56-57 (1)

@squidfunk
Copy link
Owner

@hellt no, the whole title as on our blog. Ensure that you upgraded correctly.

@hellt
Copy link
Contributor

hellt commented Nov 4, 2022

@squidfunk I upgraded correctly, using the unmodified container build procedure.
I think this might have something with the way that I still have permalink marker and your blog doesn't. Need to figure out how to disable it maybe?

@hellt
Copy link
Contributor

hellt commented Nov 4, 2022

@squidfunk
yes, I had an outdated (?) configuration for the custom toc char:
image
this change fixed it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
change request Issue requests a new feature or improvement resolved Issue is resolved, yet unreleased if open
Projects
None yet
Development

No branches or pull requests

3 participants