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

Switch site to Docusaurus #44

Merged
merged 2 commits into from
Dec 22, 2023
Merged

Switch site to Docusaurus #44

merged 2 commits into from
Dec 22, 2023

Conversation

gnidan
Copy link
Member

@gnidan gnidan commented Dec 8, 2023

As discussed in the 2023-11-29 biweekly call, this PR prepares for a formal-schema-first approach by switching from Sphinx to Docusaurus.

Based on my research, Docusaurus appears to be the most mature documentation site generator that supports JSON Schema draft 2020-12 (sphinx-jsonschema only supports draft 4, which is now ten years old!). I remember reading that draft 2020-12 should be "close to stable", so I think it makes sense for us to use that as our JSON Schema version moving forward.

If you'd like to preview these changes, I quickly set up a Fleek project, which provides a service to build+deploy GH repos as static IPFS sites behind their CDN. This service might be nice for us to use for PR/branch previews, since they provide that feature out of the box. (This PR just keeps the existing GHA deployment to gh-pages, though... I don't think we want to switch entirely to Fleek? At least now in this PR.)

For a breakdown of the various moving parts, this PR includes changes that:

  • Remove Sphinx stuff
  • Prepare formal schema by starting a schemas/ directory with some rough sketches in YAML
  • Setup Docusaurus within web/ directory:
    • Initialize Docusaurus and remove all the default stuff (logos, blog, etc.)
    • Establish docs/ subdirectory for human-readable content about ethdebug, our efforts, etc.
    • Establish spec/ subdirectory for direct specification materials, using Docusaurus's mechanism for keeping two "docs" directories.
    • Author basic homepage so ethdebug has a proper home on the web
    • Define initial version of function for loading schemas from root schema/ directory, and reference this schema in the spec/ subdirectory.
    • Extend theme to provide access to FontAwesome for icons
    • Extend theme to include "external link" badge on external links in Markdown files
    • Include a temporary logo generated by ChatGPT
    • Override default colors with temporary colorscheme suggested by ChatGPT
  • Update GitHub Actions workflows for new toolchain

- Remove Sphinx stuff

- Prepare formal schema by starting a `schema/` directory with some
  rough sketches

- Setup Docusaurus within `web/` directory:

  - Initialize Docusaurus and remove all the default stuff
    (logos, blog, etc.)

  - Establish `docs/` subdirectory for human-readable content about
    ethdebug, our efforts, etc.

  - Establish `spec/` subdirectory for direct specification materials,
    using Docusaurus's mechanism for keeping two "docs" directories.

  - Author basic homepage so ethdebug has a proper home on the web

  - Define initial version of function for loading schemas from root
    `schema/` directory, and reference this schema in the `spec/`
    subdirectory.

  - Extend theme to provide access to FontAwesome for icons

  - Extend theme to include "external link" badge on external links in
    Markdown files

  - Include a temporary logo generated by ChatGPT

  - Override default colors with temporary colorscheme suggested by ChatGPT

- Update GitHub Actions workflows for new toolchain
@raxhvl
Copy link
Contributor

raxhvl commented Dec 10, 2023

Hi @gnidan, I have reviewed the PR locally and it looks good! The link to specification is name differently in the header and footer ( Specification v/s Specification overview) do you think we should name them the same for the sake of consistency?

@gnidan
Copy link
Member Author

gnidan commented Dec 11, 2023

Hi @gnidan, I have reviewed the PR locally and it looks good! The link to specification is name differently in the header and footer ( Specification v/s Specification overview) do you think we should name them the same for the sake of consistency?

Hm, there's probably a way to avoid this confusion. What you're looking at is the Specification section, which has the "Specification overview" as its landing page. I'm imagining this kind of site map:

  • Main homepage (summarizes project, calls to action, etc.)

  • Documentation

    • Project high-level info, etc.
    • Known challenges, design approach, etc.
    • Tips for implementing a debugger (eventually)
    • Other materials that provide context or explanation
  • Specification

    • Landing page that explains what the specification includes, how it's organized, etc. This is what I'm calling "Specification overview"
    • Drafts/sketches that inform the specification (for now... maybe these will get moved elsewhere)
    • Schemas broken down into individual pieces, like "here's how to represent a uint type", "here's how to represent the start of a function call", etc., with English explanations for everything (piece by piece)
    • The full schema listed in complete form, since ultimately that's the primary artifact we're building.

We'll probably want to add another main section, like "Community" or "About", since maybe the homepage isn't the best place for meeting schedules and other things... perhaps that is where meeting minutes could live in the future.

Anyway, does this make sense? tl;dr maybe: We need to build a spec; we also need to document the spec. Those are two separate parts of the site and both will have lots of info. We should organize that info and provide overviews/landing pages for the different sections.

@raxhvl
Copy link
Contributor

raxhvl commented Dec 11, 2023

Yep. That makes so much sense!

@raxhvl
Copy link
Contributor

raxhvl commented Dec 12, 2023

I fixed few minor typos in the docs. Should I PR into this branch? or wait till this gets merged?

@gnidan
Copy link
Member Author

gnidan commented Dec 13, 2023

I fixed few minor typos in the docs. Should I PR into this branch? or wait till this gets merged?

I just noticed #45. I'll review that today. Thank you!

@gnidan
Copy link
Member Author

gnidan commented Dec 13, 2023

No one in Matrix.chat objected broadly, so I'm marking this as ready for review. Please provide any feedback you may have!

@gnidan gnidan marked this pull request as ready for review December 13, 2023 20:44
@gnidan
Copy link
Member Author

gnidan commented Dec 22, 2023

Merging this and #45 to reduce the tree of branches targeting this PR.

@gnidan gnidan merged commit c498882 into main Dec 22, 2023
1 check passed
@gnidan gnidan deleted the docusaurus branch December 22, 2023 05:29
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.

2 participants