-
Start developing.
Navigate into your new site’s directory and start it up.
cd su-ukraina/ npm run develop -
Open the code and start customizing!
Your site is now running at http://localhost:8000!
Edit
src/pages/index.jsto see your site update in real-time! -
Learn more
- Create an application in Algolia;
- Create a new index called
Supportin the freshly created application; - Click on "Add record(s)" and choose to do it manually;
- Go to the
/help-searchpage on production environment and look foralgoliain the "Network" panel of your devtools. Find thequeriesrequest response and preview it. Copy the array inresults[0].hitsand paste it in the Algolia GUI's textarea for new records and click "Save". - Go to the "Configuration" panel for the "Support" index in Algolia;
- Add
searchableAttributes"Searchable attributes":title_lt,title_ru,title_uk;tags_lt,tags_ru,tags_uk;purpose_lt,purpose_ru,purpose_uk;
- Add
attributesForFacetingin "Facets":languagesregion_ltregion_ruregion_uktags_lttags_rutags_uk
- Add API keys in the
.envfile (from the "API Keys" section in the Algolia application).
This project's Contentful space is using three different locales. Because of the way Contentful is, when uploading an asset you have to upload it to each locale. That may be troublesome, therefore we have an automated way of doing that.
It is highly advised to first make a backup of your space. Read up more in the official Contentful CLI documentation
- Set up your
.envkeys- You can get the
CONTENTFUL_SPACE_IDby going to Contentful -> Settings -> General settings - You can get the
CONTENTFUL_ACCESS_TOKENby going to Contentful -> Settings -> API Keys -> Content management tokens -> Generate personal token - Set the
CONTENTFUL_ENVto the desired environment- You can also specify the
CONTENTFUL_ENVwhen running the script. See example below.
- You can also specify the
- You can get the
- Run the migration script
- You should see in your terminal log that the migration was successful. Now you can go to the Contentful web app and review/publish your assets.
node scripts/migrate-localised-assets.js
CONTENTFUL_ENV=master node scripts/migrate-localised-assets.js
node scripts/migrate-localised-assets.js --verbose