- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
嗨,我昨天发了一篇标题为“Oi”的帖子,现在我正在尝试用不同的标题发新帖子,但它试图与旧帖子混淆,我是
收到此警告和错误消息:
WARNING: There are 2 variants of "oi" with lang en
WARNING: Development/web_projects/weeklyUpdate/content/2015_06_06_oi.md
WARNING: Development/web_projects/weeklyUpdate/content/2015_06_07_oi.md
CRITICAL: File Development/web_projects/weeklyUpdate/output/oi.html is to be overwritten
最佳答案
假设您的内容目录中有两个帖子,
content/
├── post1.md
└── post2.md
具有相同的标题但不同的作者/内容。
post1.md
Title: Oi
Author: Dr. Jekyll
Date: 2015-07-15 10:30
Category: StackOverflow
Tags: pelican
"Well, I tell you so again," continued the lawyer. "I have been
learning something of young Hyde."
The large handsome face of Dr. Jekyll grew pale to the very lips,
and there came a blackness about his eyes. "I do not care to hear
more," said he. "This is a matter I thought we had agreed to drop."
post2.md
Title: Oi
Author: Mr. Hyde
Date: 2015-07-15 10:20
Category: StackOverflow
Tags: pelican
"We have common friends," said Mr. Utterson.
"Common friends?" echoed Mr. Hyde, a little hoarsely. "Who are
they?"
"Jekyll, for instance," said the lawyer.
因为 Pelican 使用帖子标题对这些帖子进行“分类处理”,所以会导致您看到的名称冲突。
解决方案是将 Slug: my-slug-line
元数据添加到每个帖子,以强制帖子呈现到 my-slug-line.html
。在我们的示例中:
post1.md
Title: Oi
Author: Dr. Jekyll
Date: 2015-07-15 10:30
Category: StackOverflow
Tags: pelican
Slug: oi-dr-jekyll
"Well, I tell you so again," continued the lawyer. "I have been
learning something of young Hyde."
The large handsome face of Dr. Jekyll grew pale to the very lips,
and there came a blackness about his eyes. "I do not care to hear
more," said he. "This is a matter I thought we had agreed to drop."
post2.md
Title: Oi
Author: Mr. Hyde
Date: 2015-07-15 10:20
Category: StackOverflow
Tags: pelican
Slug: oi-mr-hyde
"We have common friends," said Mr. Utterson.
"Common friends?" echoed Mr. Hyde, a little hoarsely. "Who are
they?"
"Jekyll, for instance," said the lawyer.
这会将 Dr. Jekyll 的第一篇文章输出到 oi-dr-jekyll.html
,将 Mr. Hyde 的第二篇文章输出到 oi-mr-hyde.html
.
Slug:
元数据是可选的,因此您不必执行此操作,除非遇到命名冲突。但它有时会派上用场。
另请注意:
如果你想对非博客或“静态”页面做同样的事情,比如用 Markdown 编写的“关于我”页面,你可以使用 save_as: my_page.html
元数据来强制将 Markdown 渲染到 my_page.html
,无论页面标题是什么。
关于python - 尝试在鹈鹕中发表新帖子时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30690831/
我想在博客文章中嵌入一些 html 元素和 javascript。这是我的 Markdown 文件。 Title: Foo Tags: Bar Some Content here
如果有人可以帮助我,那么随机的小鹈鹕问题。 我正在写一个主题,它是这样的结构。 ├── static │ ├── css │ ├── js │ └── img └── templates
我已经为 Pelican 创建了自己的主题,并且我已经使用它一段时间来构建我的网站。我决定重新开始写博客,所以我现在才将博客功能添加到网站。 我已经创建了自己的 blog.html 模板来以我想要的方
我是一名优秀的程序员,十分优秀!