diff --git a/docs/CMakeLists.txt b/docs/CMakeLists.txt index 7db7d921e..4daf79b6c 100644 --- a/docs/CMakeLists.txt +++ b/docs/CMakeLists.txt @@ -46,16 +46,22 @@ if(NOT DOXYBOOK2) endif() add_custom_command( - OUTPUT markdown - COMMAND ${DOXYBOOK2} --input ${CMAKE_CURRENT_BINARY_DIR}/doxyxml --output ${CMAKE_CURRENT_BINARY_DIR}/markdown --config config.json + OUTPUT gen + COMMAND ${DOXYBOOK2} --input ${CMAKE_CURRENT_BINARY_DIR}/doxyxml --output ${CMAKE_CURRENT_BINARY_DIR}/gen --config config.json DEPENDS ${doxybook_localbin} - ${CMAKE_CURRENT_BINARY_DIR}/markdown/index.md + ${CMAKE_CURRENT_BINARY_DIR}/gen/index.md ${CMAKE_CURRENT_BINARY_DIR}/config.json ${CMAKE_CURRENT_BINARY_DIR}/doxyxml/index.xml) add_custom_target(clean_html COMMAND ${CMAKE_COMMAND} -E rm -rf html) +add_custom_command( + OUTPUT markdown + COMMAND find ${CMAKE_CURRENT_BINARY_DIR}/gen/ -type f -name '*.md' -exec ${CMAKE_CURRENT_SOURCE_DIR}/fix-markdown.sh {} "\;" && ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_BINARY_DIR}/gen ${CMAKE_CURRENT_BINARY_DIR}/markdown + DEPENDS gen +) + add_custom_command( OUTPUT html COMMAND ${MKDOCS} build @@ -63,7 +69,7 @@ add_custom_command( clean_html ${CMAKE_CURRENT_BINARY_DIR}/markdown) -add_custom_target(doc DEPENDS html) +add_custom_target(doc DEPENDS markdown) configure_file(Doxyfile.in Doxyfile @ONLY) configure_file(index.md.in index.md @ONLY) @@ -73,6 +79,6 @@ configure_file(mkdocs.yml mkdocs.yml COPYONLY) # we seperate this step out so we force clean_markdown to run before markdown target add_custom_command( - OUTPUT markdown/index.md - COMMAND ${CMAKE_COMMAND} -E copy index.md markdown/index.md + OUTPUT gen/index.md + COMMAND ${CMAKE_COMMAND} -E copy index.md gen/index.md DEPENDS clean_markdown) diff --git a/docs/config.json b/docs/config.json index 7123a48c6..a160cbfba 100644 --- a/docs/config.json +++ b/docs/config.json @@ -1,9 +1,9 @@ { "baseUrl": "", "indexInFolders": false, - "linkSuffix": "/", + "linkSuffix": ".md", "mainPageInRoot": false, "mainPageName": "index", - "linkLowercase": true, + "linkLowercase": false, "foldersToGenerate": ["files", "classes", "namespaces"] } diff --git a/docs/fix-markdown.sh b/docs/fix-markdown.sh new file mode 100644 index 000000000..23f35a31d --- /dev/null +++ b/docs/fix-markdown.sh @@ -0,0 +1,6 @@ +#!/bin/bash +# apply markdown file content quarks + + +# rewrite br tags +sed -i 's|
|
|g' $@