nikola
nikola copied to clipboard
YAML metadata in Pandoc-renderred posts is included in HTML
Hello:
Environment
Python Version: 3.5.3
Nikola Version: 8.2.0
Operating System: docker nginx:alpine
Description:
config.py
METADATA_FORMAT = "YAML"
Post source:
---
category: ''
date: 2022-02-24 16:06:27 UTC+01:00
description: ''
link: ''
slug: novo-artigo
tags: ''
title: Título do artigo 3
type: text
---
Escribe o teu artigo aquí.
Metadata is rendered (showed):
Very thanks.
Hi, sorry for the late response, but I cannot reproduce this, using Nikola v8.2.0, Ubuntu 20.04, and both reST and Markdown posts, both fresh (nikola new_post
) and using code provided by you. Can you verify you’re using a recent version of Nikola and other dependencies?
Hello: Sorry, I've been reviewing the issue and it happens when I use pandoc as a compiler and mix posts in rst and markdown.
This scenario isn’t currently supported, and it might be difficult to add support for it. For pandoc posts, we don’t remove the metadata from compiled posts — this is because our algorithm might delete parts of content in some conditions, and some input formats might lead to metadata not being removed anyway.
If you’re using Markdown and reST, consider using a native compiler instead of Pandoc. If you’re using Pandoc, you’ll need to use the Nikola metadata format and comments appropriate for your input format, or two-file posts.
OK! At the moment two-file posts is my solution. Very thanks!