HiDeoo / starlight-blog

Starlight plugin to add a blog to your documentation
https://starlight-blog-docs.vercel.app
MIT License
159 stars 21 forks source link

Option for Authors page #85

Closed annedorko closed 1 month ago

annedorko commented 1 month ago

Is your feature request related to a problem?

Every blogging platform I know of allows the reader to browse posts by author, so far this plugin does not support that.

Describe the solution you'd like

Even if they are not automatically linked to within posts, I would love to have the option to treat authors like a unique type of tag so it's easy to browse by author from the sidebar to see just posts by that author.

Describe alternatives you've considered

I'd have to build my own solution, which, is not impossible but this feels like a fundamental blog feature and I'd rather not do a bunch of overrides that may break the plugin's functionality in future updates.

Additional Context

I noted at least one other person requested an author page, which was declined, so I am voicing my interest. At least for my use-case, I don't even need an author page so much as a carbon-copy of the tags functionality as seen in the sidebar that links to that tag's archive page, but made to work with authors.

I do not need it integrated into the existing author displays, as I can manually link to the author archive page if I want their name directed there instead of a website.

HiDeoo commented 1 month ago

Thanks for the feedback :raised_hands: Like I mentioned in the previous feature request, nothing is really set in stone and your comment was really helpful to re-evaluate the interest.

Author pages should now be available in the version 0.13.0 that I just released, e.g. this one. Authors are now also listed in the sidebar if there are multiple authors.

annedorko commented 1 month ago

This is fantastic!! Thank you so much, I'm already using it.

In case it's helpful I wanted to share how I'm adding author links in astro.config.mjs that work both in development and production environments, since author links must be valid URLs:

const prodURL = "https://EXAMPLEDOMAIN.com";
const devURL = "http://localhost:4321";
const siteURL = import.meta.env.DEV ? devURL : prodURL;

And then in the authors list:

authors: {
            pippin: {
              name: "Pippin",
              url: siteURL + "/quests/authors/pippin",
            },
}

...quests just happens to be my prefix, for others that would be blog or whatever their prefix is.