我开始学习Hyde了,我从Github克隆了几个用Hyde写的博客。我可以在我的web浏览器中成功地生成这些示例博客,并在本地提供它们;但是,我似乎不知道如何实际生成新内容。例如,如何在HTML或markdown中添加新文件,然后将该文件提供给站点?我没有看到在docs中提到如何做到这一点。我遗漏了什么?我正在使用的示例博客的目录结构如下所示:
---content
---about
---blog
---deploy
---about
---blog
---layout
---base.j2
---listing.j2
---posts.j2
---info.yaml
---site.yaml谁能解释一下如何添加HTML或markdown文件并将其提供给用户?
发布于 2012-01-08 23:52:42
Hyde没有创建新文件的命令。您可以在您喜欢的编辑器中创建该文件,并将其保存在正确的目录中。
例如,如果您想要一篇包含以下url的博客文章:http://localhost:8080/blog/2012/01/05/a-new-post,
您必须执行以下操作:
blog/2010/01/05 发布于 2012-02-03 08:48:48
我已经编写了一个名为Ghorg的项目,它提供了一个命令行实用程序,用于管理组织模式博客帖子的集合,将它们作为html发布到您的hyde站点,以及调用hyde生成和发布功能。这纯粹是一个方便的实用程序,因为您不再需要到站点存储库使用它。
我想,比方说,如果一些vim用户或者那些想要帖子管理而不是组织模式发布的人,也许想要markdown或其他东西(现在硬编码成只打开emacs) -如果这些人想让它更通用,那就太好了。
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. https://stackoverflow.com/questions/8773912
复制相似问题