Stream: shorthand
Topic: pages
Saul Kravitz (Dec 15 2020 at 20:28):
How can I control the section numbering of the artifacts.html page that is generated by the IG Publisher?
When I do this:
pages:
index.md:
title: Home
downloads.md:
title: Downloads
index.md is section 1
downloads is section 2
and the automatically generated content on artifacts.html is section 3.
I want artifacts to be section 2 and downloads to be section 3.
Jean Duteau (Dec 15 2020 at 20:30):
i'm pretty sure that if you list artifacts directly, you can control where it appears and thus what section it will be.
Saul Kravitz (Dec 15 2020 at 20:32):
This results in a sushi error:
error File for configured page artifacts.html not found.
Jean Duteau (Dec 15 2020 at 20:39):
ah, i didn't list it in pages, but in the menu. just testing if I can change the section numbers that way...
Jean Duteau (Dec 15 2020 at 20:40):
nope. it's how it is listed in the pages section and not the menu. now I'm interested in the right answer
Jean Duteau (Dec 15 2020 at 20:43):
i looked at the IG resource that is produced and artifacts isn't listed there, so I suspect that it always gets the last number since it is a generated page.
Lloyd McKenzie (Dec 15 2020 at 21:22):
If you list artifacts in the IG, it should find it and not add it at the end
Chris Moesel (Dec 15 2020 at 21:24):
@Saul Kravitz -- this may be a current limitation in SUSHI. It does some error checking to ensure that the pages you reference in pages
actually exist -- but in the case of artifacts.html
, it obviously does not exist at the time that SUSHI runs. We may need to update SUSHI's configuration processor to allow references to pages that don't exist yet (or to specifically allow certain known generated pages).
Jose Costa Teixeira (Dec 15 2020 at 21:36):
That list of pages that are generated may evolve (or depend on the template you're using) - perhaps good to accommodate for some flexibility?
Saul Kravitz (Dec 15 2020 at 22:10):
@Chris Moesel I think it is common (I know an idiot who did this in 3 IGs) to refer to sections in the artifacts.html file from the menus. So, I think this use case should be accommodated.
Chris Moesel (Dec 15 2020 at 22:42):
Yep. I've already logged an issue against SUSHI for it. We should have anticipated this. I apologize!
Saul Kravitz (Dec 15 2020 at 22:54):
Glad you continue to watch out for the idiots.
I converted my 2nd IG to 1.0.0. Made fewer mistakes, and the ones I did make were flagged by excellent error messages/suggestions. No apologies necessary!
Chris Moesel (Dec 16 2020 at 12:51):
I don't think there's anything idiotic about wanting to define page order including generated pages!
Eric Haas (Dec 17 2020 at 16:42):
Sadly can't do it with natural file order since afiak Github sort files alphabetically. but could consider define page order using YAML front matter so this metadata stays with the pages.
Jose Costa Teixeira (Dec 17 2020 at 18:09):
I'm putting this in my bucked "to investigate whether a Composition resource can help set the IG content"
Last updated: Apr 12 2022 at 19:14 UTC