QuiltMC / quiltmc.org

The source for quiltmc.org
https://quiltmc.org
Other
58 stars 46 forks source link

add header links for the blog #155

Open ix0rai opened 11 months ago

ix0rai commented 11 months ago

blog posts should have a clickable permalink button that appears when the header is hovered, just like the one on the Team Listings page. the permalink button on the team listings page

Akarys42 commented 11 months ago

I remember looking at it back in the days, but I just couldn't figure out why rehype-autolink-headings didn't run on the blog posts. To me, all conditions appear satisfied, the headings are indeed headings and have a unique ID each.

https://github.com/QuiltMC/quiltmc.org/blob/fd0b99aedf508f877e1c1f5c9d234683bec91dea/astro.config.ts#L17-L20

It would also be a good time to add an "Edit on GitHub" link at the bottom like on the other pages, that shouldn't be too complicated to add to the template (it inherits from Default instead of Page). Here is how it is done: https://github.com/QuiltMC/quiltmc.org/blob/fd0b99aedf508f877e1c1f5c9d234683bec91dea/src/layouts/Page.astro#L17 https://github.com/QuiltMC/quiltmc.org/blob/fd0b99aedf508f877e1c1f5c9d234683bec91dea/src/layouts/Page.astro#L52-L61

ix0rai commented 11 months ago

thank you for the insight! I'm not sure "edit on github" buttons are a great fit for the blog since they're not meant to be dynamic pages, they're kinda supposed to be posted once and left unchanged unless they need corrections

Akarys42 commented 11 months ago

I feel like that might be useful for typos and such but yeah fair.

Southpaw1496 commented 11 months ago

It would also be a good time to add an "Edit on GitHub" link at the bottom like on the other pages

I feel like these sorts of buttons are best for documentation sites where there's an emphasis on community contributions and additions for the site. While we obviously appreciate community contributions, I don't think that they're really a focus for the site to the point where we need a button (with the possible exception of translations, but we don't have a proper system for that yet).

Additionally, while my experience with GitHub's editor is limited, I don't think it's up for the job of handling many of the more complex pages, and the changes it makes when it doesn't know what it's doing (not respecting indentation in many cases) will just make pull requests harder to review and correct.