Publicationlist

Hello,

I’m new with Hugo, but I have created my first site, generation works well. I would like to add a publication list based on Bibtex, so I have found this article. I create a YAML file with my references but I don’t understand how can I use the data file with this description.

I would like to add a page with all publications (e.g. year ordered), so how can I build “the static list”? I know I can create a template file, but I create also a Markdown file, didn’t I which shows the list? How can I do this?

I would like to reference all publication from all pages of my content directory, how can I set in the Markdown content a reference of my publication and generate a link to my publication page with an anchor (like the normal Bibtex behaviour in a PDF file)?

Which Markdown syntax must I use to create a citation reference?

Thanks for help

Phil

You have lots of question, and there is no easy way to explain it all without showing. It would maybe be smart if you could put your site (or whatever you have) out on GitHub so people can help from there.

But in general:

Hugo may lack some support for creating content from data files, but here is how I would approach your challenge:

  1. Create a top level directory below /content, aka. section, per static list
  2. Put one md-file in it. It can contain only empty front matter, but you need one file even if you don’t use it.
  3. For every section, create a template that iterates the publications etc. in /data

There are lots of details in the above, but there is no easy way to explain it without rewriting the entire documentation site here.

So therefore my suggestion in the intro.

Thanks a lot for your answer. I have the files on GitHub, you can finde the data on https://github.com/LightJason/lightjason.github.io

Okay, so if I understand it correctly: I create that “publicationlist by a section”, which is specificate by a template structure. The MD file calls this section so I will see the full list. But can I parameterize the section, so I will get only for example the items 1,4,5 from my data file?

Phil

I would recommend you just ignore the md-file and create one layout template per list. In that template you are free to select whatever data to display (item 1,4 … but I would suggest a better structure).

Yes, but in my MD files will write something like

here is a nice text and I will put a citation[citationid]

and than I will get a link to my publication page with a correct anchor. So I need to create a shortcut (is this the correct way?) for my citation and replace the citation with a permalink with anchor? On the publication page I create a list with all information, which is read from the data file and create the anchors.

Did you think this a good way, so my first step would be the publication page with anchors?

Thanks

Phil

I don’t understand what you want. Maybe others will.

Thanks for helping with the nice tips, I can build a full working solution. In short my steps:

  • I create from my Bibtex file a JSON file with some additional items and store it as a data file in the data directory
  • I build a partial structur to grep all the content from the JSON file and build a list
  • Each list item gets the Bibtex ID as an anchor name <a name="bibtexid"></a>
  • At least I create a shortcut pubref which points to the publication site with the correct anchor e.g {{< pubref bibtexid >}}

With this I get a list of all publications and can reference the items by the Bibtex ID from a other pages.

1 Like