Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(v2): docs versioning ❄️πŸ”₯ #1983

Merged
merged 36 commits into from
Nov 22, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
2daebde
wip: versioning
endiliey Nov 6, 2019
b5fa5c2
wip again
endiliey Nov 9, 2019
0d47a21
nits lint
endiliey Nov 11, 2019
d6b61ed
Merge branch 'master' into endi/versioning
endiliey Nov 11, 2019
f3f6d0c
refactor metadata code so that we can have inobject properties optimi…
endiliey Nov 11, 2019
6b72119
remove buggy permalink code
endiliey Nov 11, 2019
9584826
modify versioned docs fixture such that foo/baz only exists in v1.0.0
endiliey Nov 11, 2019
5d15c83
refactor metadata.ts so that there is less transformon object
endiliey Nov 12, 2019
e9f3d1b
more refactoring
endiliey Nov 12, 2019
be470d6
reduce test fixtures, refactoring
endiliey Nov 12, 2019
6842d96
refactoring readability
endiliey Nov 12, 2019
8cb5977
finish metadata part
endiliey Nov 12, 2019
01000f9
refactor with readdir
endiliey Nov 12, 2019
e48b7b8
first pass of implementation
endiliey Nov 12, 2019
3fd93f4
fix mdx laoder
endiliey Nov 12, 2019
1e37e65
Merge branch 'master' into endi/versioning
endiliey Nov 13, 2019
87c368f
Merge branch 'master' into endi/versioning
endiliey Nov 13, 2019
c54ef7f
split generated routes by version for performance & smaller bundle
endiliey Nov 16, 2019
5ac4aef
test data for demo
endiliey Nov 16, 2019
2568db0
refactor with set
endiliey Nov 16, 2019
122b9c7
more tests
endiliey Nov 17, 2019
c4df12c
Merge branch 'master' into endi/versioning
endiliey Nov 19, 2019
64302d0
typo
endiliey Nov 19, 2019
31255ff
fix typo
endiliey Nov 19, 2019
4bd3a1e
better temporary ui
endiliey Nov 19, 2019
0180499
Merge branch 'master' into endi/versioning
endiliey Nov 19, 2019
3fe3ea3
stronger typing & docsVersion command
endiliey Nov 20, 2019
116df01
add 100% test coverage for docsVersion command
endiliey Nov 20, 2019
ec5602a
more test and delete manual docs cut
endiliey Nov 20, 2019
92f115d
cut 2.0.0-alpha.35 docs
endiliey Nov 20, 2019
1875da1
Merge branch 'master' into endi/versioning
endiliey Nov 22, 2019
dae70cc
cut alpha.36 instead
endiliey Nov 22, 2019
1f3deab
copyright
endiliey Nov 22, 2019
d88bbd3
delete versioned docs
endiliey Nov 22, 2019
3740613
stronger test on metadata
endiliey Nov 22, 2019
5f88f8d
update typo
endiliey Nov 22, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/docusaurus-plugin-content-docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"license": "MIT",
"devDependencies": {
"@docusaurus/types": "^2.0.0-alpha.36",
"commander": "^4.0.1",
"picomatch": "^2.1.0"
},
"dependencies": {
Expand All @@ -22,6 +23,7 @@
"globby": "^10.0.1",
"import-fresh": "^3.1.0",
"loader-utils": "^1.2.3",
"lodash": "^4.17.15",
"shelljs": "^0.8.3"
},
"peerDependencies": {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
custom_edit_url: https://github.com/customUrl/docs/lorem.md
unrelated_frontmatter: won't be part of metadata
---

Lorem ipsum.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,4 @@ module.exports = {
url: 'https://your-docusaurus-test-site.com',
baseUrl: '/',
favicon: 'img/favicon.ico',
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
This is `next` version of bar.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello `next` !
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Copyright (c) 2017-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/

module.exports = {
title: 'Versioned Site',
tagline: 'The tagline of my site',
url: 'https://your-docusaurus-test-site.com',
baseUrl: '/',
favicon: 'img/favicon.ico',
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"docs": {
"Test": [
"foo/bar"
],
"Guides": [
"hello"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bar `1.0.0` !
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Baz `1.0.0` ! This will be deleted in next subsequent versions.
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello `1.0.0` !
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Bar `1.0.1` !
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Hello `1.0.1` !
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"version-1.0.0/docs": {
"Test": [
"version-1.0.0/foo/bar",
"version-1.0.0/foo/baz"
],
"Guides": [
"version-1.0.0/hello"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"version-1.0.1/docs": {
"Test": [
"version-1.0.1/foo/bar"
],
"Guides": [
"version-1.0.1/hello"
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[
"1.0.1",
"1.0.0"
]
Loading