Git Product home page Git Product logo

docs.pdn.xyz's Introduction

Documentation Website

Vercel Deployment

To run the site

git add . && git commit -m "message"
git push
npm run build

Then go to folder build/site/ Drage the index.html file to the browser to view the result.

*For any changes made within this repo, you must git push first and then run npm run build to see the changes.

To Add Page

cd modules/ROOT/pages

Then go back to the modules/ROOT/ folder, find

nav.adoc

Follow the structure:

xref: path/to/page[Title of the Page]

To Link to other pages

xref: path/to/page[CustomName]

To Add Anchor (Link to other sections in other page)

  1. Add anchor to the page you want link to with
[#SectionB]
  1. Add reference using
xref: path/to/page#SectionB[SectionB]

To Setup Mermaid Enviornment

  1. Make sure you have installed asciidoctor
brew install asciidoctor
  1. Generate a Gem file using following command
bundle init 
  1. Open the Gemfile, and then copy paste the following code
source "https://rubygems.org"
gem 'asciidoctor-diagram'
gem "asciidoctor-mermaid"
  1. Then execute bundle in terminal by typing the following command
bundle

To create a Mermaid diagram, run the following command

  1. Create a new adoc specifically for diagrams in a folder, e.g. the diagram.adoc in zkGroup folder

  2. Put your Mermaid diagram in following syntax

[mermaid, target="circuit", format=png]
....
/* Mermaid Diagram Syntax*/
....

Where target means the target name, format means the output file type

  1. Then run the following command
 asciidoctor -r asciidoctor-diagram -D Poseidon-ZK-Contracts/modules/ROOT/images  Poseidon-ZK-Contracts/modules/ROOT/pages/zk-primitives/zk-group/diagram.adoc

Please change the last path "Poseidon-ZK-Contracts/modules/ROOT/pages/zk-primitives/zk-group/diagram.adoc" to the path of you desired diagram.adoc.

Everytime you add new thing to the diagram, the change will apply to the same file name. So you just need to run the following command again to apply latest updates.

asciidoctor -r asciidoctor-diagram -D Poseidon-ZK-Contracts/modules/ROOT/images path/to/your/diagram.adoc
  1. Finally put the following image link to the adoc where you want to display the image, for example, if you go to circuit.adoc, you can see the following line:
image::circuit.png[circuit]

You don't need to specify any path to the image since all images are default to be sit inside the images folder at ROOT folder. So the name here would just simply be circuit.png.

Note After changing the mermaid labeling, the github will no longer show the diagram correctly, please checkout the vercel deployment or your local build for latest update. Vercel deployment address is at the top of the ReadMe.

For more information, please check out this official link

docs.pdn.xyz's People

Contributors

moribetamidori avatar samzkback avatar stechu avatar porteradams12 avatar

Watchers

Kenny Li avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.