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
Node scripts to generate markdown files required for hosting Learning Path on innersourcecommons.org and innersourcecommons.net.
These scripts require a GitHub access token, as they use 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_jekyll_learning_path_markdown.js
node generate_hugo_learning_path_markdown.js
Anytime there are new articles written, you need to run the script that generates the new 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 section in this language? If so, then do both of the following:
- update the "sections" config with the language code of the articles for the appropriate section. Open a pull request for the change.
- update the Learning Path landing page with a link to your new language pages.
- Run generate_jekyll_learning_path_markdown.js as described above.
cp -r learningpath/* <path-to-innersourcecommons.org-repo>/resources/learningpath/.- Open a pull request with the modified files in the InnerSourceCommons/innersourcecommons.org repo.
Note that these steps only needs to happen when there are new articles written. Changes to existing articles will automatically show up on the innersourcecommons.org site.
Anytime there are any changes, you need to run the script that generates the updated pages on the innersourcecommons.net site.
- Clone the InnerSourceCommons/InnerSourceLearningPath and InnerSourceCommons/innersourcecommons.net repos.
- Is this the first time that articles have been written for this section in this language? If so, then do both of the following:
- update the "sections" config with the language code of the articles for the appropriate section and open a pull request for the change
- make sure this language appears in the website config and there are the relevant index pages
- Run
node substitute_article_urls.js isc.netas described above. This changes the asciidoc source files' links to point at [innnersourcecommons.net] - do not commit this change! - Run generate_hugo_learning_path_markdown.js as described above.
cp -r newsite/ <path-to-innersourcecommons.net-repo>/content/learn/learning-path/.- Open a pull request with the modified files in the InnerSourceCommons/innersourcecommons.net repo.