Standard repository template for Forgejo projects with CI/CD, development tooling and best practices.
Find a file Use this template
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Rui Guimaraes 8ffdd38ba4
All checks were successful
Continuous Integration / Lint (push) Successful in 15s
Continuous Integration / Pre-commit (push) Successful in 24s
feat(images): modernize Forgejo CI runner images
2026-07-25 23:19:55 +01:00
.forgejo feat(images): modernize Forgejo CI runner images 2026-07-25 23:19:55 +01:00
.template feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
.vscode feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
docs feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
scripts feat(images): modernize Forgejo CI runner images 2026-07-25 23:02:49 +01:00
.editorconfig feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
.gitattributes feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
.gitignore feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
.markdownlint.json feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
.pre-commit-config.yaml feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
.yamllint feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00
LICENSE chore: initialize repository template structure 2026-07-25 07:21:57 +01:00
README.md feat: release forgejo repository template v1.0.0 2026-07-25 21:48:37 +01:00
VERSION feat: initial forgejo repository template 2026-07-25 21:23:38 +01:00

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.