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

Add docs about how to add a new feature proposal in consensus-specs and online viewer support #3239

Merged
merged 19 commits into from
Apr 18, 2023

Conversation

hwwhww
Copy link
Contributor

@hwwhww hwwhww commented Jan 27, 2023

  • Add docs folder
    • Add docs/docs/new-feature.md doc as the new feature guide
  • Add new online viewer support with mkdocs
    • The config is mkdocs.yml
    • Since we don't want to change the specs/* path, I created a copy_docs makefile command to copy the specs files to docs/ folder. The GitHub Actions job would call make copy_docs and build the docs viewer website.
    • demo: https://hwwhww.github.io/consensus-specs/
  • Add fork_choice/.pages and specs/.pages files for mkdocs-awesome-pages-plugin navigation.
    • These files are for custom navigation orders or extra links.
  • Fix some wrong links
  • TODOs
    • Some links to files in tests/ folder are still wrong. The simplest solution is using absolute links here. Anothor solution is to arrange the tests docs all together.
      WARNING  -  Documentation file 'README.md' contains a link to 'tests/formats/README.md' which is not found in the documentation files.
      WARNING  -  Documentation file 'README.md' contains a link to 'tests/generators/README.md' which is not found in the documentation files.
      WARNING  -  Documentation file 'README.md' contains a link to 'tests/core/pyspec/README.md' which is not found in the documentation files.
      WARNING  -  Documentation file 'specs/phase0/deposit-contract.md' contains a link to 'solidity_deposit_contract/deposit_contract.sol' which
                  is not found in the documentation files.
      
    • GitHub repo links only show the formal "release" instead of "pre-release" (release candidates). To avoid confusing, we should probably remove the versions or find another plug-in.
      image

Copy link
Contributor

@djrtwo djrtwo left a comment

Choose a reason for hiding this comment

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

looks good! minor nit

docs/new-feature.md Outdated Show resolved Hide resolved
@hwwhww
Copy link
Contributor Author

hwwhww commented Apr 4, 2023

I'm trying to use mkdocs to build the docs website. Preview website: https://hwwhww.github.io/consensus-specs/

  • Since we don't want to change the specs/* path, I created a copy_docs makefile command to copy the specs files to docs/ folder. The GitHub Actions job would call make copy_docs and build the docs viewer website.
  • The extra docs can also be stored in docs folder.
  • We can add a light client specs index markdown file. I hope this can help address the issue that @etan-status raised

@djrtwo @ralexstokes what do you think about the CI-built spec viewer website proposal?

@hwwhww hwwhww requested a review from djrtwo April 7, 2023 07:46
@hwwhww hwwhww marked this pull request as ready for review April 7, 2023 07:46
@hwwhww hwwhww changed the title Add docs about how to add a new feature proposal in consensus-specs Add docs about how to add a new feature proposal in consensus-specs and online viewer support Apr 7, 2023
@ralexstokes
Copy link
Member

spec viewer website looks cool! I don't immediately see what it buys us over the default GitHub UI but it likely doesn't hurt anything to add it

@etan-status
Copy link
Contributor

Hmm. I wonder if it could be done in a way that allows selecting consensusfork in a corner, and also shows any inherited functions.

https://hwwhww.github.io/consensus-specs/specs/capella/light-client/sync-protocol/
e.g., on this site, it should also show all the methods inherited from altair.
and a control to timetravel between consensusforks

it looks clean though :)

@hwwhww
Copy link
Contributor Author

hwwhww commented Apr 18, 2023

@etan-status

I think it's doable, but I may need to write a custom mkdocs plug-in/extension for navigation. Noted in #3325 for now.

@hwwhww hwwhww merged commit 21d4370 into dev Apr 18, 2023
11 checks passed
@hwwhww hwwhww deleted the docs branch April 18, 2023 10:31
Copy link

Choose a reason for hiding this comment

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

Türkiye

Copy link

Choose a reason for hiding this comment

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

Türkiye

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.

None yet

5 participants