I'm starting to learn Hyde and I've cloned a few blogs written in Hyde from Github. I can successfully generate these sample blogs in my web browser and serve them locally; however, I can't seem to figure out how to actually generate new content. For example, how can I add a new file in HTML or markdown then serve the file to the site? I see no mention of how to do this in the docs. What am I missing? The directory structure of the sample blogs I'm working with looks like this:
---content
---about
---blog
---deploy
---about
---blog
---layout
---base.j2
---listing.j2
---posts.j2
---info.yaml
---site.yaml
Can anyone explain how to add either HTML or markdown files and have them served?
Hyde does not have commands to create new files. You can create the file in your favorite editor and save it in the correct directory.
For example, if you want a blog post with this url: http://localhost:8080/blog/2012/01/05/a-new-post,
you have do the following:
blog/2010/01/05
under your content folderhyde gen
and hyde serve
- you will see the file show up in that urlI have written a project called Ghorg which provides a command-line utility for managing a collection of org-mode blog posts, publishing them as html to your hyde site, and invoking the hyde generation and publishing features. This is purely a utility of convenience in that you no longer have to go to your site repository to use it.
I think if, say, some vim users or people who want the post management but not org-mode publish but perhaps markdown or something else (right now its hard-coded to just open emacs) - if those people wanted to help make this more generic then well that'd be great.
Ghorg: Org for Hyde
dlacewell@scarf$ ghorg -h
usage: ghorg [-h] [-b] [-p] [-s SITE] [--config CONFIG] [-l] [-n [N]] [-P]
[-U] [-e] [-t TEMPLATE] [-D]
[title [title ...]]
Manage your Ghorg blog.
positional arguments:
title all arguments will be joined with hyphen for filename
`ghorg post title' => `2012-01-12-post-title.org'
optional arguments:
h, --help show this help message and exit
b, --build Perform configured Hyde build step.
p, --publish Perform configured Hyde publishing step. (implies -b/-- build)
s SITE, --site SITE Path to the root of the Hyde site.
config CONFIG Filename of Hyde configuration for building.
l, --list List previous posts (-n to change count).
n [N] Change number of posts listed (default:5).
P Set post as published.
U Set post as unpublished.
e Mix with -P/-U to edit while changing publishing
status.
t TEMPLATE Location of template for new posts.
D Delete existing post.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With