Some change
-
Install Nix using nix-installer.
-
Install devenv using
nix profile install
.
Run devenv shell
in the terminal to enter a Bash shell with all dependencies
installed. Alternatively, use direnv
to manage this automatically.
once in the devenv shell the following usage can be executed.
Usage:
- Run
quarto render
to render the site to thedocs/
folder - Run
quarto preview
to serve the site in Quarto's local webserver - Review the
_quarto.yml
file and Github Actions workflow for more details
The repository includes an API documentation generator that takes documentation comments from Autonity protocol contracts and converts them into Markdown files.
TL/DR: Symlink an autonity repository
clone into the root of this repository and run apidocgen
. The
configuration is in apidoc.toml
.
- Either clone the Autonity Go Client into the root of this repository
- Or add a symlink to an existing clone into this repository with
ln -s /path/to/autonity
- If there are new contracts to document, add them to
apidoc.toml
. The configuration is documented here. - Switch to the release tag in Autonity, e.g. for v0.15.0:
cd autonity git checkout v0.15.0
- Compile the protocol contracts:
make contracts
- Generate the API reference documentation:
cd - apidocgen
- Review and commit the created Markdown files.
Note
Old Autonity branches (releases <= v0.14.1) do not build NatSpec data files.
To generate API documentation for these branches, run patch-autonity
in the
root of this repository before step 3 to apply a patch to autonity/Makefile
that modifies solc
compiler options.
Autonity protocol contracts are documented via documentation comments in Solidity source code. To help with previewing documentation, a script is available that watches the source directory in Autonity and rebuilds the documentation when files change.
- Launch the monitoring script with
apidocmon
. - Open the preview URL from the terminal in the browser.
- Open Solidity code from the symlinked Autonity repository clone in a text editor and make changes. The browser window should reload with the new content.
For best results, clone into a new directory. However, if you are unable to do that, Delete the following directories as they will conflict and prevent Quarto from building:
- themes/ # contains docys shortcodes
- archetypes/ # contains docsy shortcodes
- layouts/ # contains Markup for docsy templating
- data/ # is empty and no longer required
- docs/ # holds the content in a format that works for Hugo (and not Quarto).
- content/ # holds the content in a format that works for Hugo (and not Quarto).
The repo is configured to publish:
- on merge to
develop
: to GitHub Pages site https://special-umbrella-26f3274a.pages.github.io/ - on merge to
staging
: to staging site https://staging.game.autonity.org- Staging site access credentials are in
Bitwarden >> Autonity-org >> PCGC >> staging.game.autonity.org
- Staging site access credentials are in
- on merge to
master
: to production site https://game.autonity.org
- The
master
branch will always contain the live production version of the website. - The
develop
branch will be used for ongoing development and feature testing. All changes should be pushed todevelop
first, where they can be tested on a staging server before being merged intomaster
. - Hot-fixes to the production site should be handled by creating a branch from
master
, implementing the fix, and creating a PR. Once the hot-fix is merged,master
should be merged intodevelop
to ensure the fix is propagated and conflicts are resolved. - A new version of the production website is published by merging
develop
intomaster
after thorough testing.
The staging site is available here. The staging site is updated automatically on every push to the staging
branch.
See the repo Wiki Page Git Workflow for when to merge
or rebase
branches when working on game.autonity.org
repo.
For overall site structure, see Autonity Sitemap
- Piccadilly Testnet genesis configuration at https://docs.autonity.org/networks/testnet-piccadilly/#genesis-configuration
- Structure
- Block explorer at https://piccadilly.autonity.org/ -- Blockscout, our standard config
- Metrics at https://telemetry.piccadilly.autonity.org -- Grafana
- ATN Faucet at https://faucet.autonity.org/
- need to discuss further development needs (https://github.com/clearmatics/autonity-launch-plan/issues/60)
- Public endpoints: (with standard setup (cloud based firewall, DDOS mitigations etc.):
- RPC: https://rpc1.piccadilly.autonity.org:8545
- WebSocket: wss://rpc1.piccadilly.autonity.org:8546
- GraphQL: https://rpc1.piccadilly.autonity.org:8545/graphql
- GraphQL Query UI: https://rpc2.bakerloo.autonity.org/graphql/ui
- Website/documentation:
- Piccadilly landing page (including the content of this repo): https://autonity.org/network.html
- Piccadilly-specific technical documentation: https://docs.autonity.org/networks/testnet-piccadilly/
To contribute to this repo, please raise a pull request as per Github Flow.
Note that in order to maintain a legible Git history, this repo enforces linear history on master
. To ensure that your local Git commit log is linear, you should rebase your local changes on top of origin
. You can tell Git to do this for this repository by setting the Git option pull.rebase
in your local checkout:
git config --local pull.rebase true
Alternatively, you can apply this setting for all your repos by replacing --local
with --global
.
Reference: Pro Git by Scott Chacon