Project Guide - Docusaurus static HTML
1. Introduction
Welcome to the project guide. This document provides an overview of the purpose, scope, and structure of the repository.
Purpose
The goal of this repository is to serve as a knowledge base and framework for creating, managing, and deploying Docusaurus-based documentation projects.
Scope
- Multilingual documentation (SK/EN)
- Support for default and custom deployment methods
- Guides and automation scripts for easier use by students and collaborators
Structure
docs/— Documentation contentsrc/— Source files for custom components and pagesstatic/— Static assets like images and filesMakefile— Commands for build and deployment
2. Deployment Guide
This guide explains how to deploy the documentation site to GitHub Pages.
Default Deployment
-
Run the build command:
npm run build -
Deploy to GitHub Pages:
GIT_USER=YourGitHubUsername npm run deployThis will use the default Docusaurus deploy script and push to the
gh-pagesbranch.
Worktree Deployment (Manual)
This method avoids GitHub Actions usage and pushes directly from your local machine:
- Create or reset the worktree for the
gh-pagesbranch. - Copy the build output into the worktree.
- Commit and push.
Notes
- Ensure your
GIT_USERenvironment variable is set before deploying. - For private repositories, use a personal access token with
reposcope.
3. Troubleshooting
Problem: not a git repository
Cause: The deployment directory is missing a .git folder.
Solution: Recreate the worktree or clone the repository again.
Problem: Invalid username or token
Cause: GitHub no longer supports password authentication. Solution: Use SSH or a personal access token. Example:
git remote set-url origin https://<username>@github.com/<org>/<repo>.git
Problem: Missing language completeness
Cause: Some Docusaurus configurations enforce 100% translation coverage.
Solution: Disable strict mode in docusaurus.config.js by setting:
i18n: {
defaultLocale: 'sk',
locales: ['sk', 'en'],
localeConfigs: {
en: { label: 'English' },
sk: { label: 'Slovensky' }
}
}
General Tips
- Test your build locally with:
npm run serve
- Keep dependencies updated.