diff --git a/README.md b/README.md index de5eeb5..5e3bb9f 100644 --- a/README.md +++ b/README.md @@ -25,8 +25,8 @@ The userhelp documentation is stored in the [silverstripe/silverstripe-userhelp- When **creating a new major branch for a pre-release major version** - Make sure you've added a new major branch to both `silverstripe/developer-docs` and `silverstripe/silverstripe-userhelp-content` - - You probably need to add new major branches for various modules as defined in `sources-user.js` as well - Add the new major to `sources-docs.js` and `sources-user.js` +- Add new major branches for various modules as defined in `sources-docs.js` and `sources-user.js` as well - Add the new major to the version select in `src/components/Header.tsx` - Add the major to the `PRE_RELEASE` array in the `getVersionMessage` function in `src/utils/nodes.ts` - Add the new major version to the [algolia crawler script](https://crawler.algolia.com/admin/crawlers/3d14ccdd-f9ae-4957-bc0a-5b21b4c29af3/configuration/edit) diff --git a/package.json b/package.json index d7147e7..3664f77 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "gatsby-source-git": "^1.0.2", "gatsby-transformer-remark": "^2.6.32", "html-react-parser": "^0.9.2", - "node-sass": "^7.0.0", + "node-sass": "^4.13.0", "prismjs": "^1.17.1", "prop-types": "^15.7.2", "react": "^16.11.0", diff --git a/sources-docs.js b/sources-docs.js index 19f85bc..ac8906a 100644 --- a/sources-docs.js +++ b/sources-docs.js @@ -1,4 +1,79 @@ module.exports = [ + // CMS 6 + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6', + remote: 'https://github.com/silverstripe/developer-docs.git', + branch: '6', + patterns: 'en/**' + } + }, + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6--optional_features/linkfield', + remote: 'https://github.com/silverstripe/silverstripe-linkfield.git', + branch: '5', + patterns: 'docs/en/!(userguide)/**' + } + }, + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6--optional_features/userforms', + remote: 'https://github.com/silverstripe/silverstripe-userforms.git', + branch: '7', + patterns: 'docs/en/!(userguide)/**' + } + }, + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6--optional_features/elemental', + remote: 'https://github.com/silverstripe/silverstripe-elemental.git', + branch: '6', + patterns: 'docs/en/!(userguide)/**' + } + }, + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6--optional_features/mfa', + remote: 'https://github.com/silverstripe/silverstripe-mfa.git', + branch: '6', + patterns: 'docs/en/!(userguide)/**' + } + }, + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6--optional_features/mfa/authenticators/totp-authenticator', + remote: 'https://github.com/silverstripe/silverstripe-totp-authenticator.git', + branch: '6', + patterns: 'docs/en/!(userguide)/**' + } + }, + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6--optional_features/mfa/authenticators/webauthn-authenticator', + remote: 'https://github.com/silverstripe/silverstripe-webauthn-authenticator.git', + branch: '6', + patterns: 'docs/en/!(userguide)/**' + } + }, + { + resolve: 'gatsby-source-git', + options: { + name: 'docs--6--optional_features/taxonomies', + remote: 'https://github.com/silverstripe/silverstripe-taxonomy.git', + branch: '4', + patterns: 'docs/en/!(userguide)/**' + } + }, + + // CMS 5 { resolve: 'gatsby-source-git', options: { @@ -71,6 +146,8 @@ module.exports = [ patterns: 'docs/en/!(userguide)/**' } }, + + // CMS 4 { resolve: 'gatsby-source-git', options: { @@ -80,6 +157,8 @@ module.exports = [ patterns: 'en/**' } }, + + // CMS 3 { resolve: 'gatsby-source-git', options: { diff --git a/sources-user.js b/sources-user.js index 6828be5..dfd9f10 100644 --- a/sources-user.js +++ b/sources-user.js @@ -1,4 +1,177 @@ module.exports = [ + // v6 + { + resolve: `gatsby-source-git`, + options: { + name: `user--6`, + remote: `https://github.com/silverstripe/silverstripe-userhelp-content.git`, + branch: `6`, + patterns: `docs/en/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/linkfield`, + remote: `https://github.com/silverstripe/silverstripe-linkfield`, + branch: `5`, + patterns: `docs/en/userguide/**`, + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/setting_up_advancedworkflow`, + remote: `https://github.com/symbiote/silverstripe-advancedworkflow`, + branch: `5`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/online_databases_and_registries`, + remote: `https://github.com/silverstripe/silverstripe-registry`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/content_review`, + remote: `https://github.com/silverstripe/silverstripe-contentreview`, + branch: `6`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/blogs`, + remote: `https://github.com/silverstripe/silverstripe-blog`, + branch: `5`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/forms`, + remote: `https://github.com/silverstripe/silverstripe-userforms`, + branch: `7`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/working_with_multiple_websites`, + remote: `https://github.com/silverstripe/silverstripe-subsites`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/taxonomies`, + remote: `https://github.com/silverstripe/silverstripe-taxonomy`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/iframe`, + remote: `https://github.com/silverstripe/silverstripe-iframe`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/site_wide_rss_feeds`, + remote: `https://github.com/silverstripe/silverstripe-versionfeed`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/content_blocks`, + remote: `https://github.com/dnadesign/silverstripe-elemental`, + branch: `6`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/modules_report`, + remote: `https://github.com/bringyourownideas/silverstripe-maintenance`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/share_draft_content`, + remote: `https://github.com/silverstripe/silverstripe-sharedraftcontent`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/document_converter`, + remote: `https://github.com/silverstripe/silverstripe-documentconverter`, + branch: `4`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/multi-factor_authentication`, + remote: `https://github.com/silverstripe/silverstripe-mfa`, + branch: `6`, + patterns: `docs/en/userguide/**` + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--managing_your_website/reports/security_report`, + remote: `https://github.com/silverstripe/silverstripe-securityreport`, + branch: `4`, + patterns: `docs/en/userguide/**`, + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--managing_your_website/reports/sitewide_content_report`, + remote: `https://github.com/silverstripe/silverstripe-sitewidecontent-report`, + branch: `5`, + patterns: `docs/en/userguide/**`, + } + }, + { + resolve: `gatsby-source-git`, + options: { + name: `user--6--optional_features/managing_devices`, + remote: `https://github.com/silverstripe/silverstripe-session-manager`, + branch: `3`, + patterns: `docs/en/userguide/**` + } + }, + // v5 { resolve: `gatsby-source-git`, diff --git a/src/components/Header.tsx b/src/components/Header.tsx index b048780..8bbf947 100644 --- a/src/components/Header.tsx +++ b/src/components/Header.tsx @@ -57,6 +57,7 @@ const Header: StatelessComponent = ({ handleSidebarToggle }): React