Skip to content

Contributing features #41

Description

@ncreep

Hi,

Thanks for a great theme!
It made deciding to migrate away from the Hashnode platform that much easier.

In the process of migration I stumbled on some issues and features that I wanted, which I fixed/implemented in a private fork.
If there's interest in some of them, I'd be happy to contribute any of them back to this repo.

All the features described below are implemented in my blog, which can be found here.

Issues

  1. The RSS feed calls getCollection directly instead of getSortedPosts, which means that posts might get displayed out of order, and that drafts will be published is RSS.
  2. The description in the RSS is not consistent with the preview: it doesn't use remarkPluginFrontmatter.description as a fallback.
  3. The RSS feed doesn't limit the number of posts that get published, which might be a problem as the blog grows.
  4. The prev/next variables for the "More Posts" section are logically reversed (doesn't really matter as is, but I stumbled on it when adding visual indication for it as per feature: add next and previous html buttons #21).
  5. The scrolling logic for the TOC overtakes all internal links, including footnotes. The scrolling code doesn't preserve jump history, which I find a bit less ergonomic when jumping to footnotes (I often hit the "back" button to get back to the main text). In my fork I enabled smooth scrolling globally for the site, and removed the TOC logic. This works the same, but preserves history.

Features

  1. Adding the post cover image (if available) to the post preview.
  2. Embedding the post cover image into the social-cards (getting the image reference turned out surprisingly hacky, maybe I'm missing something)
  3. Adjusting the frame and text size in social-cards to make them look more consistent with longer titles (see here for example).
  4. Normalizing the images before embedding them in the card (e.g., convert to png, with a fixed size and compression).
  5. A "blog series" feature (inspired by Hashnode), where if a blog is part of a series we show a preview of the whole series of posts instead of "More Posts" (see the bottom of the post here).
  6. Adding a custom.css file imported from global.css as a placeholder for users to customize the theme.
  7. Subtle prev/next indicators in "More Posts" (here, though I can imagine a nicer design for that).
  8. Added an RSS button among the social buttons at the bottom.
  9. Made the TOC optional (disabled by default in my case)

Interactive Features

The following interactive features were implemented with the help of alpine.js:

  1. A "share" button (inspired by Hashnode), which pops up a menu with buttons to copy the post URL, or open a sharing link in other platforms.
  2. Highlighting the current heading in the TOC while scrolling the page.
  3. A "back to top" button.

Thanks again!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions