Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 10 additions & 8 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

# -- Split configurations ----------------------------------------------------

from confs.schemas import _schemas
from confs.schemas import OBJECT_TYPES as _OBJECT_TYPES
from confs.deploy import Deployment

_D = Deployment.current()
Expand Down Expand Up @@ -94,8 +94,12 @@
keep_warnings = True

# A list of warning codes to suppress arbitrary warning messages.
suppress_warnings = [
'misc.highlighting_failure' # pygment highlight error
]

if _D is _D.Local:
suppress_warnings = ['ref.' + x.objtype for x in _schemas]
suppress_warnings.extend(['ref.' + x for x in _OBJECT_TYPES])

# Auto numbered figures, tables and code-blocks if they have a caption.
# numfig = True
Expand Down Expand Up @@ -223,7 +227,8 @@
}

extensions.append('sphinxnotes.any')
any_schemas = _schemas
any_domain_name = 'any'
any_object_types = _OBJECT_TYPES

extensions.append('ablog')
blog_path = 'blog'
Expand Down Expand Up @@ -371,12 +376,9 @@
extensions.append('sphinxnotes.poc')

def setup(app):
# Dump any domain data:
# from conf.dump_any_domain import setup
# setup(app)
# Query artworks from LATree.

from confs import fetch_artwork
fetch_artwork.setup(app)

fetch_artwork.setup(app) # query artworks from LATree

...
4 changes: 2 additions & 2 deletions confs/fetch_artwork.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from sphinx.application import Sphinx
from sphinx.environment import BuildEnvironment
from sphinx.util import logging
from sphinxnotes.any.template import Environment as TemplateEnvironment
from sphinxnotes.data.render.template import _JinjaEnv

from .deploy import Deployment

Expand Down Expand Up @@ -34,4 +34,4 @@ def _filter(id_: str) -> str | None:


def setup(app: Sphinx):
TemplateEnvironment.add_filter('fetch_artwork', fetch_artwork_filter)
_JinjaEnv.add_filter('fetch_artwork', fetch_artwork_filter)
Loading
Loading