I have an index.json file that is used by the main site search. I am trying to create a secondary one for another search using output formats, but the JSON file defaults to the content in the index.json. I have copied the steps in the repo below to create the output format in my own theme.
Or what is the recommended way to create a secondary JSON index besides
We’re going to generate two json files in the root of the public directory. One will be named index.json, the other will be named index_2.json.
[outputs] home = ['HTML', 'JSON', 'JSON_2'] # We don't need to define the JSON output format. It's baked in. [outputFormats.JSON_2] baseName = 'index_2' isPlainText = true mediaType = 'application/json'
layouts/ └── _default/ ├── baseof.html ├── home.html ├── home.json_2.json <-- generates public/index_2.json ├── home.json.json <-- generates public/index.json ├── list.html └── single.html
git clone --single-branch -b hugo-forum-topic-41808 https://github.com/jmooring/hugo-testing hugo-forum-topic-41808 cd hugo-forum-topic-41808 hugo server
This might have been the issue.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.