Official documentation for Scaffold-DOT - an open-source toolkit for building dapps on Polkadot with Solidity smart contracts.
This website is built using Docusaurus, a modern static website generator.
npm installnpm startThis command starts a local development server and opens a browser at http://localhost:3000. Most changes are reflected live without having to restart the server.
npm run buildThis command generates static content into the build directory that can be served using any static hosting service.
npm run serveServes the production build locally to test before deployment.
GIT_USER=<Your GitHub username> npm run deployThis builds the website and pushes to the gh-pages branch.
The build/ directory contains static files that can be deployed to:
- Netlify
- Vercel
- Cloudflare Pages
- AWS S3
- Any static hosting provider
scaffold-dot-docs/
├── blog/ # Blog posts
│ ├── authors.yml # Author profiles
│ └── 2024-01-01-welcome.md # Example post
├── docs/ # Documentation
│ ├── intro.md # Introduction
│ ├── getting-started/
│ │ ├── installation.md
│ │ └── quick-start.md
│ ├── guides/
│ │ ├── basic-usage.md
│ │ └── advanced-features.md
│ └── api/
│ └── overview.md
├── src/
│ ├── css/
│ │ └── custom.css # Custom styling
│ ├── pages/
│ │ ├── index.tsx # Homepage
│ │ └── index.module.css
│ └── components/ # React components
├── static/
│ └── img/ # Images and assets
├── docusaurus.config.ts # Main configuration
├── sidebars.ts # Sidebar structure
├── tsconfig.json # TypeScript config
└── package.json
- Create a markdown file in
docs/(e.g.,docs/new-page.md) - Add frontmatter:
--- sidebar_position: 1 --- # Page Title Content here...
- Update
sidebars.tsif needed
- Create a file in
blog/with format:YYYY-MM-DD-title.md - Add frontmatter:
--- slug: post-slug title: Post Title authors: [author-key] tags: [tag1, tag2] ---
- Add authors to
blog/authors.ymlif needed
- Site config: Edit
docusaurus.config.ts - Sidebar: Edit
sidebars.ts - Styling: Edit
src/css/custom.css - Homepage: Edit
src/pages/index.tsx
Update in src/css/custom.css:
:root {
--ifm-color-primary: #2e8555;
/* ... other colors */
}Before deploying, update these URLs:
-
docusaurus.config.ts-urlandbaseUrl -
docusaurus.config.ts-editUrlpaths -
docusaurus.config.ts-organizationNameandprojectName
Contributions are welcome! To contribute:
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-docs) - Make your changes
- Test locally (
npm start) - Build to verify (
npm run build) - Commit your changes (
git commit -m 'Add amazing documentation') - Push to the branch (
git push origin feature/amazing-docs) - Open a Pull Request
MIT