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

Docs: example links fixing + table of contents fixes #9272

Merged
merged 4 commits into from
Aug 9, 2024

Conversation

kennedybaird
Copy link
Contributor

@kennedybaird kennedybaird commented Aug 9, 2024

  • removed loose " on deployment example links

  • fixed the github example links

  • removed some invalid examples / duplicates

  • moved extractHeadings to a new headings.ts utils file to fix the table of contents for blog and docs


After looking through all the examples - there are a lot more than are documented. I didn't want to go through adding more and having the examples page get a lot more ungainly, but I did wonder about creating more sections?

Currently we have 3:

  1. Standalone
  2. End-to-End
  3. Deployment

I think either having sub-sections in standalone, or just adding new sections could be beneficial:

  • Fields
  • Admin UI
  • Session
  • Database

I do at least like the idea of adding a fields- prefix to all the field examples, so viewing the examples dir is easier.

Happy to copy the above to a discussion and suggest some prefixes or organisation as well

@kennedybaird
Copy link
Contributor Author

@simonswiss - you may want to have a quick review as 1cbe903 touched on your recent work

@dcousens
Copy link
Member

dcousens commented Aug 9, 2024

@kennedybaird @simonswiss for examples, maybe there is an opportunity to have the README in each folder feed into Keystatic?

Copy link

codesandbox-ci bot commented Aug 9, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 1cbe903:

Sandbox Source
@keystone-6/sandbox Configuration

@kennedybaird
Copy link
Contributor Author

@dcousens - can you clarify why?

So that each example readme can be viewed without leaving docs? It seems like an unnecessary double up.

Or are you wanting some automated mirroring of the examples folder, so that we're not maintaining the docs side as well?

With prefixes in the folder names, and displayName + description set, the individual example package.json could be the single source of truth.

@dcousens
Copy link
Member

dcousens commented Aug 9, 2024

@kennedybaird the latter, I'm hoping we can effectively move the guides into markdown, into each example/{project} - then we can use them for the documentation too.

The matter of maintaining docs/ and examples/ for each example is not pragmatic, and as shown, one of them will fall behind. My bet is that will always be docs/ while examples/ represents a practical pathway for testing and development.

Copy link
Contributor

@simonswiss simonswiss left a comment

Choose a reason for hiding this comment

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

LGTM 🚀

@simonswiss
Copy link
Contributor

Thanks for this work, @kennedybaird 🙏

Agreed that manually playing "catch up / keep up" for the Keystatic examples list is not ideal. As a first step I tried to re-create the existing setup (which was hardcoding the examples links in the template), but this is indeed probably not the final solution.

Probably outside the scope of this PR though — and I'll approve that as this fixes a whole lot of broken links.

@simonswiss simonswiss merged commit 2569f79 into keystonejs:main Aug 9, 2024
1 check passed
@kennedybaird
Copy link
Contributor Author

Do you want me to have a look at a keystatic approach @simonswiss?

@dcousens dcousens mentioned this pull request Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants