Skip to content
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

Redesign: Astro Starlight #160

Open
Indyandie opened this issue Jan 23, 2025 · 14 comments
Open

Redesign: Astro Starlight #160

Indyandie opened this issue Jan 23, 2025 · 14 comments

Comments

@Indyandie
Copy link
Collaborator

Indyandie commented Jan 23, 2025

Migrate the existing site to Astro Starlight.

@Indyandie
Copy link
Collaborator Author

Hey @Naramsim, what do you think about moving the site to astro starlight?

@Naramsim
Copy link
Member

Hi @Indyandie ! Were you that already submitted a similar PR? I'm sure someone already tried to re-make the website.

So, yes, the website is the most needed part of the service to be renovated. I'd like a solution that's gonna be maintained (is that astro popular?). We used react-static and that was a let-down for me, now it's unsupported.

The second thing that I think is necessary is the ability to write easily in Markdown and ahving it translated to HTML

Third, we might try to generate the website from the python code or the openapi schema.

But the first two points are a must I'd say. Honestly even a pure react or static site generator might be it. Next.js, or Gatsby or I don't know what's popular right now

@Indyandie
Copy link
Collaborator Author

Hmm... we might have discussed it in one of the pokeapi PRs, but I don't think I submitted a PR yet (I need to make some updates to the one I posted above).


I think Astro meets all your points, and it's framework agnostic.

One

I've been following Astro for a while (since it was snowpack) and it seems like a very popular meta framework for content sites and documentation. In the state JS 2024 (built with Astro) it made it to S tier as a meta framework along with SvelteKit, not sure if that means much 😅. All that to say I think it's popular and has a hopeful future.

Awesome Youtube Video

Two

Astro has great markdown support, it's one of the many reasons I like to use it. I think it works out of the box, and mdx is supported too.

Three

Starlight is an Astro theme created and maintained by the same team. It has it's own plugin system and one of the plugins (starlight-openapi) generates documentation page from an OpenAPI document. I used starlight-openapi in the example I put together.

@Naramsim
Copy link
Member

Hi @Indyandie, I checked out the source code at your fork. Did you use the very same files that are currently in the src folder?

I thought that we would have to start over with fresh new HTML/React/Astro files.

@Indyandie
Copy link
Collaborator Author

I tried to reuse as much as I could, but some stuff will probably need to be replaced. We can try to do a page comparison if that would be helpful. It shouldn't be to difficult though. 🤞

@Naramsim
Copy link
Member

I think we might as well start over from scratch. I think it's the best. I'd like to see some clean code.

@Indyandie
Copy link
Collaborator Author

@Naramsim just made some updates to the POC and moved it to a new sub-domain. poke.indieandy.cc

@Naramsim
Copy link
Member

Naramsim commented Jan 31, 2025

i added you as a contributor to this repo. Maybe you can merge the master branch to your branch and then push it here so we can work together!

@Indyandie
Copy link
Collaborator Author

Thanks @Naramsim! I created a branch in the repo and merge my changes there.

@Naramsim
Copy link
Member

Naramsim commented Feb 3, 2025

hi @Indyandie can you check my last commits? I tried deploying it at https://pokeapi.github.io/pokeapi.co/v2/ and somewhat works. But the sidebar links are broken. I cannot understand how to nest the website at /pokeapi.co/... correctly

@Indyandie
Copy link
Collaborator Author

Hey @Naramsim, I just made some tweaks to the workflow and astro config, the GitHub pages are very picky.

It looks like the links are working now. 🤞

@Naramsim
Copy link
Member

Naramsim commented Feb 4, 2025

Hi, I cleaned the MD files and made Astro work both locally and on GH Pages.

@Naramsim
Copy link
Member

Naramsim commented Feb 4, 2025

If you have time, could you add the footer to the website and the header links to home, api v2, graphql, about?

Thanks as always!

@Indyandie
Copy link
Collaborator Author

Hi @Naramsim. I added a very basic footer and header, let me know what you think.

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

No branches or pull requests

2 participants