Skip to content

Commit

Permalink
Add meta image and move pdoc output to static-generated
Browse files Browse the repository at this point in the history
  • Loading branch information
object-Object committed Feb 23, 2024
1 parent 2116a08 commit cde1c9e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 110 deletions.
5 changes: 4 additions & 1 deletion noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,11 +150,14 @@ def docs(session: nox.Session):
"--logo=https://github.com/hexdoc-dev/hexdoc/raw/main/media/hexdoc.svg",
'--edit-url="hexdoc=https://github.com/hexdoc-dev/hexdoc/blob/main/src/hexdoc/"',
f'--footer-text="Version: {hexdoc_version} ({commit})"',
"--output-directory=web/docusaurus/static/api",
"--output-directory=web/docusaurus/static-generated/api",
)

shutil.copytree("media", "web/docusaurus/static-generated/img")

with session.cd("web/docusaurus"):
session.run_always("npm", "install", external=True)

if "build" in session.posargs:
session.run("npm", "run", "build", external=True)
else:
Expand Down
2 changes: 1 addition & 1 deletion web/docusaurus/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/static/api
/static-generated

# Dependencies
/node_modules
Expand Down
5 changes: 4 additions & 1 deletion web/docusaurus/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ const config: Config = {
],

themeConfig: {
image: "img/hexdoc.png",
navbar: {
title: "hexdoc",
logo: {
alt: "hexdoc logo",
src: "img/logo.svg",
src: "img/hexdoc.svg",
},
items: [
{
Expand Down Expand Up @@ -81,6 +82,8 @@ const config: Config = {
defaultMode: "dark",
},
} satisfies Preset.ThemeConfig,

staticDirectories: ["static", "static-generated"],
};

export default config;
107 changes: 0 additions & 107 deletions web/docusaurus/static/img/logo.svg

This file was deleted.

0 comments on commit cde1c9e

Please sign in to comment.