diff --git a/.github/workflows/ci_cd.yml b/.github/workflows/ci_cd.yml index 386a4b75b..0761ca1eb 100644 --- a/.github/workflows/ci_cd.yml +++ b/.github/workflows/ci_cd.yml @@ -25,9 +25,28 @@ jobs: - name: Test with tox run: tox -e style + docs-style: + name: Documentation Style Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Running Vale + uses: errata-ai/vale-action@reviewdog + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + with: + files: doc + reporter: github-pr-check + level: error + filter_mode: nofilter + fail_on_error: true + vale_flags: "--config=doc/.vale.ini" + docs: name: Documentation runs-on: ubuntu-latest + needs: docs-style steps: - uses: actions/checkout@v2 @@ -76,6 +95,7 @@ jobs: build: name: Build runs-on: ubuntu-latest + needs: style steps: - uses: actions/checkout@v2 - name: Set up Python @@ -99,7 +119,7 @@ jobs: release: name: Release if: github.event_name == 'push' && contains(github.ref, 'refs/tags') - needs: [style, docs, build] + needs: [style, docs-style, docs, build] runs-on: ubuntu-latest steps: diff --git a/doc/.vale.ini b/doc/.vale.ini new file mode 100644 index 000000000..617b6bea1 --- /dev/null +++ b/doc/.vale.ini @@ -0,0 +1,32 @@ +# Core settings +# ============= + +# Location of our `styles` +StylesPath = "styles" + +# The options are `suggestion`, `warning`, or `error` (defaults to “warning”). +MinAlertLevel = warning + +# By default, `code` and `tt` are ignored. +IgnoredScopes = code, tt + +# By default, `script`, `style`, `pre`, and `figure` are ignored. +SkippedScopes = script, style, pre, figure + +# WordTemplate specifies what Vale will consider to be an individual word. +WordTemplate = \b(?:%s)\b + +# List of Packages to be used for our guidelines +Packages = Google + +# Define the Ansys vocabulary +Vocab = ANSYS + +[*.{md,rst}] + +# Apply the following styles +BasedOnStyles = Vale, Google + +# Removing Google-specific rule - Not applicable under some circumstances +Google.WordList = NO +Google.Colons = NO \ No newline at end of file diff --git a/doc/source/index.rst b/doc/source/index.rst index b6b360330..d31d3d777 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -1,5 +1,5 @@ ========================================== -Ansys Sphinx theme documentation |version| +Ansys Sphinx Theme documentation |version| ========================================== diff --git a/doc/source/options.rst b/doc/source/options.rst index 8ea196946..c0ae2b54f 100644 --- a/doc/source/options.rst +++ b/doc/source/options.rst @@ -29,7 +29,7 @@ Here is how you use ``html_theme_options`` to add breadcrumbs to the Ansys Sphin } When you are on the module homepage, the breadcrumb displays the homepage -title. However, this title is not accessible to Sphinx from other +title. However, this title is not accessible to Sphinx from other documentation pages. Therefore, the ``html_short_title`` is used as the display text for the breadcrumb on the documentation homepage. To ensure a consistent user experience, you should ensure that the ``html_short_title`` (or optionally @@ -49,7 +49,7 @@ Customize icons The Ansys Sphinx theme allows you to control what icons are shown in the navigation bar. -- Conprehensive information on customizing icons is available in +- Comprehensive information on customizing icons is available in `Configure icon links `_ in the documentation for the PyData Sphinx theme. - For information on using `Font Awesome `, an icon diff --git a/doc/styles/.gitignore b/doc/styles/.gitignore new file mode 100644 index 000000000..943db7cb5 --- /dev/null +++ b/doc/styles/.gitignore @@ -0,0 +1,4 @@ +* +!Vocab +!Vocab/** +!.gitignore \ No newline at end of file diff --git a/doc/styles/Vocab/ANSYS/accept.txt b/doc/styles/Vocab/ANSYS/accept.txt new file mode 100644 index 000000000..92764ffdc --- /dev/null +++ b/doc/styles/Vocab/ANSYS/accept.txt @@ -0,0 +1,4 @@ +ANSYS +Ansys +ansys +Ansys Sphinx Theme \ No newline at end of file diff --git a/doc/styles/Vocab/ANSYS/reject.txt b/doc/styles/Vocab/ANSYS/reject.txt new file mode 100644 index 000000000..e69de29bb