Skip to content

Commit

Permalink
Add subpage for unreleased ink! 6.x (#352)
Browse files Browse the repository at this point in the history
* Copy `docs/` to `versioned_docs/version-6.x/`

* Copy `sidebars.js` to `versioned_sidebars/version-6.x-sidebars.json`

* Add 6.x as new version

* Display info notice when viewing unreleased 6.x docs

* Copy `migrating-from-ink-4-to-5.md` to `migrating-from-ink-5-to-6.md`

* Add graphics for title and subpages

* Add initial migration page to sidebar

* Update migration page
  • Loading branch information
cmichi authored Dec 3, 2024
1 parent 4114d1e commit dfdc544
Show file tree
Hide file tree
Showing 120 changed files with 17,552 additions and 2 deletions.
5 changes: 5 additions & 0 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ module.exports = {
routeBasePath: '/',
lastVersion: 'current',
versions: {
'6.x': {
label: '6.x',
path: '6.x',
banner: 'none',
},
current: {
label: '5.x',
path: '',
Expand Down
21 changes: 19 additions & 2 deletions src/theme/NavbarItem/DocsVersionDropdownNavbarItem.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,31 @@ export default function DocsVersionDropdownNavbarItemWrapper(props) {
(version) => version.name === 'current',
);
const isViewingOutdatedVersion = activeDocContext.activeVersion.name !== currentVersion.name;
const isViewingUnreleasedVersion = activeDocContext.activeVersion.name === '6.x';
const d = 'M256 32c14.2 0 27.3 7.5 34.5 19.8l216 368c7.3 12.4 7.3 27.7 .2 40.1S486.3 480 472 480H40c-14.3 0-27.6-7.7-34.7-20.1s-7-27.8 .2-40.1l216-368C228.7 39.5 241.8 32 256 32zm0 128c-13.3 0-24 10.7-24 24V296c0 13.3 10.7 24 24 24s24-10.7 24-24V184c0-13.3-10.7-24-24-24zm32 224c0-17.7-14.3-32-32-32s-32 14.3-32 32s14.3 32 32 32s32-14.3 32-32z"'

if (isViewingOutdatedVersion) {
if (isViewingUnreleasedVersion) {
return (
<>
<div className={'navbar__item oldVersion'}>
<div className={'attention'}>
<svg xmlns={'http://www.w3.org/2000/svg'} viewBox={'0 0 512 512'}><path d={d}></path></svg>
<svg xmlns={'http://www.w3.org/2000/svg'} viewBox={'0 0 512 512'}>
<path d={d}></path>
</svg>
</div>
You are viewing the documentation for an <em>unreleased</em> version of ink!.
</div>
<DocsVersionDropdownNavbarItem {...props} />
</>
);
} else if (isViewingOutdatedVersion) {
return (
<>
<div className={'navbar__item oldVersion'}>
<div className={'attention'}>
<svg xmlns={'http://www.w3.org/2000/svg'} viewBox={'0 0 512 512'}>
<path d={d}></path>
</svg>
</div>
You are viewing the documentation for an older version of ink!.
</div>
Expand Down
Binary file added static/img/migration-guide-5-to-6.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit dfdc544

Please sign in to comment.