Problems with CITATION.cff file

I have been trying over and over to get my CITATION.cff file on this branch to work with the “Cite this repository” button on GitHub.

I have checked the CITATION.cff file against the CFF file schema successfully, but there’s no option to get an APA or BibteX cite, and when I click on “View Citation File” nothing happens.

I’m at my wits end. Any suggestions?

Many thanks!

You got me curious, since I didn’t know about this format.

Your file is indeed valid YAML, but it doesn’t contain a cff-version: 1.0.3 specification, could it be that?

The spec indicates it as a primary key:

I’ve seen that you can use an official online tool to generate a CITATION.cff file:

maybe you should try that.

I actually do have a cff-version: tag in my CITATION.cff file:

cff-version: "1.2.0"

I don’t know if there are certain versions that are or are not compatible with GitHub.

There is an online tool (cffinit), and I tried to use it, but it really does not help, because it does not walk the user through different reference formats. You can’t, for example, choose to add a conference-paper reference and get prompted to fill out a form with all the right fields. Or if there is a way to do that, it was not apparent to me.

If you know the schema, then you can use the tool; otherwise it is not sufficiently helpful. I began authoring my file with cffinit, but then gave up, saved the file, and finished it in a text editor.

I validated my CITATION.cff file against the schema here and the jsonschema program indicated that my file was correct.

So I am still at a loss even to know what has gone wrong, much less fix it. Does anyone have an example of a working CITATION.cff file with paper in it?

This repository has one, and the GitHub cite button works:

I think you should remove the YAML header and the --- and ... delimiters, none of the CITATION.cff files I’ve seen have them.

I tried removing those lines, and it made no difference: if you look at GitHub - shop-planner/shop3 at add-citation there are still no APA or Bibtex citation options and the “View Citation File” button does nothing.

I wonder if the references attribute simply does not work? I looked at the directory you pointed me at and it’s simpler than mine: instead of having an article to cite, it simply gives instructions for citing the software repository itself.

So we don’t have an example page that actually works, except for the simplest case, leaving me uncertain if citation processing works as advertised. I asked for " a working CITATION.cff file with paper in it" but the ruby-cff repo has a working CITATION.cff file without a paper in it.

A working system, even if it couldn’t provide a citation, should have a “View citation file” button that works. I’m starting to suspect that

  1. The parser is more brittle than it should be so that having a citation file that satisfies the schema is insufficient for processing to complete
  2. The overall processing is more brittle than it should be, so that a parsing failure can break the “View citation file” button.

If I were you, I’d drop this question on pandoc’s mailing list, for the pandoc community is very well informed when it comes to documentation standards an bibliographical data, so I’m sure you’ll find people there who know this format inside out (I mean, they only do docs as a community, using tons of tools, formats, languages, hacks, etc.).