getnikola / nikola-themes

Themes for Nikola
https://themes.getnikola.com/
71 stars 51 forks source link

[lanyon] Problems with building on base tag.tmpl #130

Closed keikoro closed 6 years ago

keikoro commented 6 years ago

Trying to extend the lanyon theme for myself because what's there right now is not sufficent for my needs. I successfully managed to adapt post.tmpl but I'm running into problems when including tag.tmpl (both were copied from the base template directory in the main repo).

Log:

(THIS_VENV) [13:10] THIS_MACHINE:THIS_DIR git:(master*) $ nikola build
Scanning posts........done!
.  render_taxonomies:public/tags/nikola/index.html
########################################
TaskError - taskid:render_taxonomies:public/tags/nikola/index.html
PythonAction Error
Traceback (most recent call last):
  File "PATH_TO_MY_VENV/lib/python3.5/site-packages/doit/action.py", line 403, in execute
    returned_value = self.py_callable(*self.args, **kwargs)
  File "PATH_TO_MY_VENV/lib/python3.5/site-packages/nikola/nikola.py", line 1484, in render_template
    template_name, None, local_context)
  File "PATH_TO_MY_VENV/lib/python3.5/site-packages/nikola/plugins/template/mako.py", line 117, in render_template
    data = template.render_unicode(**context)
  File "PATH_TO_MY_VENV/lib/python3.5/site-packages/mako/template.py", line 471, in render_unicode
    as_unicode=True)
  File "PATH_TO_MY_VENV/lib/python3.5/site-packages/mako/runtime.py", line 838, in _render
    **_kwargs_for_callable(callable_, data))
  File "PATH_TO_MY_VENV/lib/python3.5/site-packages/mako/runtime.py", line 873, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "PATH_TO_MY_VENV/lib/python3.5/site-packages/mako/runtime.py", line 899, in _exec_template
    callable_(context, *args, **kwargs)
  File "PATH_TO_MY_NIKOLA_DIR/cache/.mako.tmp/base.tmpl.py", line 71, in render_body
    context['self'].extra_head(**pageargs)
  File "PATH_TO_MY_NIKOLA_DIR/cache/.mako.tmp/tag.tmpl.py", line 78, in render_extra_head
    __M_writer(str(feeds_translations.head(tag, kind, rss_override=False)))
TypeError: render_head() got an unexpected keyword argument 'rss_override'
Kwpolska commented 6 years ago

Which version of Nikola are you running? Did you alter anything before you got that error?

Things may have changed between the version you’re running and master (which is Nikola v8-dev). Instead, use nikola theme -c tag.tmpl to copy the file from your local copy of base.

keikoro commented 6 years ago

Oh, that might indeed be the case – I installed nikola via pip and I suppose you're not pushing anything there while v8 is still in development.

Thank you!

keikoro commented 6 years ago

Ok, just tried it with nikola theme -c tag.tmpl. Works, yay!