Get help with common issues and questions about OkiDoki.
Problem: npm install -g okidoki
fails with permission errors
# Solution 1: Use sudo (not recommended)
sudo npm install -g okidoki
# Solution 2: Configure npm to use a different directory (recommended)
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH=~/.npm-global/bin:$PATH
npm install -g okidoki
Problem: “okidoki command not found” after installation
# Check if it's installed
npm list -g --depth=0 | grep okidoki
# If installed but not found, check your PATH
echo $PATH
which okidoki
# Add npm global bin to PATH
export PATH=$(npm config get prefix)/bin:$PATH
Problem: okidoki generate
fails with “file not found” error
okidoki.yaml
and sidebars.yaml
existdocs/
directory exists with markdown filesProblem: Generated site has broken links
sidebars.yaml
point to existing filesdocs/
directoryusername.github.io/repository-name
, add baseUrl: "/repository-name/"
to okidoki.yaml
Problem: Build is slow or hangs
okidoki generate --verbose
(or -v
) for detailed outputokidoki init
Initialize a new documentation project with the following options:
Option | Short | Description | Default |
---|---|---|---|
--output | -o | Output directory | (current directory) |
--config | -c | Path to create okidoki configuration file | "okidoki.yaml" |
--sidebars | -b | Path to create sidebars configuration file | "sidebars.yaml" |
--dev | -d | Create a package.json with development scripts (nodemon, concurrently) | false |
--help | Show help information | ||
--version | Show version number |
# Initialize in current directory
okidoki init
# Initialize in a specific directory
okidoki init --output ./my-docs
# Create with custom config file names
okidoki init --config ./config.yaml --sidebars ./navigation.yaml
# Include development setup with package.json
okidoki init --dev
# Initialize with all options
okidoki init -o ./documentation -c ./my-config.yaml -b ./my-sidebars.yaml -d
The init
command creates:
okidoki.yaml
- Main configuration filesidebars.yaml
- Navigation structure filedocs/
directory with sample markdown filespackage.json
with development scripts (when using --dev
)okidoki generate
Generate documentation from markdown files. This command automatically creates:
sitemap.xml
for SEO and search engine indexingOptions:
Option | Short | Description | Default |
---|---|---|---|
--source | -s | Source directory containing markdown files | "docs" |
--output | -o | Output directory for generated files | (auto-generated) |
--config | -c | Path to okidoki configuration file | "okidoki.yaml" |
--sidebars | -b | Path to sidebars configuration file | "sidebars.yaml" |
--verbose | -v | Enable verbose logging | false |
--help | Show help information | ||
--version | Show version number |
# Basic usage (uses default settings)
okidoki generate
# Specify custom directories
okidoki generate --source ./documentation --output ./website
# Use custom configuration files
okidoki generate --config ./config/okidoki.yaml --sidebars ./config/nav.yaml
# Enable verbose logging for troubleshooting
okidoki generate -v
# Combine multiple options
okidoki generate -s ./docs -o ./public -c ./my-config.yaml -v
Q: What file formats does OkiDoki support? A: OkiDoki primarily works with Markdown (.md) files. Images (PNG, JPG, GIF, SVG) and other assets are supported in the docs directory.
Q: Can I use custom CSS or JavaScript? A: Currently, OkiDoki uses built-in themes. Custom styling options may be added in future versions.
Q: How do I change the theme?
A: Edit the theme
section in your okidoki.yaml
file:
site:
theme:
light: "fantasy"
dark: "forest"
Q: Can I have multiple documentation sites?
A: Yes! Each site needs its own directory with separate okidoki.yaml
and sidebars.yaml
files.
Q: How do I add a favicon?
A: Add your favicon file to the docs directory and reference it in okidoki.yaml
:
site:
favicon: "favicon.ico"
Q: How do I organize my documentation into sections?
A: Use the hierarchical structure in sidebars.yaml
:
menu:
- title: "Getting Started"
items:
- title: "Installation"
document: "/install.md"
- title: "Quick Start"
document: "/quickstart.md"
Q: Can I link to external websites?
A: Yes! Use the url
property instead of document
:
menu:
- title: "GitHub Repository"
url: "https://github.com/example/repo"
Q: How do I use global variables?
A: Define them in okidoki.yaml
and use in markdown:
globals:
version: "1.0.0"
api_url: "https://api.example.com"
Then in markdown: Current version: 1.0.40
Q: How do I add syntax highlighting to code blocks? A: Specify the language after the opening backticks:
```javascript
function hello() {
console.log("Hello, world!");
}
```
Q: Can I include HTML in my markdown? A: Yes, standard HTML tags work within markdown files.
Q: How do I create tables? A: Use standard markdown table syntax:
| Header 1 | Header 2 |
|----------|----------|
| Cell 1 | Cell 2 |
Q: How do I add badges to my documentation? A: Use the Handlebars badge helper:
{{badge "My Badge Text" "primary"}}
Or inline: Some text {{badge "Active" "success"}} more text
Error: Configuration file has syntax errors Solutions:
Error: Referenced markdown file doesn’t exist Solutions:
sidebars.yaml
Error: Can’t write to output directory Solutions:
ls -la dist/
okidoki.yaml
Error: Specified theme doesn’t exist Solutions:
okidoki.yaml
fantasy
(light) or forest
(dark)Error: Badge text in sidebars.yaml shows as “undefined” in navigation Cause: Using incorrect badge format (string instead of object) Solution: Use the correct badge object format:
# ❌ Incorrect (shows "undefined")
menu:
- title: "Features"
document: /features.md
badge: "new"
# ✅ Correct format
menu:
- title: "Features"
document: /features.md
badge:
variant: "info"
text: "new"
Available badge variants: info
, success
, warning
, error
, neutral
Error: {{badge "My Badge" "xxprimaryxx"}}
not rendering properly
Solutions:
{{badge "Status: Active" "success"}} within text
Symptoms: okidoki generate
takes more than a few seconds
Solutions:
dist/
directorySymptoms: dist/
directory is unexpectedly large
Solutions:
imageoptim
or online compressorsokidoki generate --verbose
(or -v
) for detailed outputWhen reporting a problem, please include:
okidoki --version
node --version
okidoki.yaml
and sidebars.yaml
Enable verbose logging to troubleshoot build issues:
# Enable debug output (long form)
okidoki generate --verbose
# Enable debug output (short form)
okidoki generate -v
# Alternative: set environment variable
DEBUG=okidoki okidoki generate
This will show:
Current OkiDoki version: 1.0.40
If you’re experiencing persistent issues, try a clean installation:
# Uninstall OkiDoki
npm uninstall -g okidoki
# Clear npm cache
npm cache clean --force
# Reinstall OkiDoki
npm install -g okidoki
# Verify installation
okidoki --version
For project-specific issues:
# Remove generated files
rm -rf dist/
# Regenerate documentation
okidoki generate
Still need help? Check the Quick Start Guide or review the complete Documentation Reference.