# Templates

QuantEcon maintains a set of **official templates** to keep new repositories, lectures, and documents
consistent. This page is an index of what is available and when to reach for each.

| Template set | Repository | Use it for |
|---|---|---|
| Workflow templates | [quantecon/actions/templates](https://github.com/QuantEcon/actions/tree/main/templates) | The `ci` / `cache` / `publish` GitHub Actions for a lecture repository |
| Document & brand templates | [QuantEcon/templates](https://github.com/QuantEcon/templates) | Letterhead, correspondence, and brand guidelines |
| Org common files | [QuantEcon/.github](https://github.com/QuantEcon/.github) | The shared `environment.yml` and default issue / pull-request templates |

(tools:templates:workflows)=
## Repository workflow templates

The maintained GitHub Actions workflows for a lecture repository live in
[quantecon/actions/templates](https://github.com/QuantEcon/actions/tree/main/templates). Copy these into a
repository's `.github/workflows/` directory and configure the commented options following that directory's
README.

| Template | Trigger | Purpose |
|---|---|---|
| `ci.yml` | Pull requests | Restore cache → incremental build → PR preview (Netlify / Cloudflare) |
| `cache.yml` | Weekly, manual, or `environment.yml` change on `main` | Full build → save the `_build` execution cache (only saved if all builders pass) |
| `publish.yml` | Push to `main`, or manual dispatch | Restore cache → build → deploy to GitHub Pages (native artifact deployment) |

These templates are built on the {ref}`quantecon/actions <tools:github-actions:quantecon-actions>` reusable
composite-action library and its container, which is the **target architecture** for QuantEcon lecture
CI/CD. See the {ref}`lecture deployment table <publish/gh-pages-repos>` for which repositories have adopted
it.

```{note}
The older `template-lecture-repo` has been **archived**. To start a new lecture repository, copy the
project skeleton — the `lectures/` folder (with its `_config.yml`, `_toc.yml`, `intro.md`, and lecture
files) — from a current lecture repository such as
[lecture-dp](https://github.com/QuantEcon/lecture-dp), and add the workflow templates above. The
[Building a custom Course](../writing/new-repo.md) page walks through the full process.
```

(tools:templates:documents)=
## Document & brand templates

[QuantEcon/templates](https://github.com/QuantEcon/templates) holds official templates for QuantEcon
correspondence and documents, organised one folder per template type.

- **Letterhead** (`letterhead/`) — a LaTeX letterhead for QuantEcon correspondence, including the PSL
  Foundation fiscal-host acknowledgement. See the folder's `README.md` for usage.

The repository's README is also the home of the QuantEcon **brand guidelines**:

| Brand colour | Hex |
|---|---|
| Primary Blue | `#38588C` |
| Dark Blue | `#233758` |
| Accent Blue | `#4A90E2` |
| Teal (logo) | `#3F9A9F` |
| Light Blue (logo) | `#62B2DE` |
| Navy (logo) | `#2A527A` |
| Light Gray | `#6C757D` |

- **Logo:** <https://quantecon.org/assets/img/qehills.png>
- **Typography:** Helvetica Neue
- **Tagline:** *"Open source science for quantitative economics"*

When adding a new document template, follow the repository's contributing guide — create a dedicated
subdirectory with its own `README.md`, use the official branding, and confirm it compiles.

## Organisation common files

Organisation-wide defaults live in [QuantEcon/.github](https://github.com/QuantEcon/.github), including the
shared {ref}`quantecon environment <quantecon-environment>` (`environment.yml`) and the default issue and
pull-request templates that apply across QuantEcon repositories.
