You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2022/09/02 14:53:00 UTC

[jira] [Resolved] (CAMEL-14709) Make sure that the website can be built in Windows

     [ https://issues.apache.org/jira/browse/CAMEL-14709?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-14709.
---------------------------------
    Resolution: Abandoned

> 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.20.10#820010)