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
9595 response = test_client .get ("/gallery/index.html" )
9696 assert response .status_code == 200
9797 html = response .text
98- # output = public / "gallery/index.html"
9998 with open (public / "gallery/index.html" , "w" ) as f :
10099 f .write (html )
101100
@@ -106,6 +105,22 @@ def build() -> None: # pragma: no cover
106105 output = public / f"pages/{ page .name } .html"
107106 output .write_text (response .text )
108107
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+
109124 # And for each example
110125 for example in resources .examples .values ():
111126 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:
6666async def authors (request : Request ) -> _TemplateResponse :
6767 """Handle the author listing page."""
6868 these_authors : Iterator [Example ] = request .app .state .resources .authors .values ()
69- root_path = ".."
69+ root_path = "../.. "
7070
7171 return templates .TemplateResponse (
7272 "authors.jinja2" ,
Original file line number Diff line number Diff line change 1616 <div class =" tile is-parent is-4" >
1717 <article class =" tile is-child box" >
1818 <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 >
2020 </p >
2121 <div class =" content" >
2222 {{ author.body | safe }}
Original file line number Diff line number Diff line change 2626 <a id =" navbarGallery" class =" navbar-item" href =" {{ root_path }}/gallery" >
2727 Gallery
2828 </a >
29- <a id =" navbarAuthors" class =" navbar-item" href =" {{ root_path }}/authors" >
29+ <a id =" navbarAuthors" class =" navbar-item" href =" {{ root_path }}/gallery/ authors" >
3030 Authors
3131 </a >
3232 <a id =" navbarJoin" class =" navbar-item" href =" {{ root_path }}/pages/contributing.html" >
You can’t perform that action at this time.
0 commit comments