* vuepress * docs: vuepress setup and TODOs * doc scripts * update Makefile and gitignore * more docs updates * gitignore * metamask instructions * update image * updates * updates from call * docs: vuepress config and home.vue (#350) * update uncles return (#337) * x/evm: fix EndBlock consensus failure (#334) * add test for sending tx w/ 21000 gas * improve rpc transfer test * use ctx in EndBlock * UpdateAccounts and ClearStateObjects with passed in context * log ethereum address on error Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * update Ethermint color variables * add header and footer logo * tweak config.js * WIP custom homepage.vue * add layout to docs/README * update color variables * add eth logo black and white * tweak docs/README * update logo and logo-bw svg * bump 1.0.167 * homepage → home * add icon-code, icon-rocket * layout: home, remove configurable frontmatter: label, read, use * clean up config.js * bump 1.0.168 * fix missing comma from resolving conflicts * update sidebar, config nav, path * remove left whitespace on the header and footer logos * clean up home.vue, docs/README * update ethermint forum url in footer.links * comment out custom true to enable searchbar in subpages * remove external link icon for Guides * comments, revert custom true * clean up config.js, add specifications icon Co-authored-by: noot <36753753+noot@users.noreply.github.com> Co-authored-by: Federico Kunze <31522760+fedekunze@users.noreply.github.com> Co-authored-by: Federico Kunze <federico.kunze94@gmail.com> * final touches Co-authored-by: Cyrus Goh <hello@lovincyrus.com> Co-authored-by: noot <36753753+noot@users.noreply.github.com>
4.2 KiB
Updating the docs
If you want to open a PR on the Cosmos SDK to update the documentation, please follow the guidelines in the CONTRIBUTING.md
Translating
- Docs translations live in a
docs/country-code/
folder, wherecountry-code
stands for the country code of the language used (cn
for Chinese,kr
for Korea,fr
for France, ...). - Always translate content living on
master
. - Only content under
/docs/intro/
,/docs/basics/
,/docs/core/
,/docs/building-modules/
anddocs/interfaces
needs to be translated, as well asdocs/README.md
. It is also nice (but not mandatory) to translate/docs/spec/
. - Specify the release/tag of the translation in the README of your translation folder. Update the release/tag each time you update the translation.
Docs Build Workflow
The documentation for Ethermint is hosted at https://ethermint.cosmos.network/
built from the files in this (/docs
) directory for
master.
How It Works
There is a CircleCI job listening for changes in the /docs
directory, on
the master
branch. Any updates to files in this directory
on that branch will automatically trigger a website deployment. Under the hood,
the private website repository has a make build-docs
target consumed by a CircleCI job in that repo.
README
The README.md is also the landing page for the documentation on the website. During the Jenkins build, the current commit is added to the bottom of the README.
Config.js
The config.js generates the sidebar and Table of Contents on the website docs. Note the use of relative links and the omission of file extensions. Additional features are available to improve the look of the sidebar.
Links
NOTE: Strongly consider the existing links - both within this directory and to the website docs - when moving or deleting files.
Relative links should be used nearly everywhere, having discovered and weighed the following:
Relative
Where is the other file, relative to the current one?
- works both on GitHub and for the VuePress build
- confusing / annoying to have things like:
../../../../myfile.md
- requires more updates when files are re-shuffled
Absolute
Where is the other file, given the root of the repo?
- works on GitHub, doesn't work for the VuePress build
- this is much nicer:
/docs/hereitis/myfile.md
- if you move that file around, the links inside it are preserved (but not to it, of course)
Full
The full GitHub URL to a file or directory. Used occasionally when it makes sense to send users to the GitHub.
Building Locally
Make sure you are in the docs
directory and run the following commands:
rm -rf node_modules
This command will remove old version of the visual theme and required packages. This step is optional.
npm install
Install the theme and all dependencies.
npm run serve
Run pre
and post
hooks and start a hot-reloading web-server. See output of this command for the URL (it is often https://localhost:8080).
To build documentation as a static website run npm run build
. You will find the website in .vuepress/dist
directory.
Search
We are using Algolia to power full-text search. This uses a public API search-only key in the config.js
as well as a cosmos_network.json configuration file that we can update with PRs.
Update and Build the RPC docs
-
Execute the following command at the root directory to install the swagger-ui generate tool.
make tools
-
Edit API docs
- Directly Edit API docs manually:
client/lcd/swagger-ui/swagger.yaml
. - Edit API docs within the Swagger Editor. Please refer to this document for the correct structure in
.yaml
.
- Directly Edit API docs manually:
-
Download
swagger.yaml
and replace the oldswagger.yaml
under foldclient/lcd/swagger-ui
. -
Compile gaiacli
make install