Conversation
|
Docs preview: https://juliapomdp.github.io/POMDPs.jl/previews/PR566 |
zsunberg
left a comment
There was a problem hiding this comment.
Writing to a file like this seems a bit complex and hard to maintain. What if we just do something like this:
julia> page_order = ["A" => ["a1.md", "a2.md"],
"B" => ["b1.md"]]
2-element Vector{Pair{String, Vector{String}}}:
"A" => ["a1.md", "a2.md"]
"B" => ["b1.md"]
julia> contents_pages = reduce(vcat, map(last, page_order))
3-element Vector{String}:
"a1.md"
"a2.md"
"b1.md"
Then we can use Pages = contents_pages in the index.md file I think.
|
Yeah, that would work, we would just lose the grouping of pages. If we are ok with changing the layout, then we could do it this way. Writing the file was the only way I could think of doing it while maintaining the current layout. |
|
True. I think the number one goal is to keep it easy to maintain. Let's either (1) keep the outline without the headers or (2) get rid of the outline I lean slightly towards (1), but am totally good with (2) if you prefer |
|
I decided to go with option 1. The preview of the docs is updated. |
|
@zsunberg Are we good to merge? |
|
Awesome! Thank you! |
zsunberg
left a comment
There was a problem hiding this comment.
Looks good - I am a bit surprised taht you can execute that complex julia code in the @contents block - it might have been better to put it in make.jl, but it seems to work. Hopefully it will keep working.

This addresses #565.
This maintains the structure as before where we have subsections for each part of then the outline. The current way
@contentsis structured, it only accepts a list (link to documentation) for thePagesvariable. If you pass the same structure we generate formakedocsyou get:This version appends the outline to the bottom of
index.md, generates the docs, and then restores the originalindex.mdfile.With that being said...we don't have to maintain the layout as we currently have it.