Skip to content

Commit

Permalink
docs: Add static site generator for generating documentation page
Browse files Browse the repository at this point in the history
  • Loading branch information
ziogaschr committed Jan 12, 2021
1 parent 03f5a2d commit 6b629f3
Show file tree
Hide file tree
Showing 11 changed files with 205 additions and 1 deletion.
35 changes: 35 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Publish docs via GitHub Pages

# Controls when the action will run.
on:
push:
branches:
- master
- main
paths:
- mkdocs.yml
- docs/**
- requirements-mkdocs.txt
pull_request:
branches:
- master
- main
paths:
- mkdocs.yml
- docs/**
- requirements-mkdocs.txt

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install -r requirements-mkdocs.txt
- run: mkdocs gh-deploy --force
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ testnet.json

/build/_workspace/
/build/bin/

# Files generated by docs build
/MANIFEST
/manifest.json
/site
5 changes: 4 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# with Go source code. If you know what GOPATH is then you probably
# don't need to bother with make.

.PHONY: all test clean
.PHONY: all test clean mkdocs-serve

GOBIN = ./build/bin
GOGET = env GO111MODULE=on go get
Expand All @@ -17,3 +17,6 @@ test: all
clean:
env GO111MODULE=on go clean -cache
rm -fr build/_workspace/pkg/ $(GOBIN)/*

mkdocs-serve: ## Serve generated documentation (during development)
build/mkdocs-serve.sh
28 changes: 28 additions & 0 deletions build/mkdocs-serve.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh

# This script installs requirements for and starts the live-reloading development server for MkDocs.
# MkDocs generates a static site from the markdown files in docs/.

py_command=python
pip_command="${py_command} -m pip"

setup_py_command() {
if [ -z $(which ${py_command}) ]; then
py_command=python3
return
fi
py_command_major_version=$(${py_command} 2>&1 --version | cut -d' ' -f2 | head -c1)
if [ $py_command_major_version != 3 ]; then
py_command=python3
fi
}
setup_py_command

set -ex
${py_command} --version
${pip_command} --version
set +x

${pip_command} install -r requirements-mkdocs.txt

mkdocs serve
5 changes: 5 additions & 0 deletions docs/PAYOUTS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- navigation # Hide navigation
---

**First of all make sure your Redis instance and backups are configured properly http://redis.io/topics/persistence.**

Keep in mind that pool maintains all balances in **Shannon**.
Expand Down
5 changes: 5 additions & 0 deletions docs/POLICIES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- navigation # Hide navigation
---

# Enforcing Policies

Pool policy server collecting several stats on per IP basis. There are two options: `iptables+ipset` or simple application level bans. Banning is disabled by default.
Expand Down
5 changes: 5 additions & 0 deletions docs/STRATUM.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
---
hide:
- navigation # Hide navigation
---

# Stratum Mining Protocol

This is the description of stratum protocol used in this pool.
Expand Down
Binary file added docs/img/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 16 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
hide:
- navigation # Hide navigation
---

# core-pool

## Features

* Support for HTTP and Stratum mining
* Detailed block stats with luck percentage and full reward
* Failover geth instances: geth high availability built in
* Separate stats for workers: can highlight timed-out workers so miners can perform maintenance of rigs
* JSON-API for stats
* New vue based UI
* Supports Ethereum Classic, Mordor, Ethereum, Ropsten & Ubiq.
74 changes: 74 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Project information
site_name: CorePool Documentation
site_description: Documentation for CorePool
site_url: https://etclabscore.github.io/core-pool/
site_author: CorePool Team

# Repository
repo_name: etclabscore/core-pool
repo_url: https://github.com/etclabscore/core-pool
edit_uri: edit/master/docs/

# Copyright
copyright: 'Copyright © 2021 etclabscore/core-pool - All rights reserved'

# Configuration
theme:
# https://github.com/squidfunk/mkdocs-material/tree/master/src
name: material
logo: img/favicon.png
favicon: img/favicon.png
language: en

palette:
scheme: slate
primary: black
accent: green

icon:
repo: fontawesome/brands/github

# Don't include MkDocs' JavaScript
include_search_page: false

features:
- navigation.tabs
- navigation.tabs.sticky
- navigation.expand
- navigation.sections
# - navigation.instant

use_directory_urls: true

plugins:
- search
- minify:
minify_html: true
- git-revision-date-localized:
type: timeago

# Extensions
markdown_extensions:
- abbr
- admonition
- attr_list
- codehilite
- def_list
# - meta
- smarty
- toc:
permalink: true
- pymdownx.emoji
- pymdownx.superfences
- pymdownx.details
- pymdownx.magiclink:
repo_url_shortener: true
repo_url_shorthand: true
social_url_shorthand: true

# Page tree
nav:
- Home: index.md
- Payouts: PAYOUTS.md
- Stratum: STRATUM.md
- Policies: POLICIES.md
28 changes: 28 additions & 0 deletions requirements-mkdocs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
Babel==2.9.0
click==7.1.2
future==0.18.2
gitdb==4.0.5
GitPython==3.1.12
htmlmin==0.1.12
Jinja2==2.11.2
joblib==1.0.0
jsmin==2.2.2
livereload==2.6.3
lunr==0.5.8
Markdown==3.3.3
MarkupSafe==1.1.1
mkdocs==1.1.2
mkdocs-git-revision-date-localized-plugin==0.8
mkdocs-material==6.2.4
mkdocs-material-extensions==1.0.1
mkdocs-minify-plugin==0.3.0
nltk==3.5
Pygments==2.7.3
pymdown-extensions==8.1
pytz==2020.5
PyYAML==5.3.1
regex==2020.11.13
six==1.15.0
smmap==3.0.4
tornado==6.1
tqdm==4.56.0

0 comments on commit 6b629f3

Please sign in to comment.