Attempting to build the OpenScienceLab docs fails if at least one additional social feed for the footer is not configured.
Traceback:
❯ mkdocs serve
INFO - Building documentation...
INFO - Cleaning site directory
INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration:
- dev.md
- release_notes.md
- dev-guides/system_diagram.md
- release-notes/release_02-2023.md
Traceback (most recent call last):
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/bin/mkdocs", line 10, in <module>
sys.exit(cli())
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/click/core.py", line 1157, in __call__
return self.main(*args, **kwargs)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/mkdocs/__main__.py", line 270, in serve_command
serve.serve(**kwargs)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 86, in serve
builder(config)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/mkdocs/commands/serve.py", line 67, in builder
build(config, live_server=None if is_clean else server, dirty=is_dirty)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/mkdocs/commands/build.py", line 340, in build
_build_theme_template(template, env, files, config, nav)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/mkdocs/commands/build.py", line 110, in _build_theme_template
output = _build_template(template_name, template, files, config, nav)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/mkdocs/commands/build.py", line 89, in _build_template
output = template.render(context)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/jinja2/environment.py", line 1301, in render
self.environment.handle_exception()
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/jinja2/environment.py", line 936, in handle_exception
raise rewrite_traceback_stack(source=source)
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/material/templates/404.html", line 4, in top-level template code
{% extends "main.html" %}
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/asf_theme/main.html", line 2, in top-level template code
{% extends "base.html" %}
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/material/templates/base.html", line 202, in top-level template code
{% block footer %}
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/material/templates/base.html", line 203, in block 'footer'
{% include "partials/footer.html" %}
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/asf_theme/partials/footer.html", line 131, in top-level template code
{% include "partials/social.html" %}
File "/home/dgpalmieri/mambaforge/envs/opensarlab-docs/lib/python3.9/site-packages/asf_theme/partials/social.html", line 27, in top-level template code
{% for social in config.theme.social + config.extra.social %}
jinja2.exceptions.UndefinedError: 'mkdocs.config.base.LegacyConfig object' has no attribute 'social'
Configuring an additional social feed in mkdocs.yaml enables the page to build as expected.
The environment I'm building in was taken directly from the hyp3-docs repo:
Attempting to build the OpenScienceLab docs fails if at least one additional social feed for the footer is not configured.
Traceback:
Configuring an additional social feed in
mkdocs.yaml
enables the page to build as expected.The environment I'm building in was taken directly from the hyp3-docs repo: