All of these scripts require you to have Node available in your environment. Get it from NodeJS.org.
A node script to replace all Learning Path article links with urls for a particular platform, using urls.yaml.
npm ci
node substitute_article_urls.js $TARGET
For example, to point all links to innersourcecommons.org:
node substitute_article_urls.js isc
A node script to ensure article links point at the relevant translation if it exists, or default (English) if not.
npm ci
node update_links_in_translations.js
Node script to generate markdown files required for hosting Learning Path on innersourcecommons.org.
This script requires a GitHub access token, as it uses the GitHub API to get Learning Path contributors. Your token does not require any scopes, as the Learning Path is Open Source. To provide this, create a .env file in this directory in the following format:
TOKEN=<your_github_token>
npm ci
node generate_learning_path_markdown.js
The -e param generates only English-language articles, which can speed things up quite a bit if you just need one language to test out some changes.
Anytime there are any changes, you need to run the script that generates the updated pages on the innersourcecommons.org site.
- Clone the InnerSourceCommons/InnerSourceLearningPath and InnerSourceCommons/innersourcecommons.org repos.
- Is this the first time that articles have been written for this language? If so:
- Make sure this language appears in the website config and there is an index page.
- Is there a whole new Learning Path section? If so:
- Create a new thumbnail and put it with the other thumbnails.
- Create an
index.mdin the section folder. - Update the "sections" config with the new section and open a pull request for the change.
- Run generate_learning_path_markdown.js as described above.
cp -r newsite/* <path-to-innersourcecommons.org-repo>/content/en/learn/learning-path/.- Open a pull request with the modified files in the InnerSourceCommons/innersourcecommons.org repo.