From adbdda25426664878e80190d6466427c1ec1f852 Mon Sep 17 00:00:00 2001 From: scriptautomate-bc <204508229+scriptautomate-bc@users.noreply.github.com> Date: Fri, 2 May 2025 19:24:20 -0500 Subject: [PATCH 1/3] Remove sitevars; fix sitemap urls --- .devcontainer/Dockerfile | 3 +++ docs/conf.py | 42 +++++----------------------------------- docs/sitevars.rst | 1 - 3 files changed, 8 insertions(+), 38 deletions(-) delete mode 100644 docs/sitevars.rst diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 58bdac3..ce8fe95 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -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 diff --git a/docs/conf.py b/docs/conf.py index 39bf47c..48a29cb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -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 --------------------------------------------------- @@ -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. @@ -125,8 +112,7 @@ def setup(app): exclude_patterns = [ "_build", "Thumbs.db", - ".DS_Store", - "sitevars.rst", + ".DS_Store" ] @@ -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": { @@ -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} -""", -} diff --git a/docs/sitevars.rst b/docs/sitevars.rst deleted file mode 100644 index e78b8b3..0000000 --- a/docs/sitevars.rst +++ /dev/null @@ -1 +0,0 @@ -.. |release| replace:: 3005 From 0fbb38b5d1584cfe6637f6278da0653b92afe401 Mon Sep 17 00:00:00 2001 From: scriptautomate-bc <204508229+scriptautomate-bc@users.noreply.github.com> Date: Fri, 2 May 2025 19:30:22 -0500 Subject: [PATCH 2/3] Remove no longer used makefiles --- .editorconfig | 4 ---- docs/Makefile | 20 -------------------- docs/make.bat | 35 ----------------------------------- 3 files changed, 59 deletions(-) delete mode 100644 docs/Makefile delete mode 100644 docs/make.bat diff --git a/.editorconfig b/.editorconfig index a1c0559..815f14c 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d4bb2cb..0000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 2119f51..0000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd From 30d34ed26be053ed8da35ae4befd82053376fe81 Mon Sep 17 00:00:00 2001 From: scriptautomate-bc <204508229+scriptautomate-bc@users.noreply.github.com> Date: Fri, 2 May 2025 19:31:27 -0500 Subject: [PATCH 3/3] Cleanup pre-commit config file --- .pre-commit-config.yaml | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7c13721..ff777a8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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. @@ -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: