Skip to content

Commit f0bf6f5

Browse files
Merge pull request saltstack#5 from scriptautomate-bc/tidy-up-conf-sitevars
Cleanup tech debt, optimize devcontainer, and fix sitemap URL generation
2 parents a82e7c6 + 30d34ed commit f0bf6f5

File tree

7 files changed

+9
-113
lines changed

7 files changed

+9
-113
lines changed

.devcontainer/Dockerfile

+3
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,6 @@ RUN apt update && apt upgrade -y
66
ADD requirements.txt /tmp/
77
RUN pip3 install -r /tmp/requirements.txt
88
RUN rm /tmp/requirements.txt
9+
10+
# Help avoid "unsupported locale setting" in Sphinx
11+
RUN echo "export LC_ALL=C.UTF-8" > ~/.bashrc

.editorconfig

-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,6 @@ root = true
66
indent_style = space
77
indent_size = 4
88

9-
# Tab indentation (no size specified)
10-
[Makefile]
11-
indent_style = tab
12-
139
[*.rst]
1410
charset = utf-8
1511
max_line_length = 80

.pre-commit-config.yaml

+1-16
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ repos:
4141
description: Forces best practice formatting of Python code files.
4242
files: ^((noxfile|conf)|docs/_includes/python/.*)\.py$
4343
- repo: https://github.com/myint/rstcheck
44-
rev: v6.2.4 # Latest as of 05/17/2020
44+
rev: v6.2.4
4545
hooks:
4646
- id: rstcheck
4747
description: Checks syntax of reStructuredText/rst and code blocks nested within it.
@@ -56,21 +56,6 @@ repos:
5656
description: Run black on python code blocks in documentation files.
5757
files: ^(index|docs/.*|docs/_includes/.*)\.rst$
5858
additional_dependencies: [black==25.1.0]
59-
# - repo: local
60-
# hooks:
61-
# - id: vendir
62-
# name: vale-styles
63-
# description: Pull down vale styles.
64-
# entry: vendir sync
65-
# language: system
66-
# always_run: true
67-
# pass_filenames: false
68-
# - id: vale
69-
# name: vale
70-
# description: Checks style of reStructuredText/rst.
71-
# entry: vale
72-
# language: system
73-
# files: ^(index|docs/.*|docs/_includes/.*|README|CONTRIBUTING)\.rst$
7459
- repo: https://github.com/saltstack/mirrors-nox
7560
rev: v2022.11.21
7661
hooks:

docs/Makefile

-20
This file was deleted.

docs/conf.py

+5-37
Original file line numberDiff line numberDiff line change
@@ -84,19 +84,7 @@ def setup(app):
8484
copyright = f"{copyright_year}, VMware, Inc."
8585
author = "VMware, Inc."
8686

87-
# Variables to pass into the docs from sitevars.txt for rst substitution
88-
with open("sitevars.rst") as site_vars_file:
89-
site_vars = site_vars_file.read().splitlines()
90-
91-
rst_prolog = """
92-
{}
93-
""".format(
94-
"\n".join(site_vars[:])
95-
)
96-
97-
# Pull release from "release" in sitevars.rst
98-
release = [s for s in site_vars if "|release|" in s][0].split(":: ")[1]
99-
version = release
87+
version = "latest"
10088

10189
# -- General configuration ---------------------------------------------------
10290

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

116-
117104
source_suffix = ".rst"
118105

119106
# Add any paths that contain templates here, relative to this directory.
@@ -125,8 +112,7 @@ def setup(app):
125112
exclude_patterns = [
126113
"_build",
127114
"Thumbs.db",
128-
".DS_Store",
129-
"sitevars.rst",
115+
".DS_Store"
130116
]
131117

132118

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

145133
html_theme_options = {
146134
"dark_css_variables": {
@@ -170,23 +158,3 @@ def setup(app):
170158
# pixels large. Favicons can be up to at least 228x228. PNG
171159
# format is supported as well, not just .ico'
172160
html_favicon = "_static/img/SaltProject_Logomark_teal.png"
173-
174-
###
175-
# PDF Generation / LaTeX configuration
176-
###
177-
# If generating PDFs in the future, should ensure external logo is copied local
178-
# https://gitlab.com/saltstack/open/salt-branding-guide/-/raw/master/logos/SaltProject_altlogo_teal.png?inline=true
179-
#latex_logo = "docs/_static/img/SaltProject_verticallogo_black.png"
180-
181-
# Linux Biolinum, Linux Libertine: https://en.wikipedia.org/wiki/Linux_Libertine
182-
# Source Code Pro: https://github.com/adobe-fonts/source-code-pro/releases
183-
latex_elements = {
184-
"inputenc": "",
185-
"utf8extra": "",
186-
"preamble": r"""
187-
\usepackage{fontspec}
188-
\setsansfont{Linux Biolinum O}
189-
\setromanfont{Linux Libertine O}
190-
\setmonofont{Source Code Pro}
191-
""",
192-
}

docs/make.bat

-35
This file was deleted.

docs/sitevars.rst

-1
This file was deleted.

0 commit comments

Comments
 (0)