Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add robots.txt #583

Merged
merged 1 commit into from
Jun 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
}
);

sphinx-sitemap = super.sphinx-sitemap.overridePythonAttrs (
old: {
buildInputs = (old.buildInputs or [ ]) ++ [ super.setuptools ];
}
);

};
in
rec {
Expand Down
19 changes: 17 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ sphinx = "*"
sphinx-book-theme = "^1.0.0"
sphinx-copybutton = "*"
sphinx-design = "^0.3.0"
sphinx-sitemap = "^2.5.0"

[tool.poetry.dev-dependencies]
black = "==22.8.0"
Expand Down
5 changes: 4 additions & 1 deletion source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
"sphinx_copybutton",
"sphinx_design",
"extractable_code_block",
"sphinx_sitemap",
]

# Add myst-specific extensions, see what is available on
Expand Down Expand Up @@ -135,6 +136,8 @@

# -- Options for HTML output ----------------------------------------------

html_baseurl = "https://nix.dev"

html_theme = "sphinx_book_theme"

# https://alabaster.readthedocs.io/en/latest/customization.html
Expand Down Expand Up @@ -174,7 +177,7 @@
# Add any extra paths that contain custom files (such as robots.txt or
# .htaccess) here, relative to this directory. These files are copied
# directly to the root of the documentation.
# html_extra_path = []
html_extra_path = ["robots.txt"]

# If not None, a 'Last updated on:' timestamp is inserted at every page
# bottom, using the given strftime format.
Expand Down
4 changes: 4 additions & 0 deletions source/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
User-agent: *
Disallow: /_static/
Disallow: /_sources/
Sitemap: https://nix.dev/sitemap.xml