Skip to content

Cleanup tech debt, optimize devcontainer, and fix sitemap URL generation #5

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

Merged
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ RUN apt update && apt upgrade -y
ADD requirements.txt /tmp/
RUN pip3 install -r /tmp/requirements.txt
RUN rm /tmp/requirements.txt

# Help avoid "unsupported locale setting" in Sphinx
RUN echo "export LC_ALL=C.UTF-8" > ~/.bashrc
4 changes: 0 additions & 4 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ root = true
indent_style = space
indent_size = 4

# Tab indentation (no size specified)
[Makefile]
indent_style = tab

[*.rst]
charset = utf-8
max_line_length = 80
Expand Down
17 changes: 1 addition & 16 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ repos:
description: Forces best practice formatting of Python code files.
files: ^((noxfile|conf)|docs/_includes/python/.*)\.py$
- repo: https://github.com/myint/rstcheck
rev: v6.2.4 # Latest as of 05/17/2020
rev: v6.2.4
hooks:
- id: rstcheck
description: Checks syntax of reStructuredText/rst and code blocks nested within it.
Expand All @@ -56,21 +56,6 @@ repos:
description: Run black on python code blocks in documentation files.
files: ^(index|docs/.*|docs/_includes/.*)\.rst$
additional_dependencies: [black==25.1.0]
# - repo: local
# hooks:
# - id: vendir
# name: vale-styles
# description: Pull down vale styles.
# entry: vendir sync
# language: system
# always_run: true
# pass_filenames: false
# - id: vale
# name: vale
# description: Checks style of reStructuredText/rst.
# entry: vale
# language: system
# files: ^(index|docs/.*|docs/_includes/.*|README|CONTRIBUTING)\.rst$
- repo: https://github.com/saltstack/mirrors-nox
rev: v2022.11.21
hooks:
Expand Down
20 changes: 0 additions & 20 deletions docs/Makefile

This file was deleted.

42 changes: 5 additions & 37 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,19 +84,7 @@ def setup(app):
copyright = f"{copyright_year}, VMware, Inc."
author = "VMware, Inc."

# Variables to pass into the docs from sitevars.txt for rst substitution
with open("sitevars.rst") as site_vars_file:
site_vars = site_vars_file.read().splitlines()

rst_prolog = """
{}
""".format(
"\n".join(site_vars[:])
)

# Pull release from "release" in sitevars.rst
release = [s for s in site_vars if "|release|" in s][0].split(":: ")[1]
version = release
version = "latest"

# -- General configuration ---------------------------------------------------

Expand All @@ -113,7 +101,6 @@ def setup(app):
'sphinx_sitemap', # Required for the sitemap
]


source_suffix = ".rst"

# Add any paths that contain templates here, relative to this directory.
Expand All @@ -125,8 +112,7 @@ def setup(app):
exclude_patterns = [
"_build",
"Thumbs.db",
".DS_Store",
"sitevars.rst",
".DS_Store"
]


Expand All @@ -140,7 +126,9 @@ def setup(app):
html_show_sourcelink = True # False on private repos; True on public repos
html_theme = 'furo'
html_title = project
html_baseurl = 'https://docs.saltproject.io/salt/user-guide/en/latest/'
html_baseurl = 'https://docs.saltproject.io/salt/user-guide/'
# Extends baseurl, in combination with version value
sitemap_locales = ['en']

html_theme_options = {
"dark_css_variables": {
Expand Down Expand Up @@ -170,23 +158,3 @@ def setup(app):
# pixels large. Favicons can be up to at least 228x228. PNG
# format is supported as well, not just .ico'
html_favicon = "_static/img/SaltProject_Logomark_teal.png"

###
# PDF Generation / LaTeX configuration
###
# If generating PDFs in the future, should ensure external logo is copied local
# https://gitlab.com/saltstack/open/salt-branding-guide/-/raw/master/logos/SaltProject_altlogo_teal.png?inline=true
#latex_logo = "docs/_static/img/SaltProject_verticallogo_black.png"

# Linux Biolinum, Linux Libertine: https://en.wikipedia.org/wiki/Linux_Libertine
# Source Code Pro: https://github.com/adobe-fonts/source-code-pro/releases
latex_elements = {
"inputenc": "",
"utf8extra": "",
"preamble": r"""
\usepackage{fontspec}
\setsansfont{Linux Biolinum O}
\setromanfont{Linux Libertine O}
\setmonofont{Source Code Pro}
""",
}
35 changes: 0 additions & 35 deletions docs/make.bat

This file was deleted.

1 change: 0 additions & 1 deletion docs/sitevars.rst

This file was deleted.