Reduce website/ to the docs content - #2436
Conversation
The docs at the-guild.dev/graphql/apollo-angular are now built and deployed by the-guild-org/website, which fetches this folder at build time. Everything that only existed to build a standalone Nextra site is removed: the Next.js app, its config and components, the website workspace with its dependencies, and the deploy workflow. What stays is content only: content/ (Nextra _meta files become meta.json, H1s become frontmatter titles, @theguild/components imports are gone) and the images under assets/. Two workflows tell the website repo about changes: notify-website redeploys on merges to master, docs-preview requests a preview deployment for pull requests that touch website/. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
1e2559b to
0e4ad5f
Compare
|
I'm glad that this drop the build system from our lockfile, and overall simplifies the structure of this project 馃憤 But am I right in thinking there is no way to preview the website locally easily ? and I should instead use Markdown preview feature of my IDE to have an approximation of final rendering ? |
|
@PowerKiKi Thanks! You're right that the folder no longer builds on its own, but there are two ways to see the real rendering:
The fetch copies website/content and website/assets in (it takes a couple of seconds), so re-run it after editing, or symlink website/src/products/apollo-angular/content to your website/content folder for live reload. That gives you the exact production rendering, including the shared components (Callout, Tabs, Cards), code highlighting and the sidebar from meta.json, which an IDE Markdown preview can't show. I can add these steps to website/README.md here so they're easy to find if you want? I hope its a good enough solution, but happy to think about better ones if you have ideas? |
|
Thanks, I guess IDE Markdown preview will be enough most of the time, but it's good to know there's a way for proper local development if I ever do some major update of the docs 馃憤 |
The Apollo Angular docs move to the-guild-org/website, which fetches this repo's
website/folder at build time and renders it with the shared Hive layout, the same way it does for Yoga, Envelop, Inspector, Codegen, and Mesh. Website PR: the-guild-org/website#1977.What changes
website/keeps only content:content/(one folder per section) andassets/. A README explains the layout and authoring conventions._metafiles becomemeta.json, page H1s move into frontmattertitle, and imports from@theguild/componentsare gone (the site providesCalloutandTabswithout imports)..github/workflows/website.ymlare removed;websiteleaves the pnpm workspace (lockfile regenerated) and thenow-buildscript goes.notify-website(redeploys the live docs on merges tomasterthat touchwebsite/) anddocs-preview(asks the website repo for a preview athttps://apollo-angular-pr-<n>.guild-dev-website.pages.dev/graphql/apollo-angularfor same-repo PRs). Both need theWEBSITE_DISPATCH_TOKENsecret (this org is not graphql-hive, so the secret has to be added to this repo).Merge order
Prettier was run on every changed file with the repo config; the commit was made with
--no-verifywhere a pre-commit hook expects a lockfile matching a local install.馃 Generated with Claude Code