Add copy button extension for documentation code blocks

This commit is contained in:
ionutboangiu
2023-06-09 03:23:29 -04:00
committed by Dan Christian Bogos
parent 69b1e9279a
commit 796b51be60
4 changed files with 21 additions and 12 deletions

View File

@@ -25,7 +25,10 @@ import sys, os
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
extensions = ['sphinx.ext.todo']
extensions = [
'sphinx.ext.todo',
'sphinx_copybutton'
]
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -41,7 +44,7 @@ master_doc = 'index'
# General information about the project.
project = u'CGRateS'
copyright = u'2012-2020, ITsysCOM GmbH'
copyright = u'2012-2023, ITsysCOM GmbH'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the

View File

@@ -14,7 +14,7 @@ Installation
CGRateS can be installed either via packages or through an automated Go source installation. We recommend the latter for advanced users familiar with Go programming, and package installations for those not wanting to engage in the code building process.
After completing the installation, you need to perform the :ref:`post-install configuration <post_install>` steps to set up CGRateS properly and prepare it to run. After these steps, CGRateS will be configured in **/etc/cgrates/cgrates.json** and enabled in **/etc/default/cgrates**.
After completing the installation, you need to perform the :ref:`post-install configuration <post_install>` steps to set up CGRateS properly and prepare it to run. After these steps, CGRateS will be configured in **/etc/cgrates/cgrates.json** and the service can be managed using the **systemctl** command.
Package Installation
--------------------
@@ -55,7 +55,7 @@ Alternatively, you can manually install a specific .deb package as follows:
Redhat-based Distributions
^^^^^^^^^^^^^^^^^^^^^^^^^^
For .rpm distros, we are using Fedora Copr to manage the CGRateS packages:
For .rpm distros, we are using copr to manage the CGRateS packages:
.. code-block:: bash
@@ -72,18 +72,19 @@ To install a specific version of the package, run:
.. note::
The entire archive of CGRateS rpm packages is available at https://copr.fedorainfracloud.org/coprs/cgrates/v0.10/packages/.
Building from Source
--------------------
Installing from Source
----------------------
Prerequisites:
^^^^^^^^^^^^^^
- Git
- **Git**
.. code-block:: bash
sudo apt install git
- Go (refer to the official Go installation docs: https://go.dev/doc/install)
- **Go** (refer to the official Go installation docs: https://go.dev/doc/install)
To install the latest Go version at the time of writing this documentation, run:
@@ -96,7 +97,8 @@ To install the latest Go version at the time of writing this documentation, run:
sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
export PATH=$PATH:/usr/local/go/bin
Configure the project using the following commands:
Installation:
^^^^^^^^^^^^^
.. code-block:: bash
@@ -124,7 +126,7 @@ Creating Your Own Packages
After compiling the source code, you may choose to create your own packages.
For Debian-based distros:
~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: bash
@@ -149,7 +151,7 @@ To install the generated package, run:
sudo dpkg -i cgrates_*.deb
For Redhat-based distros:
~~~~~~~~~~~~~~~~~~~~~~~~~
^^^^^^^^^^^^^^^^^^^^^^^^^
.. code-block:: bash

View File

@@ -1,2 +1,3 @@
sphinx_rtd_theme==1.2.0
sphinx==6.2.1
sphinx==6.2.1
sphinx_copybutton==0.5.2

View File

@@ -37,8 +37,11 @@ snowballstemmer==2.2.0
sphinx==6.2.1
# via
# -r requirements.in
# sphinx-copybutton
# sphinx-rtd-theme
# sphinxcontrib-jquery
sphinx-copybutton==0.5.2
# via -r requirements.in
sphinx-rtd-theme==1.2.0
# via -r requirements.in
sphinxcontrib-applehelp==1.0.4