Skip to content

Commit

Permalink
Merge pull request #497 from entando/ENDOC-461-create-7.0
Browse files Browse the repository at this point in the history
Endoc 461 create 7.0
  • Loading branch information
nshaw authored Apr 20, 2022
2 parents d03e3be + 1e000e0 commit 2d3641f
Show file tree
Hide file tree
Showing 227 changed files with 14,153 additions and 200 deletions.
28 changes: 17 additions & 11 deletions vuepress/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,22 +66,28 @@ As an example, we'll be adding 2 related documentation files, named `README` and

### Versions
We have a simple versioning system in place currently. Creating a new version involves the following steps:
1. Copy the `/vuepress/docs/next` directory (and contents) to a new version (e.g. `v6.x`).
1. Remove any frontmatter redirectFrom attributes under the new `v6.x` that redirect from old /next paths
2. Modify the top-level pages to remove the warnings, e.g. `v6.x/docs/README.md` and `v6.x/tutorials/README.md`
1. Copy the `.vuepress/next.js` navigation file to the new version `.vuepress/v6.x`

#### Create the new version
1. Copy the `/vuepress/docs/next` directory (and contents) to a new version (e.g. `vX.Y`).
1. Remove any frontmatter redirectFrom attributes under the new `vX.Y` that redirect from old /next paths
2. Modify the top-level pages to remove the warnings, e.g. `vX.Y/docs/README.md` and `vX.Y/tutorials/README.md`
1. Copy the `.vuepress/next.js` navigation file to the new version `.vuepress/vX.Y`
1. Modify `.vuepress/config.js`
1. Add the `require` statement at the top for the new navigation file
1. Add the new version to `extraWatchFiles`
2. Add the new version to the menu under `themeConfig.nav.items`
3. Add sidebars for the new version under `themeConfig.sidebar`
1. Add sidebars for the new version under `themeConfig.sidebar`
1. Add the new version to `navLinks.js`
1. Modify Getting Started guide (top-level page, docs/getting-started and quick reference) to update references to jhipster, etc. to point to the appropriate build or package versions.
1. Search for `/next` and `/v6.(x-1)` references in the new v6.x docs. If common practices have been followed, all docs should be using relative references so this should result in no additional changes. Please note that custom-resources.md has multiple absolute and relative links that should be checked with any version updates.
1. At launch time
1. Update config.js:entando.version to point to the new active version. This is used by the left-nav version navigation.
2. Update the data properties in `SpecialLayout.vue` to point to the new active version of `Docs` and `Tutorials
3. Modify the 3 manual redirect pages under `docs`, `docs/getting-started` and `tutorials` to point to the new active version
1. Search for `/next` and `/vX.(Y-1)` references in the new vX.Y docs. If common practices have been followed, all docs should be using relative references so this should result in no additional changes. Please note that custom-resources.md has multiple absolute and relative links that should be checked with any version updates.
1. Run `yarn docs:check-md` to check for broken links.
1. Publish to the staging site and run the deadlink checker on it

#### Activate the new version
1. Update `config.js`
1. `landingSecondaryNav` to set the active version for the landing page nav
1. `entando.version` to set the active version for the regular pages left-nav version navigation.
1. Update the data properties in `SpecialLayout.vue` to point to the new active version of `Docs` and `Tutorials`
1. Modify the 3 manual redirect pages under `docs`, `docs/getting-started` and `tutorials` to point to the new active version

### Publishing
We have two utility scripts used to publish the docs to staging and publishing, `vuepress/deploy-staging.sh` and `vuepress/deploy-prod.sh`, respectively.
Expand Down
4 changes: 4 additions & 0 deletions vuepress/docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const next = require('./next.js');
const V70 = require('./v70.js');
const V632 = require('./v632.js');
const V63 = require('./v63.js');
const V62 = require('./v62.js');
Expand All @@ -11,6 +12,7 @@ module.exports = {
description: 'Entando Developers',
extraWatchFiles: [
'next.js',
'v70.js',
'v632.js',
'v63.js',
'v62.js',
Expand Down Expand Up @@ -119,6 +121,8 @@ module.exports = {
sidebar: {
'/next/docs/': next.docsSidebar('/next/docs/'),
'/next/tutorials/': next.tutorialsSidebar('/next/tutorials/'),
'/v7.0/docs/': V70.docsSidebar('/v7.0/docs/'),
'/v7.0/tutorials/': V70.tutorialsSidebar('/v7.0/tutorials/'),
'/v6.3.2/docs/': V632.docsSidebar('/v6.3.2/docs/'),
'/v6.3.2/tutorials/': V632.tutorialsSidebar('/v6.3.2/tutorials/'),
'/v6.3/docs/': V63.docsSidebar('/v6.3/docs/'),
Expand Down
1 change: 1 addition & 0 deletions vuepress/docs/.vuepress/navLinks.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ module.exports = {
text: section,
items: [
{ text: 'NEXT', link: '/next' + path },
{ text: '7.0', link: '/v7.0' + path },
{ text: '6.3.2', link: '/v6.3.2' + path },
{ text: '6.3', link: '/v6.3' + path },
{ text: '6.2', link: '/v6.2' + path },
Expand Down
5 changes: 1 addition & 4 deletions vuepress/docs/.vuepress/next.js
Original file line number Diff line number Diff line change
Expand Up @@ -179,10 +179,7 @@ module.exports = {
{
title: 'Release Notes',
children: [
{
title: 'Entando 7.0 Release Notes',
path: path + 'releases/'
},
path + 'releases/',
]
},
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default ({ router, isServer }) => {

window.Entando.versionedLink = async function(path) {
var pathname = window.location.pathname;
var versionPos = pathname.indexOf("/v6");
var versionPos = pathname.indexOf("/v");
var nextPos = pathname.indexOf("/next/");
if (!versionPos && !nextPos) {
console.error("Unversioned path: " + pathname)
Expand Down
Loading

0 comments on commit 2d3641f

Please sign in to comment.