Skip to content

Commit 01d27bc

Browse files
committed
replace calls to cookiecutter with other template
1 parent 82b1576 commit 01d27bc

File tree

5 files changed

+21
-23
lines changed

5 files changed

+21
-23
lines changed

abbreviations.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
{
2+
"AUTHOR": "The user/org name on GitHub",
23
"DESCRIPTION": "A description of your project",
34
"PACKAGE_NAME": "The name of the package (minus the 'render_engine')",
5+
"INSTALLABLE_PACKAGE": "Same as PACKAGE_NAME, but with underscores instead of dashes and lowercase",
46
"PROJECT_NAME": "The proper name of the package (What you would see in the README)",
57
"THEME_CLASS": "The name of the theme as it will be imported"
8+
"PREFIX": "Unique shortname for the package where templates will live. This is where template fallbacks will be stored"
69
}

docs/app.py

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,13 @@
33
from render_engine.parsers.markdown import MarkdownPageParser
44
from render_engine.site import Site
55

6-
from {{cookiecutter.project_name}} import {{cookiecutter._theme_name}}
6+
from <PROJECT_NAME> import <THEME_CLASS>
77

88
app = Site()
99
app.output_path = "docs/output"
1010
app.site_vars.update ({
11-
"SITE_TITLE": f"{{cookiecutter._theme_name}}",
11+
"SITE_TITLE": f"<THEME_CLASS>",
1212
"SITE_URL": "https://kjaymiller.github.io/render_engine_theme_kjaymiller/",
13-
"OWNER": {
14-
"name": f"{{cookiecutter.author}}",
15-
"email": f"{{cookiecutter.email}}",
16-
},
1713
"NAVIGATION": [
1814
{
1915
"text": "Docs",
@@ -24,9 +20,8 @@
2420
"url": "https://github.com/kjaymiller/render_engine_kjaymiller_theme",
2521
}
2622
],
27-
"theme": {}
2823
})
29-
app.register_themes({{cookiecutter._theme_name}})
24+
app.register_themes(<THEME_CLASS>)
3025

3126
@app.collection
3227
class Docs(Collection):

pyproject.toml

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,35 +3,31 @@ requires = ["setuptools", "setuptools_scm", "wheel"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
6-
name = "{{cookiecutter.project_name|replace('_', '-')}}"
6+
name = "render-engine-<INSTALLABLE_NAME>"
77
dynamic = ["version"]
8-
description = "{{cookiecutter.description}}"
8+
description = "<DESCRIPTION>"
99
readme = "README.md"
1010

1111
dependencies = [
12-
'jinja2',
13-
"render-engine>=2023.10.2b2"
12+
"jinja2",
13+
"render-engine",
14+
# Include any other dependencies here
1415
]
1516

1617
[project.optional-dependencies]
1718
dev = [
18-
"axe-playwright-python",
19-
"black",
20-
"playwright",
2119
"pytest",
22-
"pytest-mock",
2320
"pytest-cov",
24-
"pytest-playwright",
2521
"ruff",
2622
]
2723

2824
[tool.setuptools_scm]
2925
local_scheme = "no-local-version"
3026

3127
[project.urls]
32-
homepage = "https://github.com/{{cookiecutter.author}}/{{cookiecutter.project_name}}"
33-
repository = "https://github.com/{{cookiecutter.author}}/{{cookiecutter.project_name}}"
34-
documentation = "https://github.io/{{cookiecutter.author}}/{{cookiecutter.project_name}}"
28+
homepage = "https://github.com/<AUTHOR>/<PROJECT_NAME>"
29+
repository = "https://github.com/<AUTHOR>/<PROJECT_NAME>"
30+
documentation = "https://github.io/<AUTHOR>/<PROJECT_NAME>"
3531

3632
[tool.semantic_release]
3733
version_toml = "pyproject.toml:project.version"
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from theme import <THEME_CLASS>
2+
3+
__all__ = ["<THEME_CLASS>"]
Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@
44
from render_engine.utils.themes import Theme
55
# Add plugins here
66

7-
{{cookiecutter._theme_name}} = Theme(
8-
loader=PackageLoader(f"{{cookiecutter.project_name}}", "templates"),
7+
<THEME_CLASS> = Theme(
8+
prefix = <PREFIX>,
9+
loader=PackageLoader(f"<PROJECT_NAME>", "templates"),
910
static_dir= pathlib.Path(__file__).parent / "static",
1011
plugins = [],
1112
filters = {},
12-
)
13+
)

0 commit comments

Comments
 (0)