Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix mkdocs discrepancy #995

Open
sjspielman opened this issue Jan 17, 2025 · 4 comments
Open

Fix mkdocs discrepancy #995

sjspielman opened this issue Jan 17, 2025 · 4 comments
Assignees

Comments

@sjspielman
Copy link
Member

In #989, we added Bluesky to the OpenScPCA website footer. While this indeed built fine to serve on RTD, it does not serve locally with mkdocs 1.6.0 but gives an error:

  File "/Users/sjspielman/opt/miniconda3/lib/python3.11/site-packages/jinja2/loaders.py", line 204, in get_source
    raise TemplateNotFound(template)
jinja2.exceptions.TemplateNotFound: .icons/fontawesome/brands/bluesky.svg

Re-running build & then serve did not address it, so I imagine this is a versioning situation. We should track down the issue here so the site can be built locally which is often helpful for development, and then provide guidelines in docs/contributing.md about any versioning or environment information folks need to know.

@sjspielman sjspielman self-assigned this Jan 17, 2025
@jashapiro
Copy link
Member

jashapiro commented Jan 17, 2025

From the generated page on readthedocs: <meta name="generator" content="mkdocs-1.6.0, mkdocs-material-9.5.27"> which matches our specification, so it is something else...

@sjspielman
Copy link
Member Author

Yeah, it might also be related to mkdocs templates, but I haven't had a chance to look harder other than saying "could be templates!" (h/t @dvenprasad saying "could be templates!" when we chatted about this yesterday 😄 )

@jashapiro
Copy link
Member

jashapiro commented Jan 17, 2025

Just a followup: I built a new environment and everything worked fine locally. So it is likely something cached, or a subdependency that needs updating.

My conda package list for comparison
# packages in environment at /Users/josh/.miniforge/envs/openscpca-docs:
#
# Name                    Version                   Build  Channel
babel                     2.16.0             pyhd8ed1ab_1    conda-forge
brotli-python             1.1.0           py313h3579c5c_2    conda-forge
bzip2                     1.0.8                h99b78c6_7    conda-forge
ca-certificates           2024.12.14           hf0a4a13_0    conda-forge
certifi                   2024.12.14         pyhd8ed1ab_0    conda-forge
cffi                      1.17.1          py313hc845a76_0    conda-forge
charset-normalizer        3.4.1              pyhd8ed1ab_0    conda-forge
click                     8.1.8              pyh707e725_0    conda-forge
colorama                  0.4.6              pyhd8ed1ab_1    conda-forge
ghp-import                2.1.0              pyhd8ed1ab_2    conda-forge
h2                        4.1.0              pyhd8ed1ab_1    conda-forge
hpack                     4.0.0              pyhd8ed1ab_1    conda-forge
hyperframe                6.0.1              pyhd8ed1ab_1    conda-forge
idna                      3.10               pyhd8ed1ab_1    conda-forge
importlib-metadata        8.5.0              pyha770c72_1    conda-forge
jinja2                    3.1.5              pyhd8ed1ab_0    conda-forge
libcxx                    19.1.7               ha82da77_0    conda-forge
libexpat                  2.6.4                h286801f_0    conda-forge
libffi                    3.4.2                h3422bc3_5    conda-forge
liblzma                   5.6.3                h39f12f2_1    conda-forge
libmpdec                  4.0.0                h99b78c6_0    conda-forge
libsqlite                 3.47.2               h3f77e49_0    conda-forge
libzlib                   1.3.1                h8359307_2    conda-forge
markdown                  3.6                pyhd8ed1ab_0    conda-forge
markupsafe                3.0.2           py313ha9b7d5b_1    conda-forge
mergedeep                 1.3.4              pyhd8ed1ab_1    conda-forge
mkdocs                    1.6.0              pyhd8ed1ab_0    conda-forge
mkdocs-get-deps           0.2.0              pyhd8ed1ab_1    conda-forge
mkdocs-material           9.5.27             pyhd8ed1ab_0    conda-forge
mkdocs-material-extensions 1.3.1              pyhd8ed1ab_1    conda-forge
ncurses                   6.5                  h5e97a16_2    conda-forge
openssl                   3.4.0                h81ee809_1    conda-forge
packaging                 24.2               pyhd8ed1ab_2    conda-forge
paginate                  0.5.7              pyhd8ed1ab_1    conda-forge
pathspec                  0.12.1             pyhd8ed1ab_1    conda-forge
pip                       24.3.1             pyh145f28c_2    conda-forge
platformdirs              4.3.6              pyhd8ed1ab_1    conda-forge
pycparser                 2.22               pyh29332c3_1    conda-forge
pygments                  2.19.1             pyhd8ed1ab_0    conda-forge
pymdown-extensions        10.14              pyhd8ed1ab_0    conda-forge
pysocks                   1.7.1              pyha55dd90_7    conda-forge
python                    3.13.1          h4f43103_105_cp313    conda-forge
python-dateutil           2.9.0.post0        pyhff2d567_1    conda-forge
python_abi                3.13                    5_cp313    conda-forge
pytz                      2024.2             pyhd8ed1ab_1    conda-forge
pyyaml                    6.0.2           py313h20a7fcf_1    conda-forge
pyyaml-env-tag            0.1                pyhd8ed1ab_1    conda-forge
readline                  8.2                  h92ec313_1    conda-forge
regex                     2024.11.6       py313h90d716c_0    conda-forge
requests                  2.32.3             pyhd8ed1ab_1    conda-forge
six                       1.17.0             pyhd8ed1ab_0    conda-forge
tk                        8.6.13               h5083fa2_1    conda-forge
tzdata                    2025a                h78e105d_0    conda-forge
urllib3                   2.3.0              pyhd8ed1ab_0    conda-forge
watchdog                  6.0.0           py313h90d716c_0    conda-forge
yaml                      0.2.5                h3422bc3_2    conda-forge
zipp                      3.21.0             pyhd8ed1ab_1    conda-forge
zstandard                 0.23.0          py313hf2da073_1    conda-forge
zstd                      1.5.6                hb46c0d2_0    conda-forge

@sjspielman
Copy link
Member Author

My mkdocs-material (and probably Deepa's too) was out of date. Bluesky was added to mkdocs-material at their 9.5.18. We have 9.5.27 in our docs/requirements.txt file, but it turns out I didn't read the syllabus and had never updated my environment since 9.5.12, which I bet is when we originally established the site! Once I updated my environment, it build fine.

I don't think there's anything really to do here except be at the version we say to be in 😄

@dvenprasad, can you check what version of mkdocs-material you're working with? If it's also behind, let's get your packages updated and confirm you can build locally. If that's all good, we can close out this issue. Let me know how I can help with that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants