Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resource-website-path #361

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmd/app/exec.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func exec(ctx context.Context) error {
if err != nil {
return err
}
docProcessor, docTasks, err := document.New(config.DocumentWorkersCount, config.FailFast, reactorWG, documentNodes, config.ResourcesPath, dScheduler, v, rhRegistry, config.Hugo, config.Writer, config.SkipLinkValidation)
docProcessor, docTasks, err := document.New(config.DocumentWorkersCount, config.FailFast, reactorWG, documentNodes, config.ResourcesWebsitePath, dScheduler, v, rhRegistry, config.Hugo, config.Writer, config.SkipLinkValidation)
if err != nil {
return err
}
Expand Down
4 changes: 4 additions & 0 deletions cmd/app/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@ func configureFlags(command *cobra.Command) {
"Resources download path.")
_ = vip.BindPFlag("resources-download-path", command.Flags().Lookup("resources-download-path"))

command.Flags().String("resources-website-path", "__resources",
"The path in the website where resources will be accessed through.")
_ = vip.BindPFlag("resources-website-path", command.Flags().Lookup("resources-website-path"))

command.Flags().StringToString("github-oauth-token-map", map[string]string{},
"GitHub personal tokens authorizing read access from repositories per GitHub instance. Note that if the GitHub token is already provided by `github-oauth-token` it will be overridden by it.")
_ = vip.BindPFlag("github-oauth-token-map", command.Flags().Lookup("github-oauth-token-map"))
Expand Down
2 changes: 1 addition & 1 deletion cmd/app/initilization.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func getReactorConfig(options Options, hugo hugo.Hugo, rhs []repositoryhost.Inte
Hugo: config.Hugo.Enabled,
}
config.ResourceDownloadWriter = &writers.FSWriter{
Root: filepath.Join(config.DestinationPath, config.ResourcesPath),
Root: filepath.Join(config.DestinationPath, config.ResourcesDownloadPath),
}

if len(config.GhInfoDestination) > 0 {
Expand Down
3 changes: 2 additions & 1 deletion cmd/app/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ type Options struct {
ValidationWorkersCount int `mapstructure:"validation-workers"`
FailFast bool `mapstructure:"fail-fast"`
DestinationPath string `mapstructure:"destination"`
ResourcesPath string `mapstructure:"resources-download-path"`
ResourcesDownloadPath string `mapstructure:"resources-download-path"`
ResourcesWebsitePath string `mapstructure:"resources-website-path"`
ManifestPath string `mapstructure:"manifest"`
ResourceDownloadWorkersCount int `mapstructure:"download-workers"`
GhInfoDestination string `mapstructure:"github-info-destination"`
Expand Down