Skip to content

Commit 57ec84d

Browse files
Upgrade to hip (#64)
1 parent 48aa623 commit 57ec84d

3 files changed

Lines changed: 149 additions & 14 deletions

File tree

‎pyproject.toml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ classifiers = [
2323
"Topic :: Internet :: WWW/HTTP",
2424
]
2525
dependencies = [
26-
"httpx",
26+
"hip",
2727
"click",
2828
"jinja2",
2929
"markdown",

‎src/mkdocs/mkdocs.py‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,8 @@
44
import jinja2
55
import markdown
66
import pathlib
7-
import posixpath
87
import shutil
9-
import httpx
8+
import hip
109

1110

1211
RED = '\033[31m'
@@ -297,13 +296,13 @@ def app(request):
297296
toc = TableOfContents(self.md)
298297
page_ctx = PageContext(page=resource, text=text, html=html, toc=toc)
299298
output = self.base.render(page=page_ctx, nav=self.nav)
300-
return httpx.Response(200, content=httpx.HTML(output))
299+
return hip.Response(200, content=hip.HTML(output))
301300
elif isinstance(resource, Static):
302301
input_path = input_dir.joinpath(resource.path)
303-
return httpx.Response(200, content=httpx.File(input_path))
304-
return httpx.Response(404, content=httpx.Text("Not Found"))
302+
return hip.Response(200, content=hip.File(input_path))
303+
return hip.Response(404, content=hip.Text("Not Found"))
305304

306-
server = httpx.Server(app)
305+
server = hip.Server(app)
307306
server.serve()
308307

309308

0 commit comments

Comments
 (0)