// Copyright 2026 The Hugo Authors. All rights reserved. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. package pandoc_test import ( "testing" "github.com/gohugoio/hugo/hugolib" "github.com/gohugoio/hugo/markup/pandoc" ) // See issue 15062. func TestBibliographySupport(t *testing.T) { if !pandoc.Supports() { t.Skip("pandoc not installed") } t.Parallel() files := ` -- hugo.toml -- disableKinds = ['home','rss','section','sitemap','taxonomy','term'] [security.exec] allow = ['pandoc'] -- layouts/page.html -- {{ .Content }} -- content/p1.pdc -- --- title: home --- --- bibliography: testdata/foo.bib citation-style: testdata/ieee.csl link-citations: true references: - type: article-journal id: WatsonCrick1953 author: - family: Watson given: J. D. - family: Crick given: F. H. C. issued: date-parts: - - 1953 - 4 - 25 title: 'Molecular structure of nucleic acids: a structure for deoxyribose nucleic acid' title-short: Molecular structure of nucleic acids container-title: Nature volume: 171 issue: 4356 page: 737-738 DOI: 10.1038/171737a0 --- This is a citation: @einstein1905physics This is another citation: [@WatsonCrick1953, p. 33] ` b := hugolib.Test(t, files) b.AssertFileContent("public/p1/index.html", `
This is a citation: [1]
This is another citation: [2, p. 33]