Skip to content

feat: publish the documentation and the card wizard from one Astro site - #489

Open
marcalexiei wants to merge 14 commits into
stats-organization:masterfrom
marcalexiei:docs-frontend-astro
Open

feat: publish the documentation and the card wizard from one Astro site#489
marcalexiei wants to merge 14 commits into
stats-organization:masterfrom
marcalexiei:docs-frontend-astro

Conversation

@marcalexiei

@marcalexiei marcalexiei commented Aug 16, 2026

Copy link
Copy Markdown

  • Turns apps/frontend into an Astro + Starlight site.
    Serves the docs at /frontend/docs and the card wizard at /frontend:
    one dev server, one build, one deploy, and no Python in vercel-preparation.sh or in the local setup.
  • The wizard becomes a page of that site: a React island on Starlight's splash layout,
    so it inherits the header, footer and search.
    Its own app bar, theme picker and Redux theme slice go away.
    Starlight writes the data-theme daisyUI already reads, so one control themes both halves.
  • The *.md sources move to apps/frontend/src/content/docs/docs/ with a title in
    frontmatter and Starlight's :::note asides, which lets Astro resolve their links and
    images natively (no markdown-conversion code of our own).
    starlight-links-validator then fails the build on a dead internal link.
  • packages/core/src/themes/README.md is generated into the site instead; README and CONTRIBUTING links follow the move.
  • Tailwind now shares a page with Starlight, so index.css declares the cascade-layer order
    (its utilities must outrank Starlight's reset) and scopes the app's element rules under
    .wizard, leaving the site chrome identical on both halves.

To try it out just run

pnpm --filter ./apps/frontend run dev

Wizard Documentation
Screenshot 2026-08-17 at 00 54 18 Screenshot 2026-08-17 at 00 54 25

@vercel

vercel Bot commented Aug 16, 2026

Copy link
Copy Markdown

@marcalexiei is attempting to deploy a commit to the martin-mfg's projects Team on Vercel.

A member of the Team first needs to authorize it.

@vercel

vercel Bot commented Aug 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
github-stats-extended-backend Ready Ready Preview Aug 19, 2026 8:09am

Request Review

@marcalexiei

Copy link
Copy Markdown
Author

I made few changes with the last commit (totally fine if you want to go ahead without them):

  • Splits the "Advanced Customization" page into smaller pages, grouped in the sidebar under two categories:
    • Cards: one page per card
    • Customization: Common Options, Theming, Available Themes, Locales and Aligning Cards
    image
  • Moved the options shared by every card out from under "GitHub Stats Card", where they were nested despite applying to all of them.
  • Redirects /frontend/docs/advanced_documentation/ to "Common Options" and both group paths to their first page, so published URLs do not hit 404.
  • Links each card title in the Overview page's "Card Types" section to that card's page.

@marcalexiei
marcalexiei requested a review from martin-mfg August 19, 2026 02:21

@martin-mfg martin-mfg left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I haven't completely reviewed all changes yet. But I reviewed most of them and don't want to keep you waiting longer for initial feedback.

Btw, good idea to go with Astro+Starlight instead of MkDocs. 👍

* Pages the wizard links to, named by the slug Starlight serves them under.
* Typed so renaming or dropping one turns every stale link into a compile error.
*
* @todo extract them statically from the config or other astro exports to build this dynamically.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should stay a todo for now?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Yes, I'll deal with this separately. There is already too much content here.

Comment thread apps/frontend/package.json Outdated
Comment thread apps/frontend/astro.config.ts Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Would it make sense to move packages/core/scripts two levels up, since this is not core-related anymore?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Sure, I moved it.
I'm thinking about do the same with all scripts across the repo so we can have them all in one place.

Comment thread .github/CONTRIBUTING.md

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think the links in this file should point to https://github-stats-extended.vercel.app/frontend/docs/..., because the target *.md files are not supposed to be read on GitHub anymore.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Done, all point at https://github-stats-extended.vercel.app/frontend/docs/....

Also fixed an unrelated stale link: ../backend/src/translations.js ➡️ ../packages/core/src/translations.ts.

Comment thread apps/frontend/index.html
<html lang="en">
<head>
<meta charset="utf-8" />
<link rel="icon" href="/favicon.ico" />

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

We're losing the favicon here. Not sure if any of the other stuff below is important.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

I restored the previous tags and the favicon now points the correct path.

We use caching to decrease the load on our servers (see <https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425>). Cards generated by [https://github-stats-extended.vercel.app/](https://github-stats-extended.vercel.app/frontend) are cached for a few hours or days, depending on server load. If you want the data on your cards to be updated more often you can [deploy your own instance](/frontend/docs/deploy/) and set [environment variable](/frontend/docs/deploy/#available-environment-variables) `CACHE_SECONDS` to a value of your choosing. Or you can use the [GitHub Action workflow](https://github.com/stats-organization/github-readme-stats-action).
We use caching to reduce the load on our servers (see [this discussion](https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425)).

Cards generated by [GitHub Stats Extended](https://github-stats-extended.vercel.app/frontend) are cached for a few hours to several days, depending on the current server load.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Cards generated by [GitHub Stats Extended]

The text should make it clear that the caching explanation only applies to our public deployment at github-stats-extended.vercel.app. Because self-hosted instances, the grs-action and using the npm package directly may behave differently.

@marcalexiei marcalexiei Aug 19, 2026

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Updated (I haven't update the text here, it's written this way in master).

We use caching to decrease the load on our servers (see <https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425>). Cards generated by [https://github-stats-extended.vercel.app/](https://github-stats-extended.vercel.app/frontend) are cached for a few hours or days, depending on server load. If you want the data on your cards to be updated more often you can [deploy your own instance](/frontend/docs/deploy/) and set [environment variable](/frontend/docs/deploy/#available-environment-variables) `CACHE_SECONDS` to a value of your choosing. Or you can use the [GitHub Action workflow](https://github.com/stats-organization/github-readme-stats-action).
We use caching to reduce the load on our servers (see [this discussion](https://github.com/anuraghazra/github-readme-stats/issues/1471#issuecomment-1271551425)).

Cards generated by [GitHub Stats Extended](https://github-stats-extended.vercel.app/frontend) are cached for a few hours to several days, depending on the current server load.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

depending on the current server load

This sounds like we have a some dynamic logic in place for caching duration. In reality I have manually adapted the cache timing a few times over the past month.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Adjusted the text (I haven't update the text here, it's written this way in master).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

In both examples on this page, the cards are actually shown below each other, which defeats the purpose:

Image

Could we use narrower cards here or get them into the same row in another way?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Should be good to go now

## Responsive Card Theme

[![Anurag's GitHub stats-Dark](https://github-stats-extended.vercel.app/api?username=anuraghazra&show_icons=true&theme=dark#gh-dark-mode-only)](https://github.com/stats-organization/github-stats-extended#responsive-card-theme#gh-dark-mode-only)
[![Anurag's GitHub stats-Light](https://github-stats-extended.vercel.app/api?username=anuraghazra&show_icons=true&theme=default#gh-light-mode-only)](https://github.com/stats-organization/github-stats-extended#responsive-card-theme#gh-light-mode-only)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The theming via #gh-dark-mode-only/#gh-light-mode-only doesn't work here.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The section header now uses <picture>, and the GitHub-only technique says why it has no live preview.
The copyable snippet is unchanged.

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.

Publish documentation from release instead of master

2 participants