- Shell 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .forgejo | ||
| .template | ||
| .vscode | ||
| docs | ||
| scripts | ||
| .editorconfig | ||
| .gitattributes | ||
| .gitignore | ||
| .markdownlint.json | ||
| .pre-commit-config.yaml | ||
| .yamllint | ||
| LICENSE | ||
| README.md | ||
| VERSION | ||
Forgejo Repository Template
Standard base template for Forgejo repositories.
Overview
This repository provides a reusable template for creating consistent Forgejo repositories.
It includes a standard project structure, documentation, development tooling, Forgejo Actions workflows and a lightweight template engine that customises repositories during bootstrap.
Features
- Standard repository structure
- Forgejo Actions workflows
- Template engine
- Project profiles
- Bootstrap automation
- Update framework
- VS Code configuration
- Pre-commit support
- YAML and Markdown linting
- ShellCheck validation
Repository Structure
.
├── .forgejo/
├── .template/
├── .vscode/
├── docs/
├── scripts/
│ ├── bootstrap.sh
│ ├── update.sh
│ └── lib/
├── LICENSE
├── README.md
└── VERSION
Quick Start
1. Create a repository
Create a new repository using Use Template in Forgejo.
2. Clone the repository
git clone https://git.example.com/owner/repository.git
cd repository
3. Bootstrap the project
./scripts/bootstrap.sh
The bootstrap process will:
- Validate the repository
- Load template metadata
- Load variables
- Load the selected profile
- Render template placeholders
- Validate the generated project
4. Verify the repository
git status
The working tree should be clean.
Updating
Run:
./scripts/update.sh
This checks the installed template version and prepares future template updates.
Development
Validate all shell scripts:
cd scripts
shellcheck -x bootstrap.sh update.sh lib/*.sh
Run bootstrap:
./bootstrap.sh
Run update:
./update.sh
Template Configuration
The template engine uses:
.template/
├── metadata.yml
├── template.yml
├── variables.yml
└── profiles/
metadata.yml
Template information.
variables.yml
Repository variables.
template.yml
Rendering configuration.
profiles/
Project-specific configuration.
Documentation
Additional documentation is available in:
- docs/template-engine.md
- docs/architecture.md
- docs/CONTRIBUTING.md
- docs/SECURITY.md
- docs/CHANGELOG.md
Roadmap
- Automatic template updates
- Additional project profiles
- Reusable Forgejo Actions
- Extended documentation
License
This project is licensed under the MIT License.