【发布时间】:2018-10-10 21:52:29
【问题描述】:
在我的项目中,我有一个小脚本,它运行一些构建脚本来准备我的开发。但是,我当前的配置导致错误。它在错误的位置寻找主题目录。
我的构建脚本位于根目录中。我的 hugo 应用程序位于 frontend/。我想从路由调用构建脚本并让它构建hugo。
/my-project
/frontend
/custom-theme
build-script.sh
我的frontend/config.toml:
baseURL = "https://site.local"
title = "Site Title"
themesDir = "themes"
theme = "custom-theme"
disableKinds = [ "taxonomyTerm", "taxonomy", "robotsTXT" ]
当我使用以下命令从构建目录运行构建脚本时,出现错误:
# Build HTML and CSS
npm run build:dev --prefix $PWD/frontend/themes/custom-theme
# Hugo frontend
hugo --config $PWD/frontend/config.dev.toml
# Build PHP dependencies
composer install -d $PWD/api/
错误:
Error: Unable to find theme Directory: C:\Users\James\Projects\my-project\themes\custom-theme
它缺少路径的\frontend 部分。应该是:
C:\Users\James\Projects\my-project\frontend\themes\custom-theme
是否可以告诉hugo在哪里寻找主题?
【问题讨论】:
标签: hugo