Skip to content

Latest commit

 

History

History
99 lines (63 loc) · 3.66 KB

README.md

File metadata and controls

99 lines (63 loc) · 3.66 KB

Website

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

Installation

yarn    # or npm i

Local Development

yarn start    # or npm run start

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

Build

yarn build    # or npm run build

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

Deployment

Using SSH:

USE_SSH=true yarn deploy    # or USE_SSH=true npm run deploy

Not using SSH:

GIT_USER=<Your GitHub username> yarn deploy    # or GIT_USER=<Your GitHub username> npm run 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.

Documentation location

Documentation for previous versions is located in /www/versioned_docs and normally does not need to be modified. Documentation for the future official release of your work is located in /www/docs of your branch. There you have the API documentation in /www/docs/API and the guides in /www/docs/guides. Official documentation is available to users at www.starknetjs.com. You can choose the documentation version you need in the top menu bar. NEXT version corresponds to the documentation of the last commit of the develop branch.

Update documentation

Appropriate JSDoc comments should be included in the source code. Such comments are used to populate the content for /www/docs/API, this content will be automatically generated by the project CI, and should not be included in Pull Requests. The content for /www/docs/guides should be updated manually and the modifications should be included in Pull Requests.

Without creation of a new release of Starknet.js

Your modified files will just be merged in /www/docs/ by the Pull Request. If it was merged in develop, it will be visible in the official documentation in NEXT.

With creation of a new release of Starknet.js

Just before the release of a new version in the main branch documentation versioning should be performed:

Through CI

  • Execute the [Manual] Documentation Version PR CI workflow to generate an appropriate PR

Manually

  • Ensure that all the necessary commits/PRs/merges are performed

  • Ensure that the www directory is up to date

  • Execute the documentation build with the appropriate version tag used in the documentation code links with one of the following:

# from the root directory, use the module version from package.json
npm run docs:build:version

# from the root directory, manually set the version
npm run docs:build --git-revision-override=vX.Y.Z

# from the /www documentation directory, manually set the version
GIT_REVISION_OVERRIDE=vX.Y.Z npm run build
  • Launch the documentation versioning with one of the following:
# from the root directory, use the module version from package.json
npm run docs:version

# from the root directory, manually set the version
npm run docs:version --version-override=X.Y.Z

# from the /www documentation directory, manually set the version
npm run docusaurus docs:version X.Y.Z
  • The official documentation (API + guides) of X.Y.Z is created
  • Commit your work, and merge it in develop
  • perform the official release of X.Y.Z in main
  • In the official documentation, the new version of documentation for X.Y.Z is available, and NEXT version is temporarily identical