hyde / hyde-old

Static website generator inspired by Jekyll
http://ringce.com/hyde
MIT License
875 stars 81 forks source link

Error trying to generate a fresh site "Cannot load the markdown library" #72

Closed Painted-Fox closed 13 years ago

Painted-Fox commented 13 years ago

I'm running running into a TemplateError("Cannot load the markdown library") when I try to generate a site.

I'm new to Hyde, so it might be how I've set it up. I'm running Windows 7 and I'm using Python 2.6. I've put both C:\Python26\ and C:\Python26\Scripts into my path and ran the following:

> easy_install hyde
> easy_install pyyaml
> easy_install django
> easy_install markdown

Here are the respective versions I got from running these commands.

I created a new site from the default template and tried to generate it via the following commands:

> cd C:\projects
> mkdir newsite
> cd newsite
> hyde create
> hyde gen

The hyde create command gave me the following tree:

The hyde gen failed with the following output:

23:00:17 hyde.engine Reading site configuration from [C:\projects\newsite\site.yaml]
23:00:17 hyde.engine Reading site contents
23:00:17 hyde.engine Generating site at [c:\projects\newsite]
23:00:17 hyde.engine Configuring the template environment
23:00:17 hyde.engine Generating site to [C:\projects\newsite\deploy]
23:00:17 hyde.engine.Jinja2 Cannot load the markdown library.
23:00:17 hyde.engine Error occurred when processing template: [C:\projects\newsite\content\index.html]
Traceback (most recent call last):
  File "C:\Python26\Scripts\hyde-script.py", line 8, in <module>
    load_entry_point('hyde==0.8.3', 'console_scripts', 'hyde')()
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\main.py", line 10, in main
    Engine().run()
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\engine.py", line 38, in run
    super(Engine, self).run(args)
  File "build\bdist.win32\egg\commando.py", line 198, in run
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\engine.py", line 115, in gen
    gen.generate_all(incremental=incremental)
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\generator.py", line 204, in generate_all
    self.__generate_node__(self.site.content, incremental)
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\generator.py", line 302, in __generate_node__
    self.__generate_resource__(resource, incremental)
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\generator.py", line 322, in __generate_resource__
    context)
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\ext\templates\jinja.py", line 692, in render_resource
    out = template.render(context)
  File "C:\Python26\lib\site-packages\jinja2-2.6-py2.6.egg\jinja2\environment.py", line 894, in render
    return self.environment.handle_exception(exc_info, True)
  File "C:\projects\newsite\content\index.html", line 1, in top-level template code
    ---
  File "C:\projects\newsite\layout\base.j2", line 53, in top-level template code
    {% block content %}
  File "C:\projects\newsite\layout\base.j2", line 55, in block "content"
    {% block container %}
  File "C:\projects\newsite\layout\base.j2", line 68, in block "container"
    {% block main %}
  File "C:\projects\newsite\content\index.html", line 8, in block "main"
    {% from "macros.j2" import render_excerpt with context %}
  File "C:\projects\newsite\layout\macros.j2", line 2, in template
    {% refer to res.url as post %}
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\ext\templates\jinja.py", line 456, in _assign_reference
    out = caller()
  File "C:\projects\newsite\layout\macros.j2", line 2, in template
    {% refer to res.url as post %}
  File "C:\projects\newsite\content\blog\happy-post.html", line 1, in top-level template code
    ---
  File "C:\projects\newsite\layout\blog.j2", line 1, in top-level template code
    {% extends "base.j2" %}
  File "C:\projects\newsite\layout\base.j2", line 53, in top-level template code
    {% block content %}
  File "C:\projects\newsite\layout\base.j2", line 55, in block "content"
    {% block container %}
  File "C:\projects\newsite\layout\base.j2", line 68, in block "container"
    {% block main %}
  File "C:\projects\newsite\layout\blog.j2", line 58, in block "main"
    {% filter markdown|typogrify -%}
  File "C:\Python26\lib\site-packages\hyde-0.8.3-py2.6.egg\hyde\ext\templates\jinja.py", line 101, in markdown
    raise TemplateError("Cannot load the markdown library")
jinja2.exceptions.TemplateError: Cannot load the markdown library

I thought I was missing the settings.py file so I grabbed one from the Ringce.com repository. However, this didn't fix the issue. I even modified the INSTALLE_APPS section to be the following:

INSTALLED_APPS = (
    'hydeengine',
    'django.contrib.webdesign',
    'django.contrib.markup'
)

...but this did not work either.

Painted-Fox commented 13 years ago

I didn't realize there was a newer repository. I posted this issue to the hyde/hyde project here: https://github.com/hyde/hyde/issues/99.

navilan commented 13 years ago

This is for 0.8.3 I guess: https://github.com/hyde/hyde/issues/99