This repository hosts the official documentation website for Fireact.dev, built with Hugo and the Docsy theme.
The documentation site provides comprehensive guides, API references, and tutorials for developers using Fireact.dev. It includes:
- Getting Started guides
- Component API documentation
- Custom development tutorials
- Cloud Functions reference
- Type definitions
- Best practices and examples
Visit the live documentation at: docs.fireact.dev
- Hugo: Static site generator
- Docsy Theme: Documentation theme with search and navigation
- Markdown: Content format
- PostCSS: CSS processing
- Autoprefixer: CSS vendor prefixing
- Hugo Extended (v0.110.0 or higher) - Installation Guide
- Node.js (v18 or higher) for PostCSS processing
- npm for dependency management
macOS:
brew install hugoWindows:
choco install hugo-extended
# or
scoop install hugo-extendedLinux:
# Snap
snap install hugo --channel=extended
# Or download from GitHub releases
wget https://github.com/gohugoio/hugo/releases/download/v0.125.0/hugo_extended_0.125.0_linux-amd64.deb
sudo dpkg -i hugo_extended_0.125.0_linux-amd64.debVerify installation:
hugo version
# Should show "extended" in the version# Navigate to docs directory
cd docs
# Install dependencies
npm install
# Initialize theme submodule (if needed)
git submodule update --init --recursive# Start Hugo server with drafts
hugo server -D
# Or without drafts
hugo serverThe site will be available at: http://localhost:1313
Features:
- Live reload on content changes
- Fast rebuild times
- Draft content preview with
-Dflag
# Build static site
hugo
# Output will be in public/ directorydocs/
├── content/ # Documentation content (Markdown)
│ ├── _index.md # Homepage
│ ├── getting-started.md # Getting started guide
│ ├── app/ # App package docs
│ │ ├── components/ # Component documentation
│ │ ├── contexts/ # Context API docs
│ │ ├── hooks/ # Custom hooks docs
│ │ └── types/ # TypeScript types docs
│ ├── functions/ # Cloud Functions docs
│ │ ├── functions/ # Function reference
│ │ └── types/ # Function types docs
│ └── custom-development/ # Development guides
├── themes/ # Hugo themes
│ └── docsy/ # Docsy theme (submodule)
├── static/ # Static assets (images, CSS, JS)
├── layouts/ # Custom layout overrides
├── config.toml # Hugo configuration
├── package.json # Node dependencies
└── node_modules/ # npm dependencies
-
Create a new markdown file:
# For a new page hugo new content/path/to/page.md # For a new section hugo new content/section/_index.md
-
Front matter template:
--- title: "Page Title" linkTitle: "Short Title" type: "docs" weight: 10 description: > Brief description of the page --- # Content starts here
-
Section index template:
--- title: "Section Name" linkTitle: "Section" type: "docs" weight: 10 cascade: type: "docs" --- ## Section Overview
Front Matter Fields:
title: Full page title (shown in browser tab)linkTitle: Short title (shown in navigation)type: Always "docs" for documentation pagesweight: Controls sort order (lower = higher in menu)description: SEO and preview descriptionno_list: Set totrueto hide page from section list
Content Guidelines:
- Use clear, concise language
- Include code examples where appropriate
- Add screenshots for UI features
- Link to related documentation
- Keep paragraphs short
- Use headings for structure
Use fenced code blocks with language specification:
```typescript
// TypeScript example
import { useAuth } from '@fireact.dev/app';
const MyComponent = () => {
const { user } = useAuth();
return <div>{user?.displayName}</div>;
};
```Place images in static/images/ and reference them:
Main configuration in config.toml:
baseURL = "https://docs.fireact.dev/"
title = "Fireact.dev Documentation"
theme = "docsy"
[params]
description = "Official documentation for Fireact.dev"
github_repo = "https://github.com/fireact-dev/fireact.dev"
[params.ui]
navbar_logo = true
sidebar_menu_compact = trueCustom CSS in assets/scss/_styles_project.scss:
// Custom styles
.custom-class {
// Your styles
}Override theme layouts by creating files in layouts/ with the same path as in themes/docsy/layouts/.
The documentation site includes search functionality powered by Docsy's built-in search.
To rebuild the search index:
hugo server
# Index rebuilds automaticallyThe documentation automatically deploys when changes are pushed to the main branch.
# Build the site
hugo
# Deploy public/ directory to your hosting provider# Build
hugo
# Deploy
firebase deploy --only hosting- Connect repository to Netlify
- Set build command:
hugo - Set publish directory:
public - Deploy
# Build
hugo
# Push public/ directory to gh-pages branch
git subtree push --prefix public origin gh-pages- Clear and Concise: Use simple language
- Code Examples: Include working examples
- Screenshots: Add visuals for UI features
- Links: Cross-reference related documentation
- Structure: Use headings and lists
- Testing: Verify all examples work
- Grammar: Proofread before submitting
- Fork the repository
- Create a branch:
git checkout -b docs/improve-guide - Make changes to markdown files in
content/ - Test locally:
hugo server - Commit:
git commit -m "docs: improve getting started guide" - Push:
git push origin docs/improve-guide - Create Pull Request
- Use Markdown formatting consistently
- Follow existing file naming conventions
- Include front matter for all pages
- Test all code examples
- Check links are not broken
- Optimize images before adding
- Follow the style guide
# Update theme submodule
cd themes/docsy
git checkout main
git pull origin main
cd ../..
# Commit theme update
git add themes/docsy
git commit -m "docs: update Docsy theme"# Update npm packages
npm update
# Check for outdated packages
npm outdated# Install hugo link checker
npm install -g @lycheeverse/lychee
# Check links
lychee 'content/**/*.md'Ensure Hugo Extended is installed:
hugo version
# Should show "extended"Update submodules:
git submodule update --init --recursiveClear Hugo cache:
hugo --cleanDestinationDir
rm -rf public/
hugoReinstall dependencies:
rm -rf node_modules package-lock.json
npm installChange the port:
hugo server -p 1314- Hugo Documentation: https://gohugo.io/documentation/
- Docsy Theme Docs: https://www.docsy.dev/docs/
- Markdown Guide: https://www.markdownguide.org/
- Hugo Shortcodes: https://gohugo.io/content-management/shortcodes/
- Main Project: https://github.com/fireact-dev/fireact.dev
This documentation is open source and available under the MIT License.