Search code examples
pythondjangojekyllhyde

How to generate new content with Hyde?


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?


Solution

  • 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:

    1. Create the directory blog/2010/01/05 under your content folder
    2. Use a text editor to create your post
    3. Save the file in the directory you created in step 1
    4. When you do hyde gen and hyde serve - you will see the file show up in that url