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

Backport changes to 1.8 branch #1271

Merged
merged 32 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
71f3096
Publish 1.8 docs (#1228)
dgarcia360 Sep 25, 2024
5fbcadf
Build(deps): bump setuptools from 74.1.2 to 75.1.0 (#1208)
dependabot[bot] Sep 29, 2024
d83afab
Build(deps-dev): bump babel-loader from 9.1.3 to 9.2.1 (#1209)
dependabot[bot] Sep 29, 2024
417ee92
Build(deps-dev): bump sass-loader from 16.0.1 to 16.0.2 (#1222)
dependabot[bot] Sep 29, 2024
ef09e70
Build(deps-dev): bump postcss-preset-env from 10.0.3 to 10.0.5 (#1223)
dependabot[bot] Sep 29, 2024
22209c3
fix: add update command (#1235)
dgarcia360 Oct 1, 2024
c471503
Build(deps): bump sphinx-tabs from 3.4.5 to 3.4.7 (#1245)
dependabot[bot] Oct 9, 2024
6817d72
Build(deps-dev): bump pre-commit from 3.8.0 to 4.0.1 (#1244)
dependabot[bot] Oct 9, 2024
96b2e17
Build(deps): bump actions/upload-artifact from 4.4.0 to 4.4.2 (#1242)
dependabot[bot] Oct 9, 2024
f24bff8
Build(deps-dev): bump webpack from 5.94.0 to 5.95.0 (#1233)
dependabot[bot] Oct 9, 2024
28d9d60
Build(deps-dev): bump sphinx-autobuild from 2024.9.19 to 2024.10.3 (#…
dependabot[bot] Oct 9, 2024
74aed58
Build(deps-dev): bump foundation-sites from 6.8.1 to 6.9.0 (#1234)
dependabot[bot] Oct 9, 2024
5f7fa93
Build(deps-dev): bump @babel/preset-env from 7.25.4 to 7.25.7 (#1237)
dependabot[bot] Oct 9, 2024
4940e77
Build(deps): bump lycheeverse/lychee-action from 1.10.0 to 2.0.0 (#1243)
dependabot[bot] Oct 9, 2024
adeb5c4
Build(deps-dev): bump sass from 1.78.0 to 1.79.4 (#1232)
dependabot[bot] Oct 9, 2024
3c07ba3
fix: tooltip glossary priority (#1246)
dgarcia360 Oct 11, 2024
51b6e5f
Build(deps-dev): bump postcss-preset-env from 10.0.5 to 10.0.7 (#1252)
dependabot[bot] Oct 11, 2024
d5dea40
Build(deps-dev): bump @babel/core from 7.25.2 to 7.25.8 (#1253)
dependabot[bot] Oct 11, 2024
6741d72
Build(deps-dev): bump eslint-plugin-import from 2.30.0 to 2.31.0 (#1248)
dependabot[bot] Oct 11, 2024
ce138c2
Build(deps): bump actions/upload-artifact from 4.4.2 to 4.4.3 (#1250)
dependabot[bot] Oct 11, 2024
f7c26b4
Build(deps-dev): bump @babel/preset-env from 7.25.7 to 7.25.8 (#1251)
dependabot[bot] Oct 11, 2024
fe931b0
Build(deps): bump lycheeverse/lychee-action from 2.0.0 to 2.0.2 (#1256)
dependabot[bot] Oct 15, 2024
ed763bf
fix: legacy panel box (dark theme) (#1258)
dgarcia360 Oct 18, 2024
9af0f19
Build(deps-dev): bump starlette from 0.39.0 to 0.40.0 (#1261)
dependabot[bot] Oct 18, 2024
98b8c44
Build(deps-dev): bump sass from 1.79.4 to 1.80.2 (#1265)
dependabot[bot] Oct 18, 2024
5880d85
Build(deps): bump setuptools from 75.1.0 to 75.2.0 (#1263)
dependabot[bot] Oct 18, 2024
4412c8a
fix: blink on dark theme (#1260)
dgarcia360 Oct 18, 2024
f6223a7
Build(deps-dev): bump eslint from 8.57.0 to 9.13.0 (#1268)
dependabot[bot] Oct 21, 2024
4d548c6
Build(deps-dev): bump sass from 1.80.2 to 1.80.3 (#1269)
dependabot[bot] Oct 21, 2024
0ca3088
chore: replace localstorage with cache (#1257)
dgarcia360 Oct 21, 2024
9a8ae54
rm: fontawesome support (#1266)
dgarcia360 Oct 21, 2024
fe15af9
docs: remove custom icons (#1267)
dgarcia360 Oct 21, 2024
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
2 changes: 1 addition & 1 deletion .github/workflows/docs-links.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v1.10.0
uses: lycheeverse/lychee-action@v2.0.2
with:
args: --verbose --no-progress './**/*.md' './**/*.rst'
env:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
.

- name: Upload artifact
uses: actions/[email protected].0
uses: actions/[email protected].3
with:
name: github-pages
path: ${{ runner.temp }}/artifact.tar
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/multiversion-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: '3.10'

- name: Set up requirements
run: python -m pip install -r requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/theme-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.7
python-version: "3.10"

- name: Set up env
run: |
Expand Down
3 changes: 3 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ setupenv:
.PHONY: setup
setup:
$(POETRY) install

.PHONY: update
update:
$(POETRY) update

# Clean commands
Expand Down
2 changes: 1 addition & 1 deletion docs/_utils/pyproject_template.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ authors = ["ScyllaDB Documentation Contributors"]
[tool.poetry.dependencies]
python = "^3.10"
pygments = "^2.18.0"
sphinx-scylladb-theme = "^1.6.1"
sphinx-scylladb-theme = "^1.8.1"
myst-parser = "^3.0.1"
sphinx-autobuild = "^2024.4.19"
Sphinx = "^7.3.7"
Expand Down
117 changes: 92 additions & 25 deletions docs/source/commands.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,52 @@ Commands

Use the command-line interface to run the following commands.

Prerequisites
-------------
.. note:: Make sure you meet the necessary prerequisites before running these commands. For details, see :ref:`Prerequisites <prerequisites>`.

Setup commands
--------------

setupenv
========

Installs system dependencies required to build the docs, such as Poetry.

.. code:: console

make setupenv

setup
=====

Installs the required Python dependencies to build the documentation.

.. code:: console

make setup

.. note:: ``make setup`` is called automatically before running build commands.

To run the following commands, you will need to have installed:
update
======

Updates Python dependencies to the latest version.

.. code:: console

- A Unix-based terminal. For Windows, use `Windows Subsystem for Linux <https://learn.microsoft.com/en-us/windows/wsl/install>`_.
- `Python 3.7 <https://www.python.org/downloads/>`_ or later.
- `Poetry #.12 <https://python-poetry.org/docs/master/>`_ or later.
- `Make <https://www.gnu.org/software/make/>`_.
- `Git <https://git-scm.com/>`_.
make update

As a result, updates the ``poetry.lock`` file.


Build commands
--------------

.. _Make_Preview:

Preview current branch
----------------------
preview
=======

The preview command builds a local instance of the docs site so you can view the rendering in a sandbox environment on your local browser.
Builds a local instance of the docs site so you can view the rendering in a sandbox environment on your local browser.

To preview the docs:

Expand All @@ -47,18 +76,19 @@ To decrease verbosity, use the option ``-Q``:

make preview SPHINXOPTS=-Q

To fix the error `pyproject.toml changed significantly since poetry.lock was last generated.`, run the following command:
To fix the error ``pyproject.toml changed significantly since poetry.lock was last generated.``, run the following command:

.. code:: console

poetry lock --no-update

Then, run the preview command again.

Preview multiversion
--------------------

The multiversionpreview command generates a local instance of the docs site with all :doc:`specified versions <../configuration/multiversion>` available for navigation.
multiversionpreview
===================

Generates a local instance of the docs site with all :doc:`specified versions <../configuration/multiversion>` available for navigation.
You can view the rendering in a sandbox environment on your local browser.

To preview multiple versions:
Expand All @@ -72,10 +102,26 @@ To preview multiple versions:

#. Open http://0.0.0.0:5500/ with your preferred browser.

For further guidance on using the `multiversionpreview command`, see :doc:`Multiversion configuration <../configuration/multiversion>`.
For further guidance on using the ``multiversionpreview command``, see :doc:`Multiversion configuration <../configuration/multiversion>`.

dirhtml
=======

Build HTML for multiple versions
--------------------------------
Generates the documentation in HTML format.

.. note:: The command ``make dirhtml`` is aimed to be used by GitHub Actions CI. While documenting new features, it is not advised to run ``make dirhtml``, but ``make preview`` instead.

.. code:: console

cd docs
make multiversion

Docs are generated under the ``docs/_build/dirhtml`` directory.

multiversion
============

Generates multiple versions of the docs with all :doc:`specified versions <../configuration/multiversion>` available for navigation.

.. note:: The command ``make multiversion`` is aimed to be used by GitHub Actions CI. While documenting new features, it is not advised to run ``make multiversion``, but ``make preview`` instead.

Expand All @@ -84,22 +130,43 @@ Build HTML for multiple versions
cd docs
make multiversion

The previous command generates HTML docs under the ``docs/_build/dirhtml`` directory.
Docs are generated under the ``docs/_build/dirhtml`` directory.

Clean all builds
----------------
redirects
=========

The ``make preview`` operation creates content in the ``_build`` directory. When making changes to the docs, it is helpful to delete the contents of this directory before running ``make preview``.
Generates HTML redirects from the ``_utils/redirects.yaml`` file.

.. note:: The command ``make multiversion`` is aimed to be used by GitHub Actions CI.

.. code:: console

cd docs
make multiversion

Redirects are generated under the ``docs/_build/dirhtml`` directory.

Clean commands
--------------

clean
=====

Before making changes to the docs, it's helpful to clear the previous build by deleting the contents of the ``build`` directory.
This ensures that the changes you make are reflected correctly.

.. code:: console

cd docs
make clean

Check for broken links
----------------------
Test commands
-------------

linkcheck
=========

Check for broken links on the documentation site.
Checks the documentation site for broken links.

.. code:: console

Expand Down
3 changes: 2 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# Builds documentation for the following tags and branches.
TAGS = []
BRANCHES = [
"branch-1.8",
"branch-1.7",
"branch-1.6",
"branch-1.5",
Expand All @@ -24,7 +25,7 @@
"master",
]
# Sets the latest version.
LATEST_VERSION = "branch-1.7"
LATEST_VERSION = "branch-1.8"
# Set which versions are not released yet.
UNSTABLE_VERSIONS = ["master"]
# Set which versions are deprecated
Expand Down
11 changes: 10 additions & 1 deletion docs/source/examples/glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ The glossary has the following format:
Term 2
Definition

Long description
Lorem ipsum dolor sit amet, ``consectetur`` adipiscing elit. Ut tincidunt orci non pellentesque hendrerit. Sed vitae sem convallis, porta felis ut, varius libero. Suspendisse eget auctor felis. Sed sit amet sapien posuere, eleifend urna ut, interdum nisi.
Donec porta nibh leo, vitae convallis risus ornare sit amet. Mauris porttitor ipsum in mi dignissim, vel volutpat massa placerat.

Vivamus et cursus turpis, id luctus lectus.

This will result in:

.. glossary::
Expand All @@ -29,7 +35,10 @@ This will result in:
Definition

Long description
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec sed lorem quis dui mattis suscipit sit amet id dui. Suspendisse elementum rutrum vulputate. Cras in velit sapien. Etiam egestas turpis eget arcu feugiat semper. Ut blandit sagittis cursus. Maecenas at varius ex, et porttitor mi. Nullam tortor elit, tincidunt et nulla id, porta vestibulum nibh. Quisque tellus elit, maximus at congue quis, molestie eget urna. Donec odio lorem, semper sed pharetra eu, sodales eget velit. Donec dignissim quam mi, nec vehicula magna gravida in. Vestibulum consectetur, sem a tristique porta, risus est laoreet nibh, sed cursus nibh est vel massa. Vestibulum aliquet varius tellus eu pulvinar. Integer a lorem sollicitudin, placerat orci eu, lobortis velit. Pellentesque sit amet magna porta augue iaculis egestas dapibus sed dui.
Lorem ipsum dolor sit amet, ``consectetur`` adipiscing elit. Ut tincidunt orci non pellentesque hendrerit. Sed vitae sem convallis, porta felis ut, varius libero. Suspendisse eget auctor felis. Sed sit amet sapien posuere, eleifend urna ut, interdum nisi.
Donec porta nibh leo, vitae convallis risus ornare sit amet. Mauris porttitor ipsum in mi dignissim, vel volutpat massa placerat.

Vivamus et cursus turpis, id luctus lectus.



Expand Down
2 changes: 1 addition & 1 deletion docs/source/examples/hero-box.rst
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ The ``hero-box`` directive supports the following options:
* - ``button_icon``
- string
-
- fa fa-home
- icon-home
- A list of CSS classes to render an icon, separated by comma or space.
* - ``button_icon_position``
- string
Expand Down
43 changes: 39 additions & 4 deletions docs/source/examples/panel-box.rst
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,48 @@ For example, using:
.. code-block:: rst

.. panel-box::
:title: Admin
:title: Title

Test
Body

Results in:

.. panel-box::
:title: Admin
:title: Title

Test
Body

Compatibility with previous versions
------------------------------------

Some panel boxes in the open-source project where defined with raw html as follows:

.. code-block:: rst

.. raw:: html

<div class="panel callout radius animated">
<div class="row">
<div class="medium-3 columns">
<h5 id="getting-started">Title</h5>
</div>
<div class="medium-9 columns">
Body
</div>
</div>
</div>

This example tests how the previous panel box is rendered:

.. raw:: html

<div class="panel callout radius animated">
<div class="row">
<div class="medium-3 columns">
<h5 id="getting-started">Title</h5>
</div>
<div class="medium-9 columns">
Body
</div>
</div>
</div>
4 changes: 4 additions & 0 deletions docs/source/examples/toc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@ TOC

These directives create TOCs automatically

.. contents::
:depth: 2
:local:

TOC
---

Expand Down
18 changes: 12 additions & 6 deletions docs/source/examples/tooltips.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,32 +15,38 @@ Syntax
Usage
-----

Tooltip with text
.................
Tooltip with inline text
........................

Using:

.. code-block:: rst

Here is a :include_tooltip:`word <This is the tooltip text>`.

Here is another :include_tooltip:`term with long description <Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tincidunt orci non pellentesque hendrerit. Sed vitae sem convallis, porta felis ut, varius libero. Suspendisse eget auctor felis. Sed sit amet sapien posuere, eleifend urna ut, interdum nisi.>`.

Results in:

Here is a :include_tooltip:`word <This is the tooltip text>`.

Here is another :include_tooltip:`term with long description <Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut tincidunt orci non pellentesque hendrerit. Sed vitae sem convallis, porta felis ut, varius libero. Suspendisse eget auctor felis. Sed sit amet sapien posuere, eleifend urna ut, interdum nisi.>`.

Tooltip from a glossary entry
.............................

You can also create a tooltip by referencing a glossary term. The tooltip will automatically pull the term's definition from the glossary.

Using:

.. code-block:: rst

Here is a :include_tooltip:`term <Term 1>`.

This will load the definition of `term-name` from your project's glossary and use it as the tooltip text for "term".


Here is another :include_tooltip:`term loading a long description <Long description>` from the glossary.

Results in:

Here is a :include_tooltip:`term <Term 1>`.
Here is a :include_tooltip:`term <Term 1>` loading the description from the glossary.

Here is another :include_tooltip:`term loading a long description <Long description>` from the glossary.
Loading