File tree Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Expand file tree Collapse file tree 4 files changed +19
-4
lines changed Original file line number Diff line number Diff line change @@ -95,7 +95,6 @@ def build() -> None: # pragma: no cover
95
95
response = test_client .get ("/gallery/index.html" )
96
96
assert response .status_code == 200
97
97
html = response .text
98
- # output = public / "gallery/index.html"
99
98
with open (public / "gallery/index.html" , "w" ) as f :
100
99
f .write (html )
101
100
@@ -106,6 +105,22 @@ def build() -> None: # pragma: no cover
106
105
output = public / f"pages/{ page .name } .html"
107
106
output .write_text (response .text )
108
107
108
+ # Now for authors and each author
109
+ response = test_client .get ("/authors/index.html" )
110
+ assert response .status_code == 200
111
+ html = response .text
112
+ with open (public / "gallery/authors/index.html" , "w" ) as f :
113
+ f .write (html )
114
+ for author in resources .authors .values ():
115
+ response = test_client .get (f"/authors/{ author .name } .html" )
116
+ output = public / f"gallery/authors/{ author .name } .html"
117
+ output .write_text (response .text )
118
+
119
+ for page in resources .pages .values ():
120
+ response = test_client .get (f"/pages/{ page .name } .html" )
121
+ output = public / f"pages/{ page .name } .html"
122
+ output .write_text (response .text )
123
+
109
124
# And for each example
110
125
for example in resources .examples .values ():
111
126
url = f"/gallery/examples/{ example .name } /index.html"
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ async def gallery(request: Request) -> _TemplateResponse:
66
66
async def authors (request : Request ) -> _TemplateResponse :
67
67
"""Handle the author listing page."""
68
68
these_authors : Iterator [Example ] = request .app .state .resources .authors .values ()
69
- root_path = ".."
69
+ root_path = "../.. "
70
70
71
71
return templates .TemplateResponse (
72
72
"authors.jinja2" ,
Original file line number Diff line number Diff line change 16
16
<div class =" tile is-parent is-4" >
17
17
<article class =" tile is-child box" >
18
18
<p class =" title" ><a
19
- href =" {{ root_path }}/authors/{{ author.name }}.html/ " >{{ author.title }}</a >
19
+ href =" {{ root_path }}/gallery/ authors/{{ author.name }}.html" >{{ author.title }}</a >
20
20
</p >
21
21
<div class =" content" >
22
22
{{ author.body | safe }}
Original file line number Diff line number Diff line change 26
26
<a id =" navbarGallery" class =" navbar-item" href =" {{ root_path }}/gallery" >
27
27
Gallery
28
28
</a >
29
- <a id =" navbarAuthors" class =" navbar-item" href =" {{ root_path }}/authors" >
29
+ <a id =" navbarAuthors" class =" navbar-item" href =" {{ root_path }}/gallery/ authors" >
30
30
Authors
31
31
</a >
32
32
<a id =" navbarJoin" class =" navbar-item" href =" {{ root_path }}/pages/contributing.html" >
You can’t perform that action at this time.
0 commit comments