Migration 从杰基尔到鹈鹕的迁徙

Migration 从杰基尔到鹈鹕的迁徙,migration,jekyll,pelican,Migration,Jekyll,Pelican,鹈鹕文章的开头是这样的: Title: Training your first Neural Network Category: My bits and bytes Date: 2015-12-03 07:30 Tags: Science, Papers, Reading, Google Scholar Authors: Martin Thoma The following article gives you the necessary knowledge ... --- layout: p

鹈鹕文章的开头是这样的:

Title: Training your first Neural Network
Category: My bits and bytes
Date: 2015-12-03 07:30
Tags: Science, Papers, Reading, Google Scholar
Authors: Martin Thoma

The following article gives you the necessary knowledge ...
---
layout: post
title: Training your first Neural Network
author: Martin Thoma
date: 2015-12-03 07:30
categories:
- My bits and bytes
tags:
- Science
- Papers
- Reading
- Google Scholar
featured_image: logos/science.png
---
The following article gives you the necessary knowledge ...
Jekyll文章的开头是这样的:

Title: Training your first Neural Network
Category: My bits and bytes
Date: 2015-12-03 07:30
Tags: Science, Papers, Reading, Google Scholar
Authors: Martin Thoma

The following article gives you the necessary knowledge ...
---
layout: post
title: Training your first Neural Network
author: Martin Thoma
date: 2015-12-03 07:30
categories:
- My bits and bytes
tags:
- Science
- Papers
- Reading
- Google Scholar
featured_image: logos/science.png
---
The following article gives you the necessary knowledge ...
我想把我的博客从Jekyll迁移到Pelican。但是,我更喜欢用Jekyll方法来注释元数据。GitHub()上的降价预览也支持它,与Pelican头类型()不同

是否有可能让鹈鹕理解Jekyll标签列表格式?如果没有,如何将Jekyll元数据迁移到Pelican

分歧
  • 列表格式:
    • Pelican不了解Jekyll的标签格式
    • 类别:我不确定Pelican是否支持多个类别的文章。我也不确定我是否有,但再一次:鹈鹕不理解列表格式
  • 我不知道鹈鹕是如何处理这张图片的。我想你可以通过模板来访问它
  • 鹈鹕有类似的布局吗
  • 不重要的差异
    • 大写的第一个字母似乎无关紧要。鹈鹕似乎理解它,当它是小写
    • 元数据前后的
      --
      似乎无关紧要
  • Pelian有
    {filename}
    的。我想我可以编写一个脚本来搜索
    。/images
    ,并将其替换为
    {filename}/images
    。有没有可能告诉杰基尔,
    {filename}
    应该替换为
    ?这对于我仍然使用Jekyll的过渡阶段来说是很好的,但是要让代码为Pelican所接受
除了插件和主题无法给出一般性的答案外,我不知道还有其他重要的区别

首先,我必须删除覆盖元数据的三个破折号:

sed-i''/--/d'*.md

然后我不得不将“类别:”重命名为“类别”:

sed-i''s/categories:/category:/g'*.md

然后我不得不删除.html permalinks的扩展:

sed-i''/permalink:/s/.html//g'*.md

然后我不得不重新命名 permalink:“到”Slug:“

sed-i''/permalink:/s/permalink:/Slug:/g'*.md

然后我不得不搬走 slug前面的斜杠:

sed-i''s/Slug://Slug:/g'*.md

然后我不得不更换一些 引号、三点、破折号等字符:

sed-i''s/''/g'*.md sed-i''s/“/”/g'*.md sed-i''s/“/”/g'*.md sed-i''s/../…/g'*.md sed-i''s/-/-/g'*.md


还有一个指向类别和标记的python脚本的链接

Jekyll元数据部分在YAML中,有很多著名的解析器,因此您可以自己编写迁移脚本。Pelican不支持。请使用标签而不是类别,这就是您要查找的内容。