mirror of
https://github.com/HandBrake/HandBrake-docs.git
synced 2025-12-11 04:35:53 -06:00
build: Update to support renamed template partials.
This commit is contained in:
parent
b683a9dc6a
commit
d5bf36f7f9
14
build-docs
14
build-docs
@ -171,19 +171,19 @@ function build_source {
|
||||
fi
|
||||
else
|
||||
# partial html
|
||||
cp "${TEMPLATE_Document}" "${DEST}.html"
|
||||
cp "${TEMPLATE_Body}" "${DEST}.html"
|
||||
fi
|
||||
# inject document template
|
||||
# inject body template
|
||||
sed -E \
|
||||
-e '/\{\{[ ]*template\.document[ ]*\}\}/{r '"${TEMPLATE_Document:-}" -e 'd;}' \
|
||||
-e '/\{\{[ ]*template\.body[ ]*\}\}/{r '"${TEMPLATE_Body:-}" -e 'd;}' \
|
||||
-i.sedbak "${DEST}.html"
|
||||
# inject header, content, footer templates
|
||||
# inject header, document, footer templates
|
||||
sed -E \
|
||||
-e '/\{\{[ ]*template\.header[ ]*\}\}/{r '"${TEMPLATE_Header:-}" -e 'd;}' \
|
||||
-e '/\{\{[ ]*template\.content[ ]*\}\}/{r '"${TEMPLATE_Content:-}" -e 'd;}' \
|
||||
-e '/\{\{[ ]*template\.document[ ]*\}\}/{r '"${TEMPLATE_Document:-}" -e 'd;}' \
|
||||
-e '/\{\{[ ]*template\.footer[ ]*\}\}/{r '"${TEMPLATE_Footer:-}" -e 'd;}' \
|
||||
-i.sedbak "${DEST}.html"
|
||||
# inject content
|
||||
# inject document content
|
||||
sed -E \
|
||||
-e '/\{\{[ ]*document\.content[ ]*\}\}/{r '"${DOCUMENT_Content:-}" -e 'd;}' \
|
||||
-i.sedbak "${DEST}.html"
|
||||
@ -303,8 +303,8 @@ if [[ -e "${TEMPLATE_CONFIG}" ]]; then
|
||||
TEMPLATE_Base="${TEMPLATE_DIR}/${TEMPLATE_Base}"
|
||||
TEMPLATE_Header="${TEMPLATE_DIR}/${TEMPLATE_Header}"
|
||||
TEMPLATE_Nav="${TEMPLATE_DIR}/${TEMPLATE_Nav}"
|
||||
TEMPLATE_Body="${TEMPLATE_DIR}/${TEMPLATE_Body}"
|
||||
TEMPLATE_Document="${TEMPLATE_DIR}/${TEMPLATE_Document}"
|
||||
TEMPLATE_Content="${TEMPLATE_DIR}/${TEMPLATE_Content}"
|
||||
TEMPLATE_Footer="${TEMPLATE_DIR}/${TEMPLATE_Footer}"
|
||||
TEMPLATE_Redirect="${TEMPLATE_DIR}/${TEMPLATE_Redirect}"
|
||||
TEMPLATE_Assets_Fonts=()
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user