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

Add Sphinx Typlog Theme #27

Merged
merged 1 commit into from
Aug 26, 2020
Merged

Add Sphinx Typlog Theme #27

merged 1 commit into from
Aug 26, 2020

Conversation

frostming
Copy link
Contributor

Accomplishing #4

@pradyunsg
Copy link
Collaborator

Yay! Thanks for the PR!

This PR makes it clear to me that there's a change needed in how we sort themes.json -- we should normalize the names for the packages. I'll make a fix in a bit.

@pradyunsg pradyunsg changed the title Add new theme Sphinx Typlog Add Sphinx Typlog Theme Aug 26, 2020
@pradyunsg pradyunsg merged commit f8e5cf8 into sphinx-themes:master Aug 26, 2020
@pradyunsg
Copy link
Collaborator

Reverted since this is now failing:

------------------------------------ stdout ------------------------------------
Running Sphinx v3.2.1

--------------------------------------------------------------------------------
sample-docs/demo
--------------------------------------------------------------------------------

building [mo]: targets for 0 po files that are out of date
building [html]: targets for 6 source files that are out of date
updating environment: [new config] 6 added, 0 changed, 0 removed
reading sources... [ 16%] demo/api
Didn't find Foo.qux in test_py_module.test
Didn't find Foo.spam in test_py_module.test
Didn't find payments.dotpay.DotpayProvider in test_py_module.test
Didn't find Data_item_1 in test_py_module.test
Didn't find Data_item_2 in test_py_module.test
Didn't find Data_item_3 in test_py_module.test
reading sources... [ 33%] demo/demo
reading sources... [ 50%] demo/lists_tables
reading sources... [ 66%] demo/long
reading sources... [ 83%] demo/structure
reading sources... [100%] index

looking for now-outdated files... none found
pickling environment... done
checking consistency... done
preparing documents... done
writing output... [ 16%] demo/api
writing output... [ 33%] demo/demo
writing output... [ 50%] demo/lists_tables
writing output... [ 66%] demo/long
writing output... [ 83%] demo/structure
writing output... [100%] index

generating indices...  genindex py-modindexdone
highlighting module code... [100%] test_py_module.test
------------------------------------ stderr ------------------------------------
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/demo/demo.rst:259: WARNING: Footnote [4] is not referenced.
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/demo/demo.rst:265: WARNING: Footnote [11] is not referenced.
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/demo/demo.rst:16: WARNING: Undefined substitution referenced: "problematic".
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/demo/demo.rst:259: WARNING: Unknown target name: "5".
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/demo/demo.rst:302: WARNING: Unknown target name: "body elements".
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/demo/demo.rst:314: WARNING: Unknown target name: "hyperlink reference without a target".
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/index.rst:14: WARNING: Undefined substitution referenced: "problematic".
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/index.rst:14: WARNING: Unknown target name: "1".
/Users/pradyunsg/Projects/sphinx-themes.org/sample-docs/demo/demo.rst:273: WARNING: citation not found: nonexistent

Traceback (most recent call last):
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 1013, in handle_page
    output = self.templates.render(templatename, ctx)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/jinja2glue.py", line 192, in render
    return self.environment.get_template(template).render(context)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/jinja2/environment.py", line 1090, in render
    self.environment.handle_exception()
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/jinja2/environment.py", line 832, in handle_exception
    reraise(*rewrite_traceback_stack(source=source))
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/jinja2/_compat.py", line 28, in reraise
    raise value.with_traceback(tb)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx_typlog_theme/page.html", line 21, in top-level template code
    <meta property="og:image" content="{{ src }}">
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx_typlog_theme/layout.html", line 69, in top-level template code
    {%- block extrahead %}{% endblock %}
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx_typlog_theme/page.html", line 33, in block "extrahead"
    {{- og_meta() }}
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/jinja2/sandbox.py", line 462, in call
    return __context.call(__obj, *args, **kwargs)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/jinja2/runtime.py", line 679, in _invoke
    rv = self._func(*arguments)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx_typlog_theme/page.html", line 15, in template
    {%- for html in metatags.split('\n') %}
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/jinja2/sandbox.py", line 407, in getattr
    value = getattr(obj, attribute)
jinja2.exceptions.UndefinedError: 'metatags' is undefined

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/cmd/build.py", line 280, in build_main
    app.build(args.force_all, filenames)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/application.py", line 348, in build
    self.builder.build_update()
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 297, in build_update
    self.build(to_build,
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/builders/__init__.py", line 364, in build
    self.finish()
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 614, in finish
    self.finish_tasks.add_task(self.gen_pages_from_extensions)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/util/parallel.py", line 49, in add_task
    res = task_func()
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 638, in gen_pages_from_extensions
    self.handle_page(pagename, context, template)
  File "/Users/pradyunsg/Projects/sphinx-themes.org/.venv/sphinx-typlog-theme/lib/python3.8/site-packages/sphinx/builders/html/__init__.py", line 1020, in handle_page
    raise ThemeError(__("An error happened in rendering the page %s.\nReason: %r") %
sphinx.errors.ThemeError: An error happened in rendering the page _modules/test_py_module/test.
Reason: UndefinedError("'metatags' is undefined")

Theme error:
An error happened in rendering the page _modules/test_py_module/test.
Reason: UndefinedError("'metatags' is undefined")
-------------------------------- Error occurred --------------------------------
Command: .venv/sphinx-typlog-theme/bin/sphinx-build -v -b=html -c=build/sample-sites/sphinx-typlog-theme sample-docs build/sample-sites/sphinx-typlog-theme
Exited with exit code: 2

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

Successfully merging this pull request may close these issues.

None yet

2 participants