Skip to content

Documentation: fix project logo image link for Sphinx HTML generation #4

@miltolstoy

Description

@miltolstoy

Context:
Currently, the relative path int the project logo link in the README.md file is docs/img/openscp-icon.png.
README.md:

![Logo](docs/img/openscp-icon.png)

The Sphinx documentation's Makefile is placed in the docs directory, so the root directory for the documentation generation is ${PROJECT_ROOT}/docs instead of ${PROJECT_ROOT}.
scripts/build.py:

f"SPHINXBUILD={Const.Path.VENV_BIN_DIR}/sphinx-build make -C {Const.Path.PROJECT_ROOT}/docs html"]

Problem:
When HTML documentation is generated by Sphinx the project logo image relative link is broken because relative path root is {PROJECT_ROOT}/docs instead of {PROJECT_ROOT}.

Requires to:
Find a way to fix a project logo link in the HTML documentation.
Simple way: scripts/build.py, generate_html_docs() - apply a patch to change link name before documentation generation, then revert it back.
Desirable way: find another solution using some Sphinx file-based or CLI-based option to avoid file patching

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions