Skip to content

Commit

Permalink
Configure the search bar (#197)
Browse files Browse the repository at this point in the history
* allow search index upload with algolia with ember deploy production

* uncomment the config lines that had been commented during the set up

* add the algolia environment config for search-only api

* modify the pathPattern so algolia generate the correct path attribute

* update the package-lock to get last version of guidemaker-ember-locale-template
  • Loading branch information
BlueCutOfficial authored Oct 13, 2023
1 parent c21064d commit a1d43d0
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 90 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
/node_modules/

# misc
/config/credentials.json
/.env*
/.pnp*
/.sass-cache
Expand Down
5 changes: 2 additions & 3 deletions config/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@ module.exports = function(deployTarget) {
indexName: credentials.algoliaIndex || process.env.ALGOLIA_INDEX,
applicationId: credentials.algoliaApplication || process.env.ALGOLIA_APPLICATION,
apiKey: credentials.algoliaKey || process.env.ALGOLIA_KEY,
tagsToExclude: '.old-version-warning,.edit-page,code,pre',
tagsToExclude: '.edit-page,code,pre,img,div.cta,div.filename',
cssSelector: 'section',
versionsToIgnore: ['1.x', '2.x'],
versionPattern: /^(v\d+\.\d+\.\d+)\//,
pathPattern: /^v\d+\.\d+\.\d+\/(.*)\/index.html$/,
pathPattern: /^release\/(.*)\/index.html$/,
}
};

Expand Down
6 changes: 6 additions & 0 deletions config/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@ module.exports = function (environment) {
sourceRepo: 'https://github.com/DazzlingFugu/ember-fr-guides-source',
},

algolia: {
algoliaId: 'E44SKR9ZB0',
algoliaKey: '74120f5066e6f82be903407a9883b44e',
indexName: 'ember_french_guides'
},

showdown: {
ghCompatibleHeaderId: true,
prefixHeaderId: 'toc_'
Expand Down
Loading

0 comments on commit a1d43d0

Please sign in to comment.