Skip to content

nhanhoangtrong/astraprotocol-docs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Astra Logo


Astra Testnet's Documentation

The documentation in this repository site is meant to provide specifications and implementation details that will be useful to third party developers or contributors to the main repository.

Getting Started

Prerequisites

You're going to need:

  • NPM
  • Oracle JDK (For generating the pdf, deployment needs this)

Getting Set Up

  1. Clone this repository on Github
  2. cd docs
npm install
npm run docs:dev

You can now see the docs at http://localhost:8080.

Adding new page to the doc

  1. Create a markdown file under /docs/getting-started/
  2. Open /docs/.vuepress/config.js
  3. Add the file name to sidebar under vuepress-plugin-export in plugins
module.exports = {
  ...,

  themeConfig: {
    ...,
    nav: [
      {
        text: "Astra Chain", # Your directory name
        items: [
+          {
+            text: "[Add_Your_New_Title_Name_Here]",
+            link: "[Add_Your_New_File_Path_Here]"
+          },
          ...,
        ]
      },
      ...,
    ],
    ...,
    sidebar: {
      '/getting-started/': [
        '',
        ...,
+        '[Add_Your_New_File_Name_Here]'
        ...
      ],
+      "/chain-details/": [ # Tag of new directory
+        '[Add_Your_New_File_Name_Here]' # or here
+      ],
    },
  },
  ...,
}

Generating a PDF version of the site

Go to cronos-docs/docs, then run:

vuepress export

PDF styling config in /docs/.vuepress/config.js, you can refer to Puppeteer doc for the complete page API when generating PDF.

module.exports = {
  plugins: [
    ['vuepress-plugin-export',
    {
      page: {         // Puppeteer.page.pdf([options])
        format: 'A4',
        printBackground: true,
        margin: {
          top: 60,
          left: 20,
          right: 20,
          bottom: 60
        }
      },
      sorter: function(a,b){
        ...,
      }
    }
    ]
  ]
}

a PDF version of the site will be generated under the /docs path.

Deploying Chain-doc to Github Pages

  1. Make sure you're working on a fork in your own account, not our original repository: git remote show origin
  2. Commit your changes: git commit -a -m "YOUR MESSAGE"
  3. Push the changes to GitHub: git push
  4. Run ./deploy.sh

You should see your updates on http://astraprotocol.github.io/docs.

About

Docs for Astra

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages