Skip to content

Commit 070b8c7

Browse files
images fix test again
1 parent ffa1db3 commit 070b8c7

2 files changed

Lines changed: 35 additions & 22 deletions

File tree

.github/workflows/docs.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
branches: ["main"]
66
workflow_dispatch:
77

8-
# Force GitHub Actions to use Node.js 24 for all steps
98
env:
109
FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true
1110

@@ -37,21 +36,22 @@ jobs:
3736
3837
- name: Build HTML documentation
3938
run: |
40-
# Build the documentation into the standard output folder
39+
# 1. Build the documentation
4140
sphinx-build -b html docs/ docs/_build/html
4241
43-
- name: Fix Image Paths and Assets
42+
- name: Mirror Structure for Images
4443
run: |
45-
# 1. Create the expected directory structure in the output
46-
# Since your MD uses "../pica/assets", we create a 'pica' folder
47-
# at the same level as your HTML files.
44+
# This step makes "../pica/assets" work without changing your manual.
45+
# We create a folder structure inside the build output that matches
46+
# your relative paths.
47+
4848
mkdir -p docs/_build/html/pica
4949
cp -r pica/assets docs/_build/html/pica/
50-
51-
# 2. Copy the publications folder as you did before
50+
51+
# Copy publications folder
5252
cp -r publications/ docs/_build/html/publications/ || true
53-
54-
# 3. CRITICAL: Add .nojekyll to ensure GitHub Pages serves underscore folders
53+
54+
# CRITICAL: Prevent GitHub from hiding folders starting with underscores
5555
touch docs/_build/html/.nojekyll
5656
5757
- name: Upload GitHub Pages artifact

docs/conf.py

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,37 @@
1-
project = 'PICA (Python Instrument Control and Automation)'
2-
copyright = '2026, Prathamesh Deshmukh'
1+
# docs/conf.py
2+
3+
# -- Project information -----------------------------------------------------
4+
project = 'PICA'
5+
copyright = '2025, Prathamesh Deshmukh'
36
author = 'Prathamesh Deshmukh'
7+
release = '1.0.0'
48

5-
# Activate the MyST Parser to enable Markdown support alongside standard extensions
9+
# -- General configuration ---------------------------------------------------
610
extensions = [
7-
'myst_parser',
8-
'sphinx.ext.autodoc',
11+
'myst_parser', # For Markdown support
12+
'sphinx_rtd_theme', # For the ReadTheDocs theme
13+
]
14+
15+
# Configure MyST-Parser to allow HTML images (the <img src="..."> tags in your manual)
16+
myst_enable_extensions = [
17+
"html_image",
918
]
1019

11-
# Instruct Sphinx to read both Markdown and reStructuredText formats
20+
# Map file extensions to the parser
1221
source_suffix = {
1322
'.rst': 'restructuredtext',
1423
'.md': 'markdown',
1524
}
1625

17-
# Utilize the standard Read the Docs visual theme
26+
templates_path = ['_templates']
27+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
28+
29+
# -- Options for HTML output -------------------------------------------------
1830
html_theme = 'sphinx_rtd_theme'
1931

20-
myst_enable_extensions = [
21-
"html_image", # Allows raw HTML <img> tags to render
22-
"html_admonition", # Allows raw HTML blocks
23-
"colon_fence", # Enables ::: fenced directives
24-
]
32+
# Add any paths that contain custom static files (such as style sheets)
33+
html_static_path = ['_static']
34+
35+
# This ensures Sphinx doesn't complain about the pica folder
36+
# we manually move in the workflow
37+
suppress_warnings = ['image.not_readable']

0 commit comments

Comments
 (0)