Skip to content

Commit

Permalink
Merge pull request #6 from psm-compute/git_add
Browse files Browse the repository at this point in the history
Git add
  • Loading branch information
ceciherr authored Sep 9, 2024
2 parents 8a2491f + b40e99d commit 3040ce4
Show file tree
Hide file tree
Showing 5 changed files with 82 additions and 71 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
**/build/
**/build/
**.DS_Store
7 changes: 2 additions & 5 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,16 @@
# These are options specifically for the Wagtail Theme.
html_theme_options = dict(
project_name = "PSM tips",
github_url = "https://github.com/psm-compute/psm-compute.github.io/tree/main/docs/source/"
# logo_alt = "Wagtail",
# logo_height = 59,
# logo_url = "/",
# logo_width = 45,
)

html_theme_options = dict(
github_url = "https://github.com/psm-compute/psm-compute.github.io/tree/main/docs"
)

html_theme = 'sphinx_wagtail_theme'
html_static_path = ['_static']
html_title = "PSM tips and trics page"

html_show_copyright = False
html_show_sphinx = False
html_show_sphinx = False
65 changes: 0 additions & 65 deletions docs/source/git.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,68 +102,3 @@ If you no longer need the branch locally, you can delete it:
.. code:: bash
git branch -d update_readme
Modifying the HTML Webpage
---------------------------

1. Compile the HTML Webpage Locally
____________________________________

To compile the HTML files locally, navigate to the parent directory of your project and run:

.. code-block:: bash
make html
This command will generate the HTML files for your webpage.

**Troubleshooting:**

- If the ``make html`` command fails, you might need to install the necessary dependencies first. You can do this by running:

.. code-block:: bash
pip install -r requirements.txt
2. View the Compiled HTML
__________________________

Once the compilation is successful, you can view the HTML files by navigating to the ``docs/build/html`` directory. Open the files in this folder with your preferred web browser to see your webpage.

3. Modify the Documentation
____________________________

**Important:**

- **Never modify files directly in the** ``html`` **folder.**
- Always make changes in the ``docs/source`` folder, which contains the source files used to generate the HTML.

**Steps for Modifying Content:**

1. **Create a New** ``.rst`` **File:**

If you need to add new content, you can create a new ``.rst`` file in the ``docs/source`` directory. Use an existing file, such as ``oar.rst``, as a template for the new file.

- **Formatting Tips:** For guidance on formatting ``.rst`` files, refer to `appropriate documentation <https://developer.lsst.io/restructuredtext/style.html>`_.


2. **Update the** ``index.rst`` **File:**

After adding or modifying ``.rst`` files, update the ``index.rst`` file to include your new content in the table of contents or navigation structure.

4. Re-compile the HTML Webpage
_______________________________

Once you've made your changes, recompile the HTML files by running ``make html`` again from the parent directory (``docs``), where the ``make.bat`` file is located:

.. code-block:: bash
make html
This will regenerate the HTML files with your latest modifications.

5. Commit and Push Changes
__________________________

After confirming your changes are reflected in the compiled HTML, it's time to commit and push your changes to the repository. For detailed instructions on how to commit and push changes, see see `Getting Started with Git and GitHub <#getting-started-with-git-and-github>`_.
6 changes: 6 additions & 0 deletions docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@ start a discussion on |GitHub_discussion|

oar
git

.. toctree::
:maxdepth: 2
:caption: Contributors:

sphinx
72 changes: 72 additions & 0 deletions docs/source/sphinx.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
Sphinx tips
===========

Contributing to this Documentation
----------------------------------

1. Compile the HTML Webpage Locally
____________________________________

To compile the HTML files locally, navigate to the parent directory of your project and run:

.. code-block:: bash
make html
This command will generate the HTML files for your webpage.

**Troubleshooting:**

- If the ``make html`` command fails, you might need to install the necessary dependencies first. You can do this by running:

.. code-block:: bash
pip install -r requirements.txt
2. View the Compiled HTML
__________________________

Once the compilation is successful, you can view the HTML files by navigating to the ``docs/build/html`` directory. Open the files in this folder with your preferred web browser to see your webpage.

3. Modify the Documentation
____________________________

**Important:**

- **Never modify files directly in the** ``html`` **folder.**
- Always make changes in the ``docs/source`` folder, which contains the source files used to generate the HTML.

**Steps for Modifying Content:**

1. **Create a New** ``.rst`` **File:**

If you need to add new content, you can create a new ``.rst`` file in the ``docs/source`` directory. Use an existing file, such as ``oar.rst``, as a template for the new file.

- **Formatting Tips:** For guidance on formatting ``.rst`` files, refer to `appropriate documentation <https://developer.lsst.io/restructuredtext/style.html>`_.


2. **Update the** ``index.rst`` **File:**

After adding or modifying ``.rst`` files, update the ``index.rst`` file to include your new content in the table of contents or navigation structure.

4. Re-compile the HTML Webpage
_______________________________

Once you've made your changes, first delete previous files to avoid conflict:

.. code-block:: bash
make clean
Second recompile the HTML files by running ``make html`` again from the parent directory (``docs``), where the ``make.bat`` file is located:

.. code-block:: bash
make html
This will regenerate the HTML files with your latest modifications.

5. Commit and Push Changes
__________________________

After confirming your changes are reflected in the compiled HTML, it's time to commit and push your changes to the repository. For detailed instructions on how to commit and push changes, see `Getting Started with Git and GitHub <#git-tips>`_.

0 comments on commit 3040ce4

Please sign in to comment.