Skip to content

Docs theme#4042

Merged
tac0turtle merged 26 commits intomasterfrom
fadeev/docs-theme
Oct 11, 2019
Merged

Docs theme#4042
tac0turtle merged 26 commits intomasterfrom
fadeev/docs-theme

Conversation

@fadeev
Copy link
Contributor

@fadeev fadeev commented Oct 7, 2019

This PR includes an updated documentation theme.

Screenshot 2019-10-07 at 19 04 21

To test it out run cd docs && npm install && npm run serve, or visit http://tendermint-docs.surge.sh/

Features such as search, definition tooltips and language switcher will be added incrementally.

@fadeev fadeev requested a review from nylira October 7, 2019 17:11
@fadeev
Copy link
Contributor Author

fadeev commented Oct 7, 2019

Since sidebar is generated automatically, it is very possible that it looks not the way we want it to. Please, report what needs to be changed, and I will either modify the script or propose changes to the directory structure (sidebar displays only two levels of dirs).

@melekes
Copy link
Contributor

melekes commented Oct 7, 2019

love it ❤️

One note: Help & Support section does not make sense to me. The riot channel for Tendermint is https://riot.im/app/#/room/#tendermint:matrix.org. Forum link: https://forum.cosmos.network/c/tendermint. Help & Support and footer both look like from cosmos project. Maybe we should tailor it for Tendermint?

@fadeev
Copy link
Contributor Author

fadeev commented Oct 7, 2019

@melekes thanks! Absolutely, i'll make it configurable.

@codecov-io
Copy link

codecov-io commented Oct 8, 2019

Codecov Report

Merging #4042 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #4042      +/-   ##
==========================================
+ Coverage   67.12%   67.12%   +<.01%     
==========================================
  Files         245      245              
  Lines       20575    20580       +5     
==========================================
+ Hits        13811    13815       +4     
+ Misses       5729     5726       -3     
- Partials     1035     1039       +4
Impacted Files Coverage Δ
privval/signer_server.go 95.65% <0%> (-4.35%) ⬇️
privval/signer_endpoint.go 81.33% <0%> (-2.67%) ⬇️
blockchain/v0/reactor.go 80.66% <0%> (-0.95%) ⬇️
consensus/replay.go 70.96% <0%> (-0.81%) ⬇️
consensus/reactor.go 77.49% <0%> (-0.36%) ⬇️
blockchain/v0/pool.go 82.62% <0%> (-0.33%) ⬇️
state/validation.go 84.48% <0%> (+2.3%) ⬆️
libs/flowrate/util.go 66.66% <0%> (+6.66%) ⬆️
blockchain/v2/reactor.go 66.66% <0%> (+10.52%) ⬆️

@fadeev
Copy link
Contributor Author

fadeev commented Oct 8, 2019

Made changes to the script, so specs should show up in the sidebar (for example, ABCI spec). Only {{spec_name}}/readme.md shows up, because we have a two-level hierarchy. According to design each spec should have it's contents (files, other than readme) displayed as cards inside the content area. I'm working on it.

@fadeev
Copy link
Contributor Author

fadeev commented Oct 8, 2019

One more thing. Since this repo depends on npm's vuepress-theme-cosmos, it doesn't hurt to do cd docs && rm -rf node_modules && npm install --save vuepress-theme-cosmos to get the latest theme files.

@fadeev
Copy link
Contributor Author

fadeev commented Oct 8, 2019

Added cards for directory contents. Useful for specs in tendermint and modules in cosmos-sdk. To enable add cards: true in frontmatter (naming is hard, I'm open to suggestions). Descriptions under titles are taken from description property of the corresponding file's frontmatter.

Looks something like this:

Screenshot 2019-10-08 at 17 27 31

@fadeev
Copy link
Contributor Author

fadeev commented Oct 8, 2019

Screenshot 2019-10-08 at 21 06 21

@fadeev
Copy link
Contributor Author

fadeev commented Oct 9, 2019

Made footer customizable (see config.js), brought back language selector, added very basic search. This is a super naive search, it doesn't represent how a proper search should look or behave like.

Screenshot 2019-10-09 at 18 07 06

editLink: true,
children: [
{
title: "Riot Chat",
Copy link
Contributor

Choose a reason for hiding this comment

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

should these be links?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I'll make sure these strings are processed with markdown, so we can have links.

Copy link
Contributor

Choose a reason for hiding this comment

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

sweet with that i think this is ready to be merged

@tac0turtle
Copy link
Contributor

tac0turtle commented Oct 9, 2019

docs/spec/rpc/index.html → docs/.vuepress/public/rpc/index.html
docs/spec/rpc/swagger.yaml → docs/.vuepress/public/rpc/swagger.yaml

how come these were moved? I think these should live in the rpc pkg for the time being, and copied into the vuepress folder

@fadeev
Copy link
Contributor Author

fadeev commented Oct 9, 2019

@marbar3778 re:rpc VuePress pretty much ignores HTML files outside of public and doesn't include them into the final build directory.

@tac0turtle
Copy link
Contributor

tac0turtle commented Oct 9, 2019

VuePress pretty much ignores HTML files outside of public and doesn't include them into the final build directory.

yes, simplest is to copy into vue-press/public before build

@fadeev
Copy link
Contributor Author

fadeev commented Oct 9, 2019

@marbar3778 Do you mean to store rpc in docs/rpc and copy it to public as part of build script (and delete afterwards) or to keep it in docs/.vuepress/public/rpc?

@tac0turtle
Copy link
Contributor

tac0turtle commented Oct 9, 2019

the first one 😄 just store the swagger files in rpc/swagger folder then before build just copy it over

@fadeev fadeev requested review from milosevic and mircea-c October 9, 2019 15:41
// lang: "en-US"
// },
// "/ru/": {
// lang: "ru"
Copy link
Contributor

Choose a reason for hiding this comment

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

?

Copy link
Contributor

@tac0turtle tac0turtle Oct 9, 2019

Choose a reason for hiding this comment

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

currently there is no Russian translation so commented out the options

@fadeev fadeev requested a review from tessr as a code owner October 10, 2019 16:30
version: 2
test-suite:
jobs:
- deploy_docs:
Copy link
Contributor

Choose a reason for hiding this comment

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

can we keep this to master? I believe this is what the sdk team talked about.

@tac0turtle tac0turtle merged commit aaa060f into master Oct 11, 2019
@tac0turtle tac0turtle deleted the fadeev/docs-theme branch October 11, 2019 16:07
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.

4 participants