Access auto-generated navigation category as document metadata? #5181
Replies: 4 comments 1 reply
-
I have to say I have difficulties to fully understand what you want. Maybe, for you it's a matter of generated yaml file for use in listing and using https://quarto.org/docs/websites/website-listings.html#including-or-excluding-items feature. |
Beta Was this translation helpful? Give feedback.
-
Well, let me give a concrete example. I'm collecting datasets for classroom use. Each has a Qmd describing it, and there's a listing page showing them all: https://cmustatistics.github.io/data-repository/by-method.html You can see on the left that the datasets are organized into groups by subject area. That's done by putting them in directories like I'd like to add that subject area to the listing table, so e.g. the first row for AnAge says it's in Biology. But it's not part of the article metadata -- it's just which directory each file is in -- so I can't add it by configuring the listing fields. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
Yes, I'm sure I could add a field for it. It just seems redundant for the domain to be automatically inferred by Quarto (for the left navigation), but the inferred domain isn't available anywhere, so it also has to be manually specified. It'd be nice for that automatically inferred domain to be available somewhere. (I might also like to put it in the article template, so each article is marked with which domain it's in.) Another option would be for the automatic navigation feature to support using a metadata field in each document instead of inferring from directories -- then I can specify the field and use it in listings or anywhere else I want. |
Beta Was this translation helpful? Give feedback.
-
I'm organizing a site using the auto-generated sidebar feature, so for instance I might have several files in directories like this:
In my
_quarto.yml
, I haveSo I get headings for Biology and Money and so on. I use this as sort of a category system. (Yes, I know Quarto also has categories, but I need two parallel category systems; I use the directories for the subject area of each page, and I use the
categories
field for the statistical methods involved in each page.)I also have a listing page listing all the documents in the website, so they can be sorted by various attributes. One can choose listing fields to display; so, for instance, if the document metadata has a
foo
attribute, I can have the listing table show a column forfoo
.I'd like a column for the navigation category each document is in. That is, the row for
anage.qmd
should say it is in Biology, whileames-housing.qmd
should say it is in Money.Is it possible to get this information as automatically produced document metadata? Various listing fields are already automatically populated by Quarto, so it'd be nice to be able to get this one.
Beta Was this translation helpful? Give feedback.
All reactions