From 2dd29a8f686c0249fde7880255628052a4ae3a02 Mon Sep 17 00:00:00 2001 From: Ahmad Abdolsaheb Date: Tue, 2 Nov 2021 13:27:06 +0300 Subject: [PATCH] docs: add news theme docs (#44092) --- docs/devops.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/devops.md b/docs/devops.md index 202ea04fd3..aebe2e79a4 100644 --- a/docs/devops.md +++ b/docs/devops.md @@ -956,3 +956,20 @@ We use [a CLI tool](https://github.com/freecodecamp/sendgrid-email-blast) to sen 6. Run the tool to send the emails, following the [usage documentation](https://github.com/freeCodeCamp/sendgrid-email-blast/blob/main/docs/cli-steps.md). 7. When the email blast is complete, verify that no emails have failed before destroying the droplets. + +# Flight Manual - Adding news instances for new languges + +### Theme Changes + +We use a custom [theme](https://github.com/freeCodeCamp/news-theme) for our news publication. Adding the following changes to the theme enables the addition of new languages. + +1. Include the an else if statment for the new [ISO language code](https://www.loc.gov/standards/iso639-2/php/code_list.php) in [setup-local.js](https://github.com/freeCodeCamp/news-theme/blob/main/assets/config/setup-locale.js) +2. Create an initial config folder by duplicating the [assets/config/en](https://github.com/freeCodeCamp/news-theme/tree/main/assets/config/en) folder and changing its name to the new language code. (en—> es for Spanish) +3. Inside the new language folder, change the variable names in main.js and footer.js to the relevant language short code (enMain —> esMain for Spanish) +4. Duplicate the [locals/en.json](https://github.com/freeCodeCamp/news-theme/blob/main/locales/en.json) and rename it to the new language code. +5. In [partials/i18n.hbs](https://github.com/freeCodeCamp/news-theme/blob/main/partials/i18n.hbs), add scripts for newly created config files. +6. Add the related language day.js script from [cdnjs](https://cdnjs.com/libraries/dayjs/1.10.4) to [freecodecamp cdn](https://github.com/freeCodeCamp/cdn/tree/main/build/news-assets/dayjs/1.10.4/locale) + +### Ghost Dashboard Changes + +Update the Publication assets by going to the ghost's dashboard > settings > general and uploading the publications's [icon](https://github.com/freeCodeCamp/design-style-guide/blob/master/assets/fcc-puck-500-favicon.png), [logo](https://github.com/freeCodeCamp/design-style-guide/blob/master/downloads/fcc_primary_large.png), and [cover](https://github.com/freeCodeCamp/design-style-guide/blob/master/assets/fcc_ghost_publication_cover.png).