-
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.js
to see your site update in real-time! -
Learn more
- Create an application in Algolia;
- Create a new index called
Support
in the freshly created application; - Click on "Add record(s)" and choose to do it manually;
- Go to the
/help-search
page on production environment and look foralgolia
in the "Network" panel of your devtools. Find thequeries
request response and preview it. Copy the array inresults[0].hits
and 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
attributesForFaceting
in "Facets":languages
region_lt
region_ru
region_uk
tags_lt
tags_ru
tags_uk
- Add API keys in the
.env
file (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
.env
keys- You can get the
CONTENTFUL_SPACE_ID
by going to Contentful -> Settings -> General settings - You can get the
CONTENTFUL_ACCESS_TOKEN
by going to Contentful -> Settings -> API Keys -> Content management tokens -> Generate personal token - Set the
CONTENTFUL_ENV
to the desired environment- You can also specify the
CONTENTFUL_ENV
when 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