[
https://issues.apache.org/jira/browse/CAMEL-14709?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17058802#comment-17058802
]
Aemie commented on CAMEL-14709:
-------------------------------
I had a query. When I run `yarn build` in the project directory, the beginning
step includes building antora, however, I receive the error which says
*docs/user-manual* doesn't exist in *https://github.com/apache/camel.git [ref:
remotes/origin/master]*.
> Make sure that the website can be built in Windows
> --------------------------------------------------
>
> Key: CAMEL-14709
> URL: https://issues.apache.org/jira/browse/CAMEL-14709
> Project: Camel
> Issue Type: Task
> Components: website
> Reporter: Zoran Regvart
> Priority: Major
> Labels: help-wanted
>
> Right now we [run the hugo
> build|https://github.com/apache/camel-website/blob/21dbd4d74b5f0270a697e8de300eeff30dca14dd/package.json#L6]
> from a npm/yarn script.
> This includes the {{--cacheDir}} parameter which specifies where Hugo puts
> cached data, e.g. data fetched via {{getJSON}}.
> When we build the website on the build server we wish to take advantage of
> previously cached data, and to do that we [set the {{HUGO_CACHE_DIR}}
> environment
> variable|https://github.com/apache/camel-website/blob/21dbd4d74b5f0270a697e8de300eeff30dca14dd/Jenkinsfile#L41].
> The shell interpolation used: {{${HUGO_CACHE_DIR:-$(pwd)/.hugo_data}}} makes
> sure that if {{HUGO_CACHE_DIR}} is not defined {{.hugo_data}} in current
> directory is used instead.
> This doesn't work on Windows as it relies on Unix shell variable
> interpolation.
> We need a solution that has the same functionality, i.e. we can specify the
> cache directory via {{HUGO_CACHE_DIR}} environment variable and if the
> {{HUGO_CACHE_DIR}} variable is not set use {{.hugo_data}} in current
> directory, but works on both Unix and Windows systems.
> I think there could be a way to use some cross platform npm packages to do
> this intended to be used in scripts; or we could create a helper JavaScript
> file for this and invoke hugo binary from it.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)