Skip to content

Ability to build individual sections with refs, appendices #2

@joncamfield

Description

@joncamfield

Moved in from SAFETAG/SAFETAG#82

It should be possible to build a specific SAFETAG guide section that pulls in the relevant endnotes and appendices (e.g. example/ content) for that section.


This is very possible. Currently the makefile just targets the main index's. We would want to actually script up the current builder to be more than a makefile. Once we do this it could do much much more. Here is what it would look like in make speak, but we would want to actually transition it into a language that is robust.

INDEX=path/to/index/file.md
INDEX_NAME=file_name
create_your_own: | $(SRC_DIR) $(DOC_DIR)
    modules/markdown-pp/markdown-pp.py $(INDEX) $(SRC_DIR)/$(INDEX_NAME).md
    pandoc -s --variable=title:"$(INDEX_NAME)" \
        --template=theme/html5.template \
        --to=html5 $(SRC_DIR)/$(INDEX_NAME).md \
        --output=$(SRC_DIR)/$(INDEX_NAME).html 
    wkhtmltopdf --user-style-sheet theme/core.css \
        --title "$(INDEX_NAME)" \
        --disable-smart-shrinking  \
        --load-error-handling skip \
        --load-media-error-handling skip \
        --footer-center "Page [page] of [toPage]" \
        --header-left [doctitle] \
        --outline \
        --outline-depth 2 \
        $(SRC_DIR)/$(INDEX_NAME).html $(DOC_DIR)/$(INDEX_NAME).pdf || true


Note that this is very close, but due to the SAFETAG per-chapter indices being at a different directory level than the master indices, the copy to tmp/.../target must stay at the root of the content, but the ../ structure in the index/ files can't correctly reference out.

This might end up being a SAFETAG issue again, or an extra doc builder option for the "working" directory?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions