Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

Commit

Permalink
docs: config updates (#409)
Browse files Browse the repository at this point in the history
* docs: more updates

* minor changes

* workflow

* yarn

* structure

* more updates

* cleanup

* additional cleanup

* docs

* interact with node

* additional guides and testnet docs

* update swagger

* update docs

* action
  • Loading branch information
fedekunze authored Aug 9, 2021
1 parent 73c2f8e commit 7b50331
Show file tree
Hide file tree
Showing 41 changed files with 3,117 additions and 1,679 deletions.
64 changes: 44 additions & 20 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,58 @@
name: Documentation
# This job builds and deploys documenation to github pages.
# It runs on every push to main.

on:
# trigger deployment on every push to main branch
push:
branches:
- main
schedule:
- cron: "* 0 * * *"
# trigger deployment manually
workflow_dispatch:

jobs:
build-and-deploy:
docs:
runs-on: ubuntu-latest
container:
image: tendermintdev/docker-website-deployment

steps:
- name: Checkout 🛎️
uses: actions/checkout@v2.3.1
- uses: actions/checkout@v2.3.4
with:
persist-credentials: false
# fetch all commits to get last updated time or other git log info
fetch-depth: 0
repository: "tharsis/ethermint"

- name: Install and Build 🔧
run: |
apk add rsync
make build-docs LEDGER_ENABLED=false
- name: Setup Node.js
uses: actions/setup-node@v1
with:
# choose node.js version to use
node-version: '14'

# cache node_modules
- name: Cache dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: |
**/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
# install dependencies if the cache did not hit
- name: Install dependencies
if: steps.yarn-cache.outputs.cache-hit != 'true'
run: yarn --frozen-lockfile

# run build script
- name: Build VuePress site
run: yarn docs:build

- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@4.1.4
# please check out the docs of the workflow for more details
# @see https://github.com/crazy-max/ghaction-github-pages
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: ~/output
# deploy to gh-pages branch
target_branch: gh-pages
# deploy the default output dir of VuePress
build_dir: docs/.vuepress/dist
env:
# @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20 changes: 12 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -265,18 +265,22 @@ godocs:
@echo "--> Wait a few seconds and visit http://localhost:6060/pkg/github.com/tharsis/ethermint/types"
godoc -http=:6060

# Start docs site at localhost:8080
docs-serve:
@cd docs && \
yarn && \
yarn run serve

# This builds a docs site for each branch/tag in `./docs/versions`
# and copies each site to a version prefixed path. The last entry inside
# the `versions` file will be the default root index.html.
build-docs:
@cd docs && \
while read -r branch path_prefix; do \
(git checkout $${branch} && npm install && VUEPRESS_BASE="/$${path_prefix}/" npm run build) ; \
mkdir -p ~/output/$${path_prefix} ; \
cp -r .vuepress/dist/* ~/output/$${path_prefix}/ ; \
cp ~/output/$${path_prefix}/index.html ~/output ; \
done < versions ;
.PHONY: build-docs
# Build the site into docs/.vuepress/dist
@$(MAKE) docs-tools-stamp && \
cd docs && \
yarn && \
yarn run build
.PHONY: docs-serve build-docs

###############################################################################
### Tests & Simulation ###
Expand Down
2 changes: 1 addition & 1 deletion client/docs/statik/statik.go

Large diffs are not rendered by default.

128 changes: 102 additions & 26 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,29 @@ module.exports = {
lang: 'en-US'
},
},
markdown: {
extendMarkdown: (md) => {
md.use(require("markdown-it-katex"));
},
},
head: [
[
"link",
{
rel: "stylesheet",
href:
"https://cdnjs.cloudflare.com/ajax/libs/KaTeX/0.5.1/katex.min.css",
},
],
[
"link",
{
rel: "stylesheet",
href:
"https://cdn.jsdelivr.net/github-markdown-css/2.2.1/github-markdown.css",
},
],
],
base: process.env.VUEPRESS_BASE || '/',
themeConfig: {
repo: 'tharsis/ethermint',
Expand All @@ -15,7 +38,7 @@ module.exports = {
editLinks: true,
custom: true,
logo: {
src: '/logo.svg',
src: '/ethermint-logo-horizontal-alpha.svg',
},
algolia: {
id: 'BH4D9OD16A',
Expand All @@ -27,9 +50,11 @@ module.exports = {
},
sidebar: {
auto: false,
nav: [{
nav: [
{
title: 'Reference',
children: [{
children: [
{
title: 'Introduction',
directory: true,
path: '/intro'
Expand All @@ -49,11 +74,51 @@ module.exports = {
directory: true,
path: '/core'
},
]
},
{
title: 'Guides',
children: [
{
title: 'Localnet',
directory: true,
path: '/guides/localnet'
},
{
title: 'Wallets',
directory: true,
path: '/guides/wallets'
},
{
title: 'Ethereum Tooling',
directory: true,
path: '/guides/tools'
},
]
},
{
title: 'APIs',
children: [
{
title: 'JSON-RPC',
directory: true,
path: '/api/json-rpc'
},
{
title: 'Protobuf Reference',
directory: false,
path: '/api/proto-docs'
},
]
},
{
title: 'Testnet',
children: [
{
title: 'Guides',
directory: true,
path: '/guides'
}
path: '/testnet'
},
]
},
{
Expand All @@ -65,17 +130,18 @@ module.exports = {
}]
}, {
title: 'Resources',
children: [{
children: [
{
title: 'Ethermint API Reference',
path: 'https://godoc.org/github.com/tharsis/ethermint'
path: 'https://pkg.go.dev/github.com/tharsis/ethermint'
},
{
title: 'Cosmos REST API Spec',
path: 'https://cosmos.network/rpc/'
},
{
title: 'Ethereum JSON RPC API Reference',
path: 'https://eth.wiki/json-rpc/API'
title: 'JSON-RPC API Reference',
path: '/api/json-rpc/endpoints'
}
]
}
Expand All @@ -86,13 +152,13 @@ module.exports = {
chat: {
title: 'Developer Chat',
text: 'Chat with Ethermint developers on Discord.',
url: 'https://discordapp.com/channels/669268347736686612',
url: 'https://discord.gg/3ZbxEq4KDu',
bg: 'linear-gradient(103.75deg, #1B1E36 0%, #22253F 100%)'
},
forum: {
title: 'Ethermint Developer Forum',
text: 'Join the Ethermint Developer Forum to learn more.',
url: 'https://forum.cosmos.network/',
url: 'https://forum.cosmos.network/c/ethermint',
bg: 'linear-gradient(221.79deg, #3D6B99 -1.08%, #336699 95.88%)',
logo: 'ethereum-white'
},
Expand All @@ -105,20 +171,33 @@ module.exports = {
footer: {
logo: '/logo-bw.svg',
textLink: {
text: 'tharsis.finance/ethermint',
url: 'https://tharsis.finance/ethermint'
text: 'ethermint.dev',
url: 'https://ethermint.dev'
},
services: [{
services: [
{
service: 'github',
url: 'https://github.com/tharsis/ethermint'
}
},
{
service: "twitter",
url: "https://twitter.com/ethermint",
},
{
service: "linkedin",
url: "https://www.linkedin.com/company/tharsis-finance/",
},
{
service: "medium",
url: "https://medium.com/@tharsis_labs",
},
],
smallprint: 'This website is maintained by Tharsis.',
smallprint: 'This website is maintained by Tharsis Labs Ltd.',
links: [{
title: 'Documentation',
children: [{
title: 'Cosmos SDK Docs',
url: 'https://docs.cosmos.network'
url: 'https://docs.cosmos.network/master/'
},
{
title: 'Ethereum Docs',
Expand All @@ -133,8 +212,8 @@ module.exports = {
{
title: 'Community',
children: [{
title: 'Cosmos Community',
url: 'https://discord.gg/W8trcGV'
title: 'Ethermint Community',
url: 'https://discord.gg/3ZbxEq4KDu'
},
{
title: 'Ethermint Forum',
Expand All @@ -143,14 +222,11 @@ module.exports = {
]
},
{
title: 'Contributing',
children: [{
title: 'Contributing to the docs',
url: 'https://github.com/tharsis/ethermint/tree/main/docs'
},
title: 'Tharsis',
children: [
{
title: 'Source code on GitHub',
url: 'https://github.com/tharsis/ethermint/blob/main/docs/DOCS_README.md'
title: 'Jobs at Tharsis',
url: 'https://tharsis.notion.site/Jobs-at-Tharsis-5a1642eb89b34747ae6f2db2d356fc0d'
}
]
}
Expand Down
Loading

0 comments on commit 7b50331

Please sign in to comment.