A Python Static Website Generator

Overview

Version 0.8.9

https://travis-ci.org/hyde/hyde.svg?branch=master

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.

Links

  1. Changelog
  2. Authors
Comments
  • new config variable: simple_copy_re

    new config variable: simple_copy_re

    The "simple_copy" site configuration variable uses globbing to flag pages for pass-through filtering. This commit adds "simple_copy_re" that uses regex matching to flag files.

    opened by bstpierre 18
  • Packaging Error

    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'))
    
    opened by sorin-ionescu 16
  • Add initial (experimental) Python 3 support.

    Add initial (experimental) Python 3 support.

    All tests* currently pass under Python 2.7 and Python 3.3 - 3.5. This does not mean that Python 3 support is stable, however. As a plan forward, we should encourage interested users to run Hyde with Python 3, report bugs, and submit patches. This change references the Python 3 Support issue on GitHub (#270). Once this becomes a bit more tested and stable, that issue should be closed, and Hyde should announce official, stable support for Python 3 (i.e. new changes must also support 3, issues with running hyde under 3 should be considered bugs rather than feature requests, etc.).

    Changes:

    • Add hyde/_compat.py for 2-to-3 compatibility helpers.
    • Replace uses of 2-specific code with their hyde._compat versions.
    • Tests remain largely unchanged (for good reason). The exceptions here are to print function calls, and str type usage, and compatibility imports.
    • Replace explicit calls to foo.next() with next(foo). This keeps code portable between Python 2's next and Python 3's __next__ methods without the need for any compatibility functions and is the recommended API for interacting with these methods.
    • Replace deprecated (and, in Python 3, removed) except Exception, e: statements with their updated except Exception as e: versions.
    • Replace print statements with print function calls (because of how parentheses work in Python, this is transparently cross-version-compatible).
    • Add Python 3.3, 3.4, and 3.5 to tox.ini, .travis.yml, and classifiers in setup.py.
    • Add {posargs} to tox.ini command invocations to improve usage during development.
    • Add Python 3 note in changelog.

    * asciidoc does not support Python 3, and fixing that far beyond the scope of this task, so the test that deals with it is conditionally skipped when run using versions of Python 3.

    opened by jonafato 13
  • Markdown filter not being applied

    Markdown filter not being applied

    This is what one of my content files has in it:

    ### First stuff
    I'm in love with [hyde](https://github.com/hyde/).
    

    This is all inside of:

    {% filter markdown|typogrify -%}
    {% mark post -%}
    <article>
        {% block post -%}{%- endblock %}
    </article>
    {%- endmark %}
    {%- endfilter %}
    

    The typogrify filter works but I cannot get the markdown filter to work at all. This is hyde 0.8.5a15 on Mac OS X 10.6.8 (Snow Leopard).

    opened by needcaffeine 11
  • Git Plugin: Fall back on file mtime/ctime if not tracked by git

    Git Plugin: Fall back on file mtime/ctime if not tracked by git

    When using 'git' as the value for resource.meta.created or resource.meta.modified, the Git plugin will fetch those from the git repository. But if the file was not known by git, it used to no alter the attributes, leaving them as the 'git' string.

    This was causing issues because many consumers of those attributes (for instance, the xmldatetime template filter from jinja2) expect to find a datetime instance and will raise an exception if they find a string.

    This patch works around this issue by falling back on the file's own ctime and mtime in case the file wasn't added to the git repository yet (which can happen for brand new entries).

    opened by nud 11
  • Encoded urls support

    Encoded urls support

    added support for encoded urls to hyde server. Now it can handle urls encoded like this: "some%20url" or "%D0%9F%D1%80%D0%BE%D0%B3%D1%80%D0%B0%D0%BC%D0%BC%D0%B8%D1%80%D0%BE%D0%B2%D0%B0%D0%BD%D0%B8%D0%B5"

    integrated 
    opened by gfuchedzhy 11
  • raw + extends = dead

    raw + extends = dead

    I have a blog post with the following text:

     {% raw %}
     {% extends "admin_tp/base.html" %}
     {% endraw %}
    

    and it kills my template. But hyde gen doesn't throw any errors. Essentially it's processing the extends as if it weren't within raw. Other things like block and endblock are properly ignored.

    opened by jaredly 10
  • Add support for the $PATH environment variable.

    Add support for the $PATH environment variable.

    On Unix-based system, the $PATH variable plays a central role at locating executables. Most of the time, you will be able to find your well-known executable easily by looking up in all the directories listed in $PATH, and you can even add an extra directory by altering the PATH variable in your shell beforehand.

    For instance, in my own .bashrc file, the folllowing line is sufficient to be able to call anything I installed in my home directory: export PATH=~/.local/bin:$PATH

    This is why I added support for that handy environment variable and for a default application command in hyde. This makes it possible to not do any assumptions in the site.yaml file, making it easier to edit or generate the site on several computers with a different setup (e.g. if lessc is not installed with the same path on both machines, like what happened to me when I wanted to generate your hyde-docs site).

    integrated 
    opened by nud 10
  • The webserver does not work

    The webserver does not work

    I created a new project using hyde create and then tried to serve it using hyde serve and the server just hangs forever for http://127.0.0.1:8080 and just returns 404 for http://localhost:8080 When I accessed http://127.0.0.1:8080 I got the following traceback Exception happened during processing of request from ('127.0.0.1', 60578) Traceback (most recent call last): File "C:\Python27\Lib\SocketServer.py", line 284, in _handle_request_noblock self.process_request(request, client_address) File "C:\Python27\Lib\SocketServer.py", line 310, in process_request self.finish_request(request, client_address) File "C:\Python27\Lib\SocketServer.py", line 323, in finish_request self.RequestHandlerClass(request, client_address, self) File "C:\Python27\Lib\SocketServer.py", line 639, in init self.handle() File "C:\Python27\Lib\BaseHTTPServer.py", line 343, in handle self.handle_one_request() File "C:\Python27\Lib\BaseHTTPServer.py", line 313, in handle_one_request self.raw_requestline = self.rfile.readline(65537) File "C:\Python27\Lib\socket.py", line 476, in readline data = self._sock.recv(self._rbufsize) error: [Errno 10054] An existing connection was forcibly closed by the remote host What could be the problem?

    opened by thedrow 7
  • auto_extend: Add a 'filter' option to apply a filter on the text

    auto_extend: Add a 'filter' option to apply a filter on the text

    This add a 'filter' option to the auto_extend plugin.

    This option will wrap the text with {% filter XXX %} / {% endfilter XXX %}, the same way as the default_block works.

    Please merge or comment.

    opened by benallard 7
  • Wrapping markdown-content inside DIV wrapper with CLASS and ID

    Wrapping markdown-content inside DIV wrapper with CLASS and ID

    Since all the blog-posts are written in markdown in hyde, I have come across a weird problem. I need to wrap the MARKDOWNed content within a div and provide a class and id to it.

    For eg:

    Why hyde
    --------------
    
    ### Pros
    
    It saves a lot of considerable amount of time rather writing from the scratch.
    

    I want to wrap the above code as:

    Why hyde
    --------------
    
    <div id="scroll" class="spyScroll">
    
    ### Pros
    
    It saves a lot of considerable amount of time rather writing from the scratch.
    
    </div>
    

    But when I try the above method, Markdown inside the div doesn't work. I need this since I have to mark that content being active and show the corresponding link being highlighted in Table of Contents on the left side of blog-post.

    Any help regarding the same would be highly appreciated. @lakshmivyas

    Thanks!

    opened by softvar 6
  • dont convert to rgba if jpeg, addresses #348

    dont convert to rgba if jpeg, addresses #348

    The image plugin thumbnailer generates an error when converting JPEG to thumbnails, since it uses image mode RGBA, and as of about version 3 of Pillow this has been deprecated and then removed.

    This patch tests if the image is a JPEG by checking the im.format and does no conversion if its a JPEG.

    opened by barryrowlingson 0
  • "Error occured when calling imagethumbnails" message

    Thumbnailing JPEGs failed with a

    20:44:31 hyde Error occured when calling imagethumbnails

    This line:

    https://github.com/hyde/hyde/blob/7f415402cc3e007a746eb2b5bc102281fdb415bd/hyde/ext/plugins/images.py#L295

    hyde converts the PIL image to RGBA, but that fails with Pillow after v3.7 because it was deprecated and then removed:

    https://github.com/python-pillow/Pillow/commit/193c7561392fd12c3bd93bc232d9041c89bec4f6

    with the advice to convert to RGB before saving. I think the solution for hyde is to not convert to RGBA on line 295 for JPEG files.

    short diff attached tests and only converts non-JPEG to RGBA.

    diff.txt

    (Let me know if you'd rather I did a fork and PR, but its about two lines!)

    opened by barryrowlingson 1
  • should python-dateutil be listed as a dependency?

    should python-dateutil be listed as a dependency?

    Hi I notice python-dateutil is used in hyde/ext/plugins/vcs.py. But it seems python-dateutil is not installed when "pip install hyde". So I am wondering if python-dateutil should be listed as dependency. image

    opened by suliuzh 0
  • docs: fix simple typo, utiltities -> utilities

    docs: fix simple typo, utiltities -> utilities

    There is a small typo in hyde/plugin.py.

    Should read utilities rather than utiltities.

    Semi-automated pull request generated by https://github.com/timgates42/meticulous/blob/master/docs/NOTE.md

    opened by timgates42 0
  • Look into Deepsource for coverage/CVE scans

    Look into Deepsource for coverage/CVE scans

    Currently we are relying on travis and tox to give us coverage reports. It would make more sense to use deepsource since it also has free CVE, bug risk, performance issues and anti-pattern recognition etc. built into it.

    Development/Contribution Documentation CI/CD QOL Post 1.0.0 
    opened by Descent098 0
Owner
Hyde - Static Website Generator
Hyde - Static Website Generator
a static website generator to make beautiful customizable pictures galleries that tell a story

Prosopopee Prosopopee. Static site generator for your story. Make beautiful customizable pictures galleries that tell a story using a static website g

Bram 259 Dec 19, 2022
A static website generator for people who enjoy the simpler things in life.

A static website generator for people who enjoy the simpler things in life.

Darren Mulholland 93 Dec 22, 2022
Simple, lightweight, and magic-free static site/blog generator for Python coders

makesite.py Take full control of your static website/blog generation by writing your own simple, lightweight, and magic-free static site generator in

Sunaina Pai 1.7k Jan 1, 2023
Static site generator that supports Markdown and reST syntax. Powered by Python.

Pelican Pelican is a static site generator, written in Python. Write content in reStructuredText or Markdown using your editor of choice Includes a si

Pelican dev team 11.3k Jan 4, 2023
Static site generator for designers. Uses Python and Django templates.

News Cactus 3 is out! We're happy to announce Cactus 3. It brings a set of great new features like asset fingerprinting, an asset pipeline, pretty url

null 3.4k Jan 1, 2023
AutoLoader is a plugin for Pelican, a static site generator written in Python.

AutoLoader AutoLoader is a plugin for Pelican, a static site generator written in Python. AutoLoader is designed to autoload the other Pelican plugins

null 2 Nov 7, 2022
Kaktos is a python static site generator

Python static site generator κάκτος Kaktos is a python static site generator. The idea is create a simple static site generator for people that don't

Paulo Coutinho 4 Sep 21, 2022
barely is a lightweight, but highly extensible static site generator written in pure python.

barely is a lightweight, but highly extensible static site generator. Explore the docs » Quickstart · See available Plugins · Report Bug · Request Fea

null 40 Dec 1, 2022
A python-based static site generator for setting up a CV/Resume site

ezcv A python-based static site generator for setting up a CV/Resume site Table of Contents What does ezcv do? Features & Roadmap Why should I use ezc

Kieran Wood 5 Oct 25, 2022
A simple static site generator with deployment to S3/Cloudfront.

Stasis A simple static site generator with deployment to S3/Cloudfront. Features Stasis is a static website generator written in Python, using Pandoc

Scott Czepiel 56 Sep 29, 2022
dirmaker is a simple, opinionated static site generator for quickly publishing directory websites.

dirmaker is a simple, opinionated static site generator for publishing directory websites (eg: Indic.page, env.wiki It takes entries from a YAML file and generates a categorised, paginated directory website.

Kailash Nadh 40 Nov 20, 2022
A declarative website generator designed for high-quality websites, with a focus on easy maintenance and localization.

Grow Grow is a declarative tool for rapidly building, launching, and maintaining high-quality static HTML. Easy installation Jinja template engine Con

Grow 385 Dec 3, 2022
Hobby Project. A Python Library to create and generate static web pages using just python.

PyWeb ??️ ?? Current Release: 0.1 A Hobby Project ?? PyWeb is a small Library to generate customized static web pages using python. Aimed for new deve

Abhinav Sinha 2 Nov 18, 2021
Simple Static Site Inductor Made in Python

sssimp ?? Simple Static Site Inductor Made in Python How to use Create a folder called input, inside create a folder called content and an empty file

Tina 11 Oct 9, 2022
The lektor static file content management system

Lektor Lektor is a static website generator. It builds out an entire project from static files into many individual HTML pages and has a built-in admi

Lektor CMS 3.6k Dec 29, 2022
Makes dynamic linked shit "static". Amazing

static.py What does it do? You give it a dynamically linked binary and it will make a directory that has all the dependencies (recursively). It also f

Stephen Tong 24 Dec 16, 2022
A Python media index

pyvideo https://pyvideo.org is simply an index of Python-related media records. The raw data being used here comes out of the pyvideo/data repo. Befor

pyvideo 235 Dec 24, 2022
This is a simple website crawler which asks for a website link from the user to crawl and find specific data from the given website address.

This is a simple website crawler which asks for a website link from the user to crawl and find specific data from the given website address.

Faisal Ahmed 1 Jan 10, 2022
A static website and blog generator

Nikola, a Static Site and Blog Generator In goes content, out comes a website, ready to deploy. Why Static Websites? Static websites are safer, use fe

Nikola, a static site generator 2.4k Jan 5, 2023
a static website generator to make beautiful customizable pictures galleries that tell a story

Prosopopee Prosopopee. Static site generator for your story. Make beautiful customizable pictures galleries that tell a story using a static website g

Bram 259 Dec 19, 2022