【问题标题】:How to maintain the page folder structure in pelican?pelican中如何维护页面文件夹结构?
【发布时间】:2016-09-09 12:13:59
【问题描述】:

我在路径内容/页面中复制了几个文件夹。运行 pelican content 命令后,我在输出文件夹下转换了 html 文件,其中所有 html 文件都复制到 output/pages 下。

例如:

如果我有文件夹结构:

内容

    - pages

           - hello
                  - hello.html

           - world
                  - world.html

我得到的输出为:

输出

     - pages

            - hello.html
            - world.html

我需要在输出文件夹中保留原来的文件夹结构。

USE_FOLDER_AS_CATEGORY = True 选项不起作用。显然,它仅适用于文章而不适用于页面。

有没有其他方法来构建文件夹结构?

【问题讨论】:

  • 嗨,斯里。我提供的答案是否解决了您的问题?
  • 嗨贾斯汀。而不是使用它,我在 peliconconf.py 中使用了一个简单的方法:PATH_METADATA= '(?P<path_no_ext>.*)\..*' PAGE_SAVE_AS='{path_no_ext}.html' 这对我有用。

标签: python-2.7 markdown pelican


【解决方案1】:

我相信以下插件专为您描述的确切用例而设计:https://github.com/akhayyat/pelican-page-hierarchy

【讨论】:

    猜你喜欢
    • 2011-09-15
    • 1970-01-01
    • 1970-01-01
    • 2018-12-04
    • 2019-03-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多