polkadot-developers / substrate-docs

Substrate Developer Hub. Substrate is powered by best in class cryptographic research and comes with peer to peer networking, consensus mechanisms, and much more.
https://docs.substrate.io
BSD Zero Clause License
131 stars 274 forks source link

rustdocs deployment design for substrate, polkadot, and cumulus #182

Open jimmychu0807 opened 3 years ago

jimmychu0807 commented 3 years ago

As a follow up on https://github.com/paritytech/ci_cd/issues/168

This issue is not specifically for this repository, but is to optimize rustdocs across substrate, polkadot, and cumulus for both internal and external dev.

Currently, we have a mess in the various documentations within paritytech.

This epic is to address the following issues:

@sacha-l @NukeManDan what thought do you have?

Moving https://github.com/paritytech/ci_cd/issues/176 to here cc @TriplEight

TriplEight commented 3 years ago

rustdocs deployment design for substrate, polkadot, and cumulus

I think we should target all our rust projects

jimmychu0807 commented 3 years ago

@TriplEight Let's use this post as the design requirements for Parity-wide documentations / project web pages under paritytech.github.io.

TriplEight commented 3 years ago

Build an index page...

Absolutely! Basic navigation is the best first step!

Check any design/ux requirement...

I think here we could ask @goldsteinsveta to chime in and shed some design light, but keep in mind that this is a fist step, so something simple would do.

For each of the repo that we publish rustdocs, we also have a mechanism to to mark multiple branches...

For now, I think it's OK to have it as is, that the page mentions the current version. But for later, I was thinking about implementing something like a header with a version choice as in https://docs.rs/libc/0.2.99/libc/

When docs.substrate.io domain is ready...

I do not know the details, do you want to have some redirection here?

jimmychu0807 commented 3 years ago

@TriplEight I have spec'ed out the requirements I envisioned on Parity wide rustdocs at https://github.com/substrate-developer-hub/substrate-developer-hub.github.io/issues/1091#issuecomment-899326115

I Would like to build this out with you in Sep. I will particularly need your help on pt 2 and pt 3 on configuring the .gitlab-ci.yml. Also want to check how complex are those in implementation. I will help on getting pt 1 and pt 4 design and layout ironed out.

TriplEight commented 3 years ago

pt 2 is really easy, just a matter of mentioning a branch on which the job will run and passing its' name to the publishing host. pt 3 should be configured on the "portal" side. As for design/layout, I find https://docs.rs layout handy, here are some links.

sacha-l commented 3 years ago

@jimmychu0807: Happy to help with layout for and implementation for (1) and coordinate with the Design team. My question is, what's the difference between (1) and (4)? I think if we just add versioning to (1) like this https://docs.rs/ it solves for (4). Unless I'm misunderstanding what you have in mind.

The primary resources for customizing Rust crate landing pages are this: https://doc.rust-lang.org/nightly/rustdoc/the-doc-attribute.html and this: https://docs.rs/about. One idea would be to fork this: https://github.com/rust-lang/docs.rs which provides the basic infrastructure we're talking about.

jimmychu0807 commented 3 years ago

@sacha-l

sacha-l commented 3 years ago

Makes sense. What next steps do you see for pt1 @jimmychu0807 ?

imadarai commented 3 years ago

@jimmychu0807 I checked with @ericmorel and this repo was just a staging area for several websites in past. I would perhaps only like to consult Security to make sure the approach is ok and we have their blessing. (using paritytech.github.io)

jimmychu0807 commented 3 years ago

@imadarai I have message Kirill on this and getting his thought. Will further followup on this.

TriplEight commented 3 years ago

cc @jimmychu0807

Say for Substrate, it means there will be an index.html in the gh-pages

There is such a file almost everywhere where we publish, it can be customised.

apopiak commented 3 years ago

I'm not sure this is the correct place, but someone changed the url format for the rustdocs hosted on github.io. Can you please add a redirect from https://paritytech.github.io/substrate/<module path>.html to e.g. https://paritytech.github.io/substrate/master/<module path>.html so existing links keep working?

TriplEight commented 3 years ago

@apopiak this could've been an issue for substrate (with mentioning) or directly to ci_cd team. But anyway, take a look here: https://paritytech.github.io/substrate/. Isn't it what you're looking for?

nuke-web3 commented 3 years ago

FYI migrated from https://github.com/substrate-developer-hub/substrate-developer-hub.github.io/issues/1091 to here

imadarai commented 3 years ago

@jimmychu0807 Just flagging this here in case it's not on your radar. Rust Docs - bottom two list items are going to 404. Let me know if I just happen to have a bad link.

jimmychu0807 commented 3 years ago

This is still in my radar.

nuke-web3 commented 3 years ago

related: #352

TriplEight commented 2 years ago

cc https://github.com/substrate-developer-hub/substrate-docs/issues/638