A simple, fast, and customizable documentation site template built with Eleventy (11ty).
- 📝 Markdown-based content
- 🎨 Clean, responsive design
- 🔍 Built-in search functionality
- 📱 Mobile-friendly navigation
- ⚡ Fast static site generation
- 🌙 Dark mode support
- 🚀 Automatic deployment to GitHub Pages
-
Install dependencies
npm install
-
Start development server
npm start
-
Open in browser Navigate to
http://localhost:8080
- Create markdown files in
assets/docs/ - Add front matter with title
- Write your content
- The page is automatically generated
Example:
---
layout: doc.njk
title: "My Page"
---
# My Documentation
Your content here...docs-template/
├── assets/
│ └── docs/ # Your markdown documentation files
├── _includes/ # Layout templates
├── _data/ # Data files (navigation, etc.)
├── src/
│ ├── css/ # Stylesheets
│ └── js/ # JavaScript files
├── _site/ # Generated site (after build)
├── .github/
│ └── workflows/ # GitHub Actions workflows
├── index.md # Homepage
└── package.json # Dependencies and scripts
This template is configured for automatic deployment to GitHub Pages:
-
Enable GitHub Pages
- Go to your repository settings
- Navigate to "Pages" section
- Under "Build and deployment":
- Source: Select "GitHub Actions"
-
Push to main/master branch
git add . git commit -m "Your message" git push
-
Site will be automatically deployed
- The workflow will build and deploy your site
- Your site will be available at:
https://username.github.io/repository-name/
If this repository is a template:
- Click "Use this template" button
- Create your new repository
- Clone and customize your content
- Enable GitHub Pages in settings (Source: GitHub Actions)
- Push to main branch
- Your documentation site is ready!
# Start development server with live reload
npm start
# Build for production
npm run build
# Serve built site locally
npm run serveEdit _data/navigation.js to customize the menu:
module.exports = [
{
title: "Getting Started",
url: "/docs/Getting-Started/"
},
{
title: "User Guide",
children: [
{ title: "Installation", url: "/docs/User-Guide/Installation/" }
]
}
];Edit _includes/base.njk to change the site title and branding.
Customize styles in src/css/style.css.
For detailed usage instructions and examples, see the Getting Started Guide or visit your deployed site.
Make sure:
- GitHub Pages is enabled in repository settings
- Source is set to "GitHub Actions"
- The workflow has run successfully
- You're using the correct URL format
- All links use the
| urlfilter in templates
- Delete
node_modulesandpackage-lock.json - Run
npm install - Try building again with
npm run build
MIT License - feel free to use this template for your projects!
Contributions are welcome! Feel free to:
- Report bugs
- Suggest features
- Submit pull requests
- Check the documentation
- Open an issue on GitHub
- Review Eleventy documentation