This repo contains technical documentation for the GenLayer project.
The live site is available at https://docs.genlayer.com/.
You can use either npm or pnpm as your package manager.
- Install dependencies:
pnpm i - Start the development server:
pnpm dev - Visit localhost:3000
- Install dependencies:
pnpm i - Build the site:
pnpm build - Start the production server:
pnpm start - Visit localhost:3000
- Install dependencies:
npm install - Start the development server:
npm run dev - Visit localhost:3000
- Install dependencies:
npm install - Build the site:
npm run build - Start the production server:
npm start - Visit localhost:3000
The changelog is automatically generated from individual version files during the build process.
To add a new changelog entry:
- Create a new file in
content/validators/changelog/namedvX.X.X.mdx(e.g.,v0.3.5.mdx) - Structure the content as follows:
## vX.X.X
### New features
- Feature description here
### Bug fixes
- Fix description here
### Misc
- Other changes here- The changelog will be automatically updated when you run the build or dev command:
- pnpm:
pnpm buildorpnpm dev - npm:
npm run buildornpm run dev
- pnpm:
The entries are sorted in descending order (newest first) automatically.
The setup guide contains configuration examples that are maintained in separate source files. To update these sections, use the scripts in the scripts/ directory:
# Update version list and download command from changelog versions
node scripts/update-setup-guide-versions.js
# Update config.yaml example from content/validators/config.yaml
node scripts/update-config-in-setup-guide.js
# Update docker-compose.yaml example from content/validators/docker-compose.yaml
node scripts/update-docker-compose-in-setup-guide.jsSee scripts/README.md for detailed documentation.
The API documentation for GenLayer Node is automatically generated from individual method files.
To add a new API method:
-
Create a new
.mdxfile in the appropriate directory:- For GenLayer methods:
pages/api-references/genlayer-node/gen/ - For Debug methods:
pages/api-references/genlayer-node/debug/
- For GenLayer methods:
-
Name the file according to the method name (e.g.,
gen_newMethod.mdx) -
Structure the content following this template:
### method_name
Brief description of what the method does.
**Method:** `method_name`
**Parameters:**
- `param1` (type, required/optional): Description
- `param2` (type, required/optional): Description
**Returns:** Description of return value
**Example:**
```json
{
"jsonrpc": "2.0",
"method": "method_name",
"params": [...],
"id": 1
}Response:
{
"jsonrpc": "2.0",
"result": ...,
"id": 1
}
4. The API documentation and navigation will be automatically updated when you run:
- **pnpm**: `pnpm build` or `pnpm dev`
- **npm**: `npm run build` or `npm run dev`
The `_meta.json` files are automatically synchronized with the actual method files, preserving the order of existing entries while adding new ones at the end.
## License
Text and diagrams: [Creative Commons Attribution 4.0 International](https://github.com/genlayerlabs/genlayer-docs/blob/main/LICENSES/CC-BY-4.0.txt).
Code snippets and examples: [MIT License](https://github.com/genlayerlabs/genlayer-docs/blob/main/LICENSES/MIT.txt).