Coder Social home page Coder Social logo

hyde's Introduction

Version 0.8.9

image

Overview

Hyde starter kit by merlinrebrovic is a really nice way to get started with hyde.

Hyde layout for bootstrap by auzigog is also a good alternative if you like Twitter's bootstrap framework.

You can also take a look at Hyde Powered Websites for inspiration and reference.

Currently hyde is only supported on python 2.7.x. Python 3.x support is in progress, thanks to jonafato.

Active development of hyde had stalled for some time, but thanks to llonchj and jonafato there is now a slow but steady progress towards 1.0.

Mailing List: hyde-dev on google groups. IRC: #hyde on freenode

Installation

To get the latest released version:

pip install hyde

For the current trunk:

pip install -e git://github.com/hyde/hyde.git#egg=hyde

Creating a new hyde site

The following command:

hyde -s ~/test_site create

will create a new hyde site using the test layout.

Generating the hyde site

cd ~/test_site
hyde gen

Serving the website

cd ~/test_site
hyde serve
open http://localhost:8080

Publishing the website

cd ~/test_site
hyde publish -p github

Hyde supports extensible publishers.

Github

The hyde documentation is published to github pages using this command with the following configuration:

publisher:
    github:
        type: hyde.ext.publishers.dvcs.Git
        path: ../hyde.github.com
        url: [email protected]:hyde/hyde.github.com.git

Note

Currently, the initial path must have clone of the repository already in place for this command to work.

PyFS

Hyde also has a publisher that acts as a frontend to the awesome PyFS library (thanks to rfk). Here are a few configuration options for some PyFS backends:

publisher:
    zip:
        type: hyde.ext.publishers.pyfs.PyFS
        url: zip://~/deploy/hyde/docs.zip
    s3:
        type: hyde.ext.publishers.pyfs.PyFS
        url: s3://hyde/docs
    sftp:
        type: hyde.ext.publishers.pyfs.PyFS
        url: sftp:hydeuser:[email protected]

Note

PyFS is not installed with hyde. In order to use the PyFS publisher, you need to install pyfs separately.

Any PyFS dependencies (Example: boto for S3 publishing) need to be installed separately as well.

pip install fs
pip install boto

To get additional help on PyFS backends, you can run the following command once PyFS is installed:

fsls --listopeners

Examples

  1. julien.danjou.info
  2. luffy.cx
  3. Cloudpanic
  4. Hyde Documentation Source

A brief list of features

  1. Evented Plugins: The Plugin hooks allow plugins to listen to events that occur during different times in the lifecycle and respond accordingly.
  2. Metadata: Hyde now supports hierarchical metadata. You can specify and override variables at the site, node or the page level and access them in the templates.
  3. Organization: The sorter, grouper and tagger plugins provide rich meta-data driven organizational capabilities to hyde sites.
  4. Publishing: Hyde sites can be published to variety of targets including github pages, Amazon S3 & SFTP.
  1. Changelog
  2. Authors

hyde's People

Contributors

adube avatar akete avatar bmattern avatar erkan-yilmaz avatar ftao avatar gredman avatar idank avatar ilkerde avatar jakevdp avatar jaredly avatar jd avatar jonafato avatar llonchj avatar maethor avatar merlinrebrovic avatar moggers87 avatar mtahmed avatar navilan avatar ndmarcel avatar nud avatar qulogic avatar rfk avatar shym avatar stiell avatar tarajane avatar theevocater avatar tinnet avatar vincentbernat avatar vinilios avatar webmaster128 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hyde's Issues

Allow full-text blog post contents

In listing.js, in the loop {% for res in resource.node.walk_resources_sorted_by_time() %}, I can successfully display the full file contents ({{ res.source.read_all() }}) but it’s unclear how to actually just get the text (without the metadata). It’s clear that you have a way to parse this out (__read_resource__ in MetaPlugin) and it’s obviously used in the single page/resource context, but I’m at a loss for how to use it in the blog/listing context.

Any idea why import breaks?

Hi,

I can't figure out why this error is raised

raise HydeException("The given module name [%s] is invalid." %

I've created a plugin and put it into the root folder next to site.yaml. Importing the module from the shell either with import or even load_python_object is fine, but wrapped inside hyde gen -r makes it fail. I've made sure the cwd is always the correct one.

Any help is appreciated.
Istvan

Documentation /overview: Typo in site creation command

For creating a website, doc /overview says:

hyde -s /path/to/your site create

Result in terminal:

usage: hyde [-h] [-s SITEPATH] [--version] [-v] {create,serve,gen} ...
hyde: error: invalid choice: 'site' (choose from 'create', 'serve', 'gen')

Fixed by using:

hyde -s /path/to/your/site create

I guess this was a typo.

Wrong error: "The given site path is not empty" with preexisting directory

When trying to create a new site using:

hyde -s /path/to/new/site/directory create

If the directory "/path/to/new/site/directory" exists and is empty, Hyde shows this error:

hyde.exceptions.HydeException: The given site path[/path/to/new/site/directory] is not empty

A correct error message would be:

hyde.exceptions.HydeException: The given site path [/path/to/new/site/directory] already exists

Better handling of this situation would be to allow the creation of a website in an existing empty directory. If it cannot be done and this restriction remains, what should be done is:

  1. Change the error message for this case.
  2. Change doc /overview to state that the directory at the end of the path will be created by Hyde and must not exist.

0.8rc1 breaks sorter plugin?

My template code worked fine with 0.8b3 but fails with 0.8b3.
These objects seem to be empty or undefined:

  • resource.node.walk_resources_sorted_by_time()
  • site.content.walk_resources_sorted_by_time()
  • resource.prev_by_time
  • resource.next_by_time

Packaging Error

When I execute hyde on the console, I get the following error.

Traceback (most recent call last):
File "/usr/local/bin/hyde", line 8, in <module>
    load_entry_point('hyde==0.6.0', 'console_scripts', 'hyde')()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 271, in load_entry_point
    return get_distribution(dist).load_entry_point(group, name)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 2174, in load_entry_point
    return ep.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 1907, in load
    entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/bin/main.py", line 5, in <module>
    pkg_resources.run_script('hyde==0.6.0', 'main.py')
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 442, in run_script
    self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 1160, in run_script
    execfile(script_filename, namespace, namespace)
File "/Library/Python/2.6/site-packages/hyde-0.6.0-py2.6.egg/EGG-INFO/scripts/main.py", line 6, in <module>
    from hyde.engine import Engine
File "/usr/local/bin/hyde.py", line 5, in <module>
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 442, in run_script
    self.require(requires)[0].run_script(script_name, ns)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 620, in require
    needed = self.resolve(parse_requirements(requirements))
File "/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/pkg_resources.py", line 522, in resolve
    raise VersionConflict(dist,req) # XXX put more info here
pkg_resources.VersionConflict: (hyde 0.6.0 (/Library/Python/2.6/site-packages/hyde-0.6.0-py2.6.egg), Requirement.parse('hyde==0.5.3'))

Plugin chaining does not work

Due to a bug, plugin chaining may not work as expected. To reproduce, use this:

  - hyde.ext.plugins.less.LessCSSPlugin
  - hyde.ext.plugins.uglify.UglifyPlugin

The first plugin will process a .less file and return the content of CSS file. The second plugin will take from here and because this is not a JS file will just return. Because this is the last plugin of the chain, its result (None) is used as the return value for the chain instead of the result of "less" plugin.

Strip index file names from URLs

My understanding is that when calling {{ content_url(resource.url) }}, Hyde concatenates base_url and resource.url (where resource.url is the relative path from the content folder to the file, including the file's name).

Now, most of my files are index.html files in dedicated folders (which works great for blog posts, since you can put the metadata in a post-specific meta.yaml file, and the post-specific media (e.g. images) in the post's folder. The trouble with this set-up is that Hyde will return URLs such as:

/2010/article-title/index.html

Where I would rather have:

/2010/article-title/

So the feature I suggest is to create a file_indexes config option (at the site level, not in meta) which can take a list of filenames. For instance:

file_indexes:
    - index.html
    - page.html

Then, content_url() would strip the final part of resource.url if it happens to match one of those values.

Best way to list folders sorted by x

Hello,

I am wondering what is the proper method to list all folders sorted by a sorter defined in site.yaml?

I understand the following can be done: resource.node.walk_resources_sorted_by_x(), which recursively lists the resources. What I want to do, however, is simply list all of the resources 1-level beneath resource.node, sorted by an arbitrary method.

What is the best way to do this? Thanks.

Document Jinja2 extensions

Apparently things like {% refer to X as y %} and {% do X if Y %} are Hyde-specific Jinja2 extensions. While cool and useful, this somewhat hinders naïve template re-use in another system (e.g. Tornado or Django). What exactly the new refer keyword does is confusing as well, as it sounds like the set keyword but appears Hyde-specific and somewhat more magical.

site.full_url does not work for media files

Hi!

site.full_url("media/image/myimage.png") does not work as intended because the call to get_relative_path uses self.config.media_root_path which is the fully extended path and therefore, we get something like /media/media/images/myimage.png.

Missing dependency - fs

In order to use the pyfs publisher, fs module is required. However, it is not istalled by pip by default.

I don't know how pip is managing dependecies, maybe it's enough to add "fs" to requirements.txt?

Creating site in current directory fails by default.

hyde create with no arguments complains:
hyde.exceptions.HydeException: The given site path [...] already exists. Use -f to overwrite.

This is because the default site path is '.' and the default is to complain if the directory already exists.

It doesn't help that hyde create --help neglects to document the -s option for reasons known only to commando.

Are templates no longer strictly Django-compatible?

If templates are powered by Jinja2 and Jinja2 claims to be “inspired by” Django templates, are Hyde templates no longer necessarily compatible with Django templates? Or, is Django now using Jinja2 or is Jinja2 simply a feature-for-feature port of Django templates?

Jinja2 is parsing CSS & chokes on valid syntax

i got the same issue as here: hyde/hyde-old#68, but with hyde 0.8.3:

> hyde gen && hyde serve
 14:01:54 hyde.engine Reading site configuration from [/home/ol/devel/foo.org-hyde/site.yaml]
 14:01:54 hyde.engine Reading site contents
 14:01:54 hyde.engine Generating site at [/home/ol/devel/foo.org-hyde]
 14:01:54 hyde.engine Configuring the template environment
 14:01:54 hyde.engine Generating site to [/home/ol/devel/foo.org-hyde/deploy]
 14:01:54 hyde.engine.Jinja2 Error parsing[media/yaml/core/slim_iehacks.css]
Traceback (most recent call last):
  File "/home/ol/devel/foo.org-hyde/env/bin/hyde", line 9, in <module>
    load_entry_point('hyde==0.8.3', 'console_scripts', 'hyde')()
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/hyde-0.8.3-py2.6.egg/hyde/main.py", line 10, in main
    Engine().run()
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/hyde-0.8.3-py2.6.egg/hyde/engine.py", line 38, in run
    super(Engine, self).run(args)
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/commando.py", line 198, in run
    args.run(self, args)
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/hyde-0.8.3-py2.6.egg/hyde/engine.py", line 115, in gen
    gen.generate_all(incremental=incremental)
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/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 "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/hyde-0.8.3-py2.6.egg/hyde/generator.py", line 302, in __generate_node__
    self.__generate_resource__(resource, incremental)                                                                           
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/hyde-0.8.3-py2.6.egg/hyde/generator.py", line 317, in __generate_resource__
    self.update_deps(resource)                                                                                                  
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/hyde-0.8.3-py2.6.egg/hyde/generator.py", line 143, in update_deps
    deps.extend(self.template.get_dependencies(rel_path))                                                                       
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/hyde-0.8.3-py2.6.egg/hyde/ext/templates/jinja.py", line 611, in get_dependencies
    ast = self.env.parse(text)                                                                                                  
  File "/home/ol/devel/foo.org-hyde/env/lib/python2.6/site-packages/jinja2/environment.py", line 393, in parse                  
    self.handle_exception(exc_info, source_hint=source)                                                                         
  File "<unknown>", line 5, in template                                                                                         
jinja2.exceptions.TemplateSyntaxError: Missing end of comment tag

the problematic part of the css:

@media screen,projection{#col1,#col2{display:inline}.c20l,.c25l,.c33l,.c38l,.c40l,.c50l,.c60l,.c62l,.c66l,.c75l,.c80l,.c20r,.c25r,.c33r,.c38r,.c40r,.c50r,.c60r,.c66r,.c62r,.c75r,.c80r{display:inline}* html .equalize,* html .equalize .subcolumns{overflow:visible;display:block}.equalize,.equalize .subcolumns{overflow:hidden;display:block}.equalize .c20l,.equalize .c40l,.equalize .c60l,.equalize .c80l,.equalize .c25l,.equalize .c33l,.equalize .c38l,.equalize .c50l,.equalize .c62l,.equalize .c66l,.equalize .c75l{float:left;display:inline;padding-bottom:32767px;margin-bottom:-32767px}.equalize .c20r,.equalize .c40r,.equalize .c60r,.equalize .c80r,.equalize .c25r,.equalize .c33r,.equalize .c38r,.equalize .c50r,.equalize .c62r,.equalize .c66r,.equalize .c75r{float:right;margin-left:-5px;display:inline;padding-bottom:32767px;margin-bottom:-32767px}.no-ie-padding .c20l,.no-ie-padding .c40l,.no-ie-padding .c60l,.no-ie-padding .c80l,.no-ie-padding .c20r,.no-ie-padding .c40r,.no-ie-padding .c60r,.no-ie-padding .c80r,.no-ie-padding .c25l,.no-ie-padding .c33l,.no-ie-padding .c38l,.no-ie-padding .c50l,.no-ie-padding .c62l,.no-ie-padding .c66l,.no-ie-padding .c75l,.no-ie-padding .c25r,.no-ie-padding .c33r,.no-ie-padding .c38r,.no-ie-padding .c50r,.no-ie-padding .c62r,.no-ie-padding .c66r,.no-ie-padding .c75r{padding-bottom:0;margin-bottom:0}* html #col1_content,* html #col2_content,* html #col3_content{word-wrap:break-word}* html .subc,* html .subcl,* html .subcr{word-wrap:break-word;o\verflow:hidden}}

the css is from: http://www.yaml.de/en/home.html

Installation instructions on Overview page are wrong

The installation instructions on the overview page say to run the following command:

pip install -e https://github.com/hyde/hyde#egg=hyde

Which gives you the following output:

(hyde)quote:hyde developer$ pip install -e https://github.com/hyde/hyde#egg=hyde--editable=https://github.com/hyde/hyde#egg=hyde should be formatted with svn+URL, git+URL, hg+URL or bzr+URL
Storing complete log in /Users/developer/.pip/pip.log

The instructions on the installation page have the following and it works:

pip install -e git://github.com/hyde/hyde.git#egg=hyde

inconsistent yaml handling ( inline / provider )

access of dict provided by yaml behaves differently when using external yaml file or inline

example yaml:
2011:
-
event_title: "one event"
event_location: "a city"
-
event_title: "one event"
event_location: "a city"

2010:
-
event_title: "one event"
event_location: "a city"
-
event_title: "one event"
event_location: "a city"

example template:
{% for year, eventlist in events %} does not work for external provider, only for inline yaml in meta section of the specific resource.

more detailed description:
http://groups.google.com/group/hyde-dev/browse_thread/thread/cff0e3abe59fb0d2

Ability to import own extensions from sitedir

When writing own extensions, the only possibility to import them is to add them to the hyde/ext directory. As this directory will be overwritten during updates and could even be not modifiable for a user at all, there should be a possibility to import extensions from the site-directory. This also enables the user to use site-specific extensions.

Tagger does not honor meta

The archive-pages created by the tagger extension do not honor the data provided in the meta-sections. Event the simple data in the site.yaml is not processed.

This can be checked easily with the default installation: Although the meta.author field is set in sites.yaml, all archive-pages lack this field in the html-header. It might be OK for the author to be missing but preserving other fields like the encoding is more important.

Can this be fixed? I'm not into the hyde-internals, so I'm not able to fix this.

HTML attributes are masked in {% raw %}

I've got the following in base.j2:

{% raw %}
<div class="template secondary">
<aside class="secondary">
  <ul>
    {{#sections}}
      <li><a href="#{{id}}">{{textContent}}</a></li>
    {{/sections}}
  </ul>
</aside>
{% endraw %}

The {{ tags }} inside {% raw %} are for a js templating library named mustache (http://mustache.github.com/). {{textContent}} gets rendered as it should but {{id}} does not; It gets masked: "%7B%7Bid%7D%7D". If I switch those two tags, it's always the one in href="#" which is getting masked. It even works if i write <a href "#{{id}}"> but as soon as I add "=", it breaks.

I guess it has something to do with url-escaping? My first thought was a plugin, I've got the following activated:

plugins:
    - hyde.ext.plugins.meta.MetaPlugin
    - hyde.ext.plugins.auto_extend.AutoExtendPlugin
    - hyde.ext.plugins.syntext.SyntextPlugin
    - hyde.ext.plugins.less.LessCSSPlugin
    - hyde.ext.plugins.sorter.SorterPlugin
    - hyde.ext.plugins.coffee.CoffeeScriptPlugin

My second thought is that it might has something to do with jinja2, but that should not be the case as long as i use {% raw %}, right?

greetings,
phaer

Jinja2 Extensions

Is there anyway to use custom Jinja2 filters and extension? While I understand that the goal is for Hyde to be template processor agnostic, there should be a way to configure it.

Maybe something like:

template:
- engine: hyde.ext.templates.jinja.Jinja2Template
- config:
- filters:
- mysite.lib.filters

The usecase for this should be obvious, but for me I'm porting an old-style Hyde site to the new one, which contained the "unslugify" filter, and the current Hyde does not implement this filter.

site root not included in python import path

The python import path should include the root of the current website, to use website-specific plugins.

When running the /usr/bin/hyde script, I cannot import python modules from the site root.

Files that contain --- or === yield errors

When a file contains --- or === in the main content (i.e. not at the very start of the file, and not with a tag name following the equal or dash signs), you get a Jinja error.
This error happens even if you don't define any plugin.

Use case for ------ or ===== strings in page content: in Markdown syntax, they can be used as underlines for H1 and H2 titles. ----- can also be used alone to create a HR element.

Traceback (not very informative):

Traceback (most recent call last):
  File "/usr/local/bin/hyde", line 9, in <module>
    load_entry_point('hyde==0.8b3', 'console_scripts', 'hyde')()
  File "/usr/local/bin/main.py", line 10, in main
    Engine().run()
  File "/Library/Python/2.6/site-packages/commando.py", line 193, in run
    args.run(self, args)
  File "/Library/Python/2.6/site-packages/hyde/engine.py", line 84, in gen
    gen.generate_all(incremental=args.incremental)
  File "/Library/Python/2.6/site-packages/hyde/generator.py", line 193, in generate_all
    self.__generate_node__(self.site.content, incremental)
  File "/Library/Python/2.6/site-packages/hyde/generator.py", line 284, in __generate_node__
    self.__generate_resource__(resource, incremental)
  File "/Library/Python/2.6/site-packages/hyde/generator.py", line 297, in __generate_resource__
    self.update_deps(resource)
  File "/Library/Python/2.6/site-packages/hyde/generator.py", line 139, in update_deps
    deps.extend(self.template.get_dependencies(rel_path))
  File "/Library/Python/2.6/site-packages/hyde/ext/templates/jinja.py", line 517, in get_dependencies
    ast = self.env.parse(text)
  File "/Library/Python/2.6/site-packages/jinja2/environment.py", line 393, in parse
    self.handle_exception(exc_info, source_hint=source)
  File "<unknown>", line 14, in template
jinja2.exceptions.TemplateSyntaxError: tag name expected

Documentation / site setup: content directory does not exist

Still following the doc /overview page.

After creating the website using hyde -s /path/to/site create, the next step in the overview is to generate the site:

cd /path/to/site
hyde gen

Result:

hyde.exceptions.HydeException: The given source folder[/path/to/site] does not exist

(Quick note: maybe a space before the [path] in the error message would help readability.)

The problem here is either that this step shouldn't be this high in the Overview, or some steps are missing. Other ways to fix this error:

  1. Create the content folder if it does not exist (and the current folder already has files that indicate that it's indeed a Hyde site).
  2. Or create an empty/dummy content folder when creating the site to begin with.

No means to reach text/contents of resource

Hi,
I'm trying to build a site including a blog with the latest hyde (0.8rc1). Works so far. Though I really have problems getting some kind of (atom) feed to render.
I tried the approach that works in 0.5 (same as Steve Losh uses with his site).

I posted my files at https://gist.github.com/878656

My problem:
The resource object has no property nor any method to access the text/content of the represented file. When I look at plugins/meta.py#__read_resource__() it seems like the text/content of the resource is actually never stored in the resource object.
Adding a something like the following resource.text = text or ' ' before the return statement of the __read_resource__ method would fix this. Though it feels somehow ugly and would only fix the "issue" when the meta plugin is used.

Am I missing something? Is there no way to access the text/content of a resource?

Thanks for your help.

Cheers, Benjamin

Problem generating site using doc template

I created the site using the doc template because I wanted to see what this would look like.

(hyde)quote:~ developer$ hyde -s ~/docs_test create -l doc
20:13:41 hyde Creating site at [/Users/developer/docs_test] with layout [/Users/developer/.virtualenv/hyde/src/hyde/hyde/layouts/doc]
20:13:41 hyde Site creation complete

When I attempted to generate the site I came across two errors.

(hyde)quote:docs_test developer$ hyde -s ~/docs_test gen
20:15:44 hyde.engine Reading site configuration from [/Users/developer/docs_test/site.yaml]
20:15:44 hyde.engine Reading site contents
20:15:44 hyde.engine Generating site at [/Users/developer/docs_test]
20:15:44 hyde.engine Configuring the template environment
20:15:44 hyde.engine Begin Generation
20:15:44 hyde.engine Reading site contents
20:15:44 hyde.engine Generating site to [/Users/developer/docs_test/../../../../hyde.github.com]
Traceback (most recent call last):
File "/Users/developer/.virtualenv/hyde/bin/hyde", line 8, in
load_entry_point('hyde==0.6.0', 'console_scripts', 'hyde')()
File "/Users/developer/.virtualenv/hyde/src/hyde/main.py", line 10, in main
Engine().run()
File "/Library/Python/2.6/site-packages/commando.py", line 193, in run
args.run(self, args)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/engine.py", line 82, in gen
gen.generate_all()
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 166, in generate_all
self.generate_node(self.site.content)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 242, in generate_node
self.generate_resource(resource)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 276, in generate_resource
self.events.binary_resource_complete(resource)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/contextlib.py", line 34, in exit
self.gen.throw(type, value, traceback)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 45, in context_for_resource
yield self.context
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 268, in generate_resource
target.write(text)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/fs.py", line 267, in write
with codecs.open(self.path, 'w', encoding) as fout:
File "/Users/developer/.virtualenv/hyde/lib/python2.6/codecs.py", line 865, in open
file = builtin.open(filename, mode, buffering)
IOError: [Errno 2] No such file or directory: '/Users/developer/docs_test/../../../../hyde.github.com/commandline.html'

This is the one when I specify a directory to deploy to:

(hyde)quote:docs_test developer$ hyde -s ~/docs_test gen -d ~/deploy
20:14:58 hyde.engine Reading site configuration from [/Users/developer/docs_test/site.yaml]
20:14:58 hyde.engine Reading site contents
20:14:58 hyde.engine Generating site at [/Users/developer/docs_test]
20:14:58 hyde.engine Configuring the template environment
20:14:58 hyde.engine Begin Generation
20:14:58 hyde.engine Reading site contents
20:14:58 hyde.engine Generating site to [/Users/developer/deploy]
Traceback (most recent call last):
File "/Users/developer/.virtualenv/hyde/bin/hyde", line 8, in
load_entry_point('hyde==0.6.0', 'console_scripts', 'hyde')()
File "/Users/developer/.virtualenv/hyde/src/hyde/main.py", line 10, in main
Engine().run()
File "/Library/Python/2.6/site-packages/commando.py", line 193, in run
args.run(self, args)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/engine.py", line 82, in gen
gen.generate_all()
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 166, in generate_all
self.generate_node(self.site.content)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 242, in generate_node
self.generate_resource(resource)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/generator.py", line 264, in generate_resource
resource, text) or text
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/plugin.py", line 35, in call_plugins
res = function(*args)
File "/Users/developer/.virtualenv/hyde/src/hyde/hyde/ext/plugins/less.py", line 68, in text_resource_complete
"is incorrect" % less)
jinja2.exceptions.TemplateError: Cannot find the less executable. The given path [/Users/developer/local/bin/lessc] is incorrect

Unable to modify context with a plugin

I have found that I am unable to inject context with a plugin since it is overwritten when the generator generates the context for the site. I suppose I could dump the data from the plugin into a provider and dump it as yaml but I'd prefer to just be able to inject the context directly from a plugin since that seems much cleaner to me.

Add the ability to ignore some files

Some editors are generating backup files that should be ignored by hyde. For example, files ending by ~ should be ignored, as well as files starting and ending by #

.hyde_deps doesn't register context data providers

I noticed that when I change the included YAML file, the ?refresh command to the server didn't re-read site.yaml. I assumed that this is related to it not being in .hyde_deps (?). Not a huge issue, just confusing at times...

How do I access a mark from a parent template?

I have a post where I have a section marked like this:

{% mark excerpt -%}
Text
{%- endmark %}

But I can't figure out how to access that mark in the parent template. It seems like I should be able to just put {% mark excerpt %}{% endmark %}, but that doesn't render anything.

Currently {% block post -%}{%- endblock %} in the parent template renders the whole post.

Sorry, total noob. Thanks for the help!

sorter throws AttributeError: object has no attribute

Example:

sorter:
    some_sort_name:
        attr: some_attribute

if some of objects to sort have no attribute 'some_attribute' sorter will throw AttributeError exception. Instead such objects should be filtered out, or maybe some easy filtering method should be provided, maybe something like:

sorter:
    some_sort_name:
        attr: some_attribute
        filters:
            some_attribute: '*'

Markdown ToC

I am using latest version of hyde. Makrdown [TOC] is not working, not sure why? I added Headings and Subheading but nothing just showing [TOC] on html page. Also several other Markdown features are not working. Off-course latest python-markdown is installed and it comes with toc extension. Will appreciated any input.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.