Skip to content

(doc): use starlight for the doc #429

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

Open
Foxeye-Rinx opened this issue Oct 19, 2024 · 3 comments
Open

(doc): use starlight for the doc #429

Foxeye-Rinx opened this issue Oct 19, 2024 · 3 comments
Labels
enhancement New feature or request

Comments

@Foxeye-Rinx
Copy link
Contributor

Description

Astro doc is using starlight, It would be really nice if this plugin also uses it for:

  • Tabs:
    • Installation for [npm] | [pnpm]
    • Eslint config for [as of v9] | [legacy]
    • ...
  • Copy to clipboard button for code
  • Rule search
  • ...
@Foxeye-Rinx Foxeye-Rinx added the enhancement New feature or request label Oct 19, 2024
@ota-meshi
Copy link
Owner

ota-meshi commented Oct 20, 2024

Sounds good to me! Could you please send a PR?

@Foxeye-Rinx
Copy link
Contributor Author

Foxeye-Rinx commented Oct 21, 2024

I guess I will have to make a checklist/plan for myself and for people who want to track on this, I will use this comment as a todo list:

Settings up TODOs:

  • Create an experimental starlight repo for the eslint-plugin-astro's docs for previewing:
    https://67163f1fb2f973000825f201--eslint-plugin-astro-starlight-docs.netlify.app/

  • Add Github link on the new doc point to this repo

  • Use Astro's Gradient logomark on dark for favicon

    • 👆 The current favicon contrast is not suitable for dark theme
      The current one: image
  • Convert logo to a standalone SVG file

    • 👆 The starlight uses a standalone SVG file instead of an Astro component. While the eslint-plugin-astro use an Astro component for the logo, to remain it the same, need to create svg file with the same parameters
--color-base-blue: 212, 100%;
--color-blue: var(--color-base-blue), 61%;
--theme-text-accent: hsla(var(--color-blue), 1);
  • the SVG color: --theme-text-accent = hsla(212, 100%, 61%, 1) = #5AA6FF

  • the SVG size: width = height = 40px

  • Add edit-link config that match with this repo

  • make a PR for this repo

Make rules searchable

  • Done: the built-in search engine just work, I don't have to do anything

@ota-meshi
Copy link
Owner

ota-meshi commented Oct 21, 2024

Thank you!!!

Just to be clear, here are some things to know:

  • I don't have any preferences for the current website design. Feel free to change the colors and logo.

  • Demo/Playground(now I realize it's broken 😓 fixed! ) doesn't need to be embedded in the website anymore. We can link to the more flexible Playground instead.
    https://eslint-online-playground.netlify.app/#eslint-plugin-astro

  • We can also remove the Playground from the rules documentation (this is also now broken 😓 fixed!).
    If possible, it would be useful to use Twoslash ESLint instead of the Playground to see how the rules warn, but you don't need to include it in your initial PR.
    https://twoslash.netlify.app/packages/eslint

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants