Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to build individual sections with refs, appendices #2

Open
joncamfield opened this issue Jul 1, 2015 · 0 comments
Open

Ability to build individual sections with refs, appendices #2

joncamfield opened this issue Jul 1, 2015 · 0 comments

Comments

@joncamfield
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant