File tree Expand file tree Collapse file tree 3 files changed +28
-3
lines changed
Expand file tree Collapse file tree 3 files changed +28
-3
lines changed Original file line number Diff line number Diff line change 2727 build :
2828 runs-on : ubuntu-latest
2929 env :
30- # Enable notebook execution on CI by default for push and schedule events.
31- # Also allow manual override via workflow_dispatch input `run_notebooks`.
32- UCLCHEM_EXECUTE_NOTEBOOKS : ${{ (github.event_name == 'push') || (github.event_name == 'schedule') || (github.event_name == 'workflow_dispatch' && github.event.inputs.run_notebooks == 'true') }}
30+ # Temporarily DISABLE notebook execution by default to shorten build time.
31+ # Notebooks can still be executed manually via workflow_dispatch + input `run_notebooks: true`.
32+ # To re-enable automatic execution on push/schedule, revert this change.
33+ UCLCHEM_EXECUTE_NOTEBOOKS : ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.run_notebooks == 'true' }}
3334
3435 steps :
3536 - name : Checkout documentation repository
Original file line number Diff line number Diff line change 225225blog_authors = {
226226 "UCLCHEM Team" : ("UCLCHEM Team" , "https://uclchem.github.io" ),
227227}
228+
229+ # ---------------------------------------------------------------------------
230+ # Compatibility shim: ensure Sphinx builder provides a docwriter attribute
231+ # This addresses incompatibilities where extensions (e.g. ablog) expect the
232+ # builder to have a `docwriter` writer object. We attach an HTMLWriter on
233+ # `builder-inited` if it is missing to avoid AttributeError during rendering.
234+ # ---------------------------------------------------------------------------
235+ def _ensure_docwriter (app ):
236+ try :
237+ from sphinx .writers .html import HTMLWriter
238+ if not hasattr (app .builder , "docwriter" ):
239+ app .builder .docwriter = HTMLWriter (app .builder )
240+ app .logger .debug ("Attached HTMLWriter to app.builder for ablog compatibility" )
241+ except Exception as exc :
242+ # Use logger to surface the issue in build logs without failing the build
243+ try :
244+ app .logger .warning (f"Could not attach HTMLWriter to builder: { exc } " )
245+ except Exception :
246+ pass
247+
248+
249+ def setup (app ):
250+ app .connect ("builder-inited" , _ensure_docwriter )
251+ return {"version" : "0.1" }
You can’t perform that action at this time.
0 commit comments