ophinode 0.0.1a6__tar.gz → 0.0.1a7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/PKG-INFO +1 -1
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/pyproject.toml +1 -1
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/site.py +9 -6
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/.gitignore +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/LICENSE +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/README.md +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/__init__.py +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/__main__.py +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/constants.py +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/exceptions.py +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/nodes/__init__.py +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/nodes/base.py +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/nodes/html.py +0 -0
- {ophinode-0.0.1a6 → ophinode-0.0.1a7}/src/ophinode/rendering.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.4
|
2
2
|
Name: ophinode
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.1a7
|
4
4
|
Summary: A static site generator written in Python
|
5
5
|
Project-URL: Homepage, https://github.com/deflatedlatte/ophinode
|
6
6
|
Project-URL: Issues, https://github.com/deflatedlatte/ophinode/issues
|
@@ -35,12 +35,7 @@ class Site:
|
|
35
35
|
if not isinstance(pages, collections.abc.Iterable):
|
36
36
|
raise TypeError("pages must be an iterable")
|
37
37
|
for path, page in pages:
|
38
|
-
|
39
|
-
raise ValueError("path to a page must be a str")
|
40
|
-
if path in self._pages_dict:
|
41
|
-
raise ValueError("duplicate page path: " + path)
|
42
|
-
self._pages_dict[path] = page
|
43
|
-
self._pages.append((path, page))
|
38
|
+
self.add_page(path, page)
|
44
39
|
|
45
40
|
self._preprocessors_before_site_build = []
|
46
41
|
self._postprocessors_after_site_build = []
|
@@ -149,6 +144,14 @@ class Site:
|
|
149
144
|
AUTO_EXPORT_FILES_OPTION_DEFAULT_VALUE
|
150
145
|
)
|
151
146
|
|
147
|
+
def add_page(self, path: str, page: Any):
|
148
|
+
if not isinstance(path, str):
|
149
|
+
raise TypeError("path to a page must be a str")
|
150
|
+
if path in self._pages_dict:
|
151
|
+
raise ValueError("duplicate page path: " + path)
|
152
|
+
self._pages_dict[path] = page
|
153
|
+
self._pages.append((path, page))
|
154
|
+
|
152
155
|
def add_processor(
|
153
156
|
self,
|
154
157
|
stage: str,
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|