This repository contains the SampSharp documentation source files. The site is built with VitePress, a fast, modern static site generator.
- Node.js 18+
- npm
-
Install dependencies:
npm install
-
Start the development server:
npm run docs:dev
The site will be available at
http://localhost:5173/ -
Build the static site:
npm run docs:build
-
Preview the production build locally:
npm run docs:preview
All documentation is written in Markdown in the docs/ folder.
- Create a new page: Add a new
.mdfile indocs/ - Update navigation: Edit
docs/.vitepress/config.jsto add the page to the sidebar - Links use absolute paths:
/page-namenot./page-name - Internal links should use absolute paths
- External links require full URLs:
https://example.com - File names are case-sensitive on Linux/Mac
├── docs/
│ ├── .vitepress/
│ │ ├── config.js # VitePress configuration
│ │ └── theme/
│ │ ├── index.js # Theme entry point
│ │ └── style.css # Custom styles
│ ├── index.md # Home page
│ ├── introduction.md # Documentation pages
│ ├── getting-started.md
│ ├── images/ # Images and assets
│ └── ...other markdown files
├── .github/
│ └── workflows/
│ └── deploy.yml # GitHub Actions workflow for auto-deployment
├── package.json
└── README.md
Build errors about dead links
Check:
- Internal links should use absolute paths:
/page-namenot./page-name - External links should include full URLs:
https://example.com - File names must match exactly (case-sensitive on Linux/Mac)
Syntax highlighting not working for code blocks
Some languages (like PAWN) may not be built-in. The build will fall back to text highlighting, which is fine.
Site not deploying via GitHub Actions
- Check that your repository has a
mainbranch (notmaster) - Verify GitHub Pages is configured to use GitHub Actions as source
- Check the Actions tab in your GitHub repository for error logs
The site automatically deploys to GitHub Pages when you push to the main branch via the GitHub Actions workflow (.github/workflows/deploy.yml).
To manually deploy or host elsewhere:
- Build:
npm run docs:build - Upload the contents of
docs/.vitepress/dist/to your hosting provider - Configure your web server to serve the static files