Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.77 KB

README.md

File metadata and controls

68 lines (43 loc) · 1.77 KB

Website

This website is built using Docusaurus 2, a modern static website generator.

How to generate markdown from template

Install solidity doc gen npm install solidity-docgen

Get the correct compiler version npm install -D solc-0.7@npm:[email protected]

Put the updated template contract.hbs in a /templates folder under the same directory as /contracts that you want to generate

Run npx solidity-docgen --solc-module solc-0.7 -t ./templates

How to Update search indices with algolia

create .env file with APPLICATION_ID and the API_KEY (write access) Edit config.json file with

  • start url from updated website
  • sitemap url from updated website: ex) for docs: https://docs.uniswap.org/sitemap.xml
  • "v3-docs" index name
  • install jq : brew install jq run docker run -it --env-file=.env -e "CONFIG=$(cat ./config.json | jq -r tostring)" algolia/docsearch-scraper

How to add a new page

Create a markdown file in its respective version directory within the main /docs/ folder

Add the new file to its respective sidebar file i.e., 'V2sidebars.js' or 'V3sidebars.js'

Installation

yarn install

Local Development

yarn run start

This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.

Clear cache

yarn docusaurus clear

Build

yarn build

This command generates static content into the build directory and can be served using any static contents hosting service.

Deployment

GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy

If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the gh-pages branch.