Skip to content

Commit 055f418

Browse files
committed
(WIP) Refine the arch
1 parent 81ea305 commit 055f418

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+2295
-29
lines changed

guide/book.toml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
[book]
2+
authors = ["Karn Kaul"]
3+
language = "en"
4+
src = "src"
5+
title = "Learn Vulkan"
6+
7+
[output.html]
8+
theme = "theme"
9+
additional-js = ["theme/lang-toggle.js"]
10+
additional-css = ["theme/lang-toggle.css"]

guide/build-books.cmake

Lines changed: 0 additions & 25 deletions
This file was deleted.

guide/build.cmake

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
function(BuildBook LANGUAGE SOURCE_DIR TARGET_DIR)
2+
set(LANGUAGE "${LANGUAGE}")
3+
4+
if(NOT EXISTS "${SOURCE_DIR}/src/SUMMARY.md")
5+
message(WARNING "Skipping '${LANGUAGE}' – SUMMARY.md not found at ${SOURCE_DIR}")
6+
return()
7+
endif()
8+
9+
if(NOT EXISTS "${SOURCE_DIR}/book.toml")
10+
message(WARNING "Skipping '${LANGUAGE}' – book.toml not found at ${SOURCE_DIR}")
11+
return()
12+
endif()
13+
14+
message(STATUS "Building book for language: ${LANGUAGE}")
15+
execute_process(
16+
COMMAND mdbook build -d ${TARGET_DIR}
17+
WORKING_DIRECTORY ${SOURCE_DIR}
18+
)
19+
endfunction()
20+
21+
# Create configurations for both languages.
22+
BuildBook("en" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/book")
23+
BuildBook("zh-TW" "${CMAKE_CURRENT_SOURCE_DIR}/translations/zh-TW" "${CMAKE_CURRENT_SOURCE_DIR}/book/zh-TW")

0 commit comments

Comments
 (0)