Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YAML header "tags:" does nothing but it's in documentation #4779

Closed
bulrush15 opened this issue Jul 18, 2018 · 4 comments
Closed

YAML header "tags:" does nothing but it's in documentation #4779

bulrush15 opened this issue Jul 18, 2018 · 4 comments
Labels

Comments

@bulrush15
Copy link

Pandoc 2.2.1 on Windows 7.
Making an EPUB from a Markdown file.

In the Pandoc user guide there shows a YAML field called "tags:" but it doesn't seem to do anything. I cannot find the contents of "tags:" in the content.opf in the EPUB file. My markdown file test1.md:

---
title: My title
author: John Author
date: 2017-03
subject: plague, Manchuria
description: A description of the book from the "description:" YAML field.
tags: [tag1, tag2]
---

# Introduction

Updated: 2018-0421

My pandoc command line: pandoc --from=markdown+backtick_code_blocks+pipe_tables --to=epub --css=style01.css --output=test1.epub test1.md

Documentation screen shot that shows "tags:":
pandoc-tags

@bulrush15 bulrush15 changed the title YAML tags: does nothing but it's in documentation YAML header "tags:" does nothing but it's in documentation Jul 18, 2018
@jgm
Copy link
Owner

jgm commented Jul 19, 2018

The purpose of that part of the documentation is to show how a YAML block can be used to set fields in the document's metadata. And, the tags list is being added to the document's metadata. (To see this, do pandoc -t native -s.) You can use any field names you like; tags was just an example here.

It's just that the writer and template you're using don't do anything with the tags field in the metadata, so you see nothing in the epub file produced.

Perhaps we should replace this with keywords in the example, since keywords is actually used in some of the writers. Not in EPUB though. Is there a standard way to encode keywords in a content.opf?

@jgm jgm added the docs label Jul 19, 2018
@jgm jgm closed this as completed in eef8ada Jul 19, 2018
@jgm
Copy link
Owner

jgm commented Jul 19, 2018

Closing this with the docs change. Feel free to open a new issue requesting that keywords in metadata do something to the content.opf in an EPUB. (Give details about what it should do.)

@vv01f
Copy link

vv01f commented Jul 24, 2024

@jgm in case you're still up to add that … keywords go each separate into dc:subject nodes in the file content.opf, calibre shows those comma-separated as "tags" in metadata dialogue.

@jgm
Copy link
Owner

jgm commented Jul 28, 2024

@vv01f please open a new issue describing what should be done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants