Add support for multiple versions of the docs
This commit is contained in:
parent
82c355f293
commit
5ee35c8892
|
@ -40,7 +40,7 @@ Config::inst()->update('DocumentationViewer', 'check_permission', false);
|
|||
|
||||
DocumentationViewer::set_edit_link(
|
||||
'framework',
|
||||
'https://github.com/silverstripe/framework/edit/%version%/docs/%lang%/%path%',
|
||||
'https://github.com/silverstripe/silverstripe-framework/edit/%version%/docs/%lang%/%path%',
|
||||
array(
|
||||
'rewritetrunktomaster' => true
|
||||
)
|
||||
|
@ -56,7 +56,7 @@ DocumentationSearch::set_meta_data(array(
|
|||
'Tags' => 'silverstripe sapphire php framework cms content management system'
|
||||
));
|
||||
|
||||
// Changelogs have heaps of phrases, but are rarely relevant for content searches
|
||||
// Changelogs have heaps of phrases, but are rarely relevant for content searches
|
||||
Config::inst()->update('DocumentationSearch', 'boost_by_path', array(
|
||||
'/^changelog/' => 0.05
|
||||
));
|
||||
|
@ -67,3 +67,4 @@ if(file_exists(BASE_PATH . '/.lucene-index')) {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -12,6 +12,16 @@ DocumentationManifest:
|
|||
-
|
||||
Path: "framework/docs/"
|
||||
Title: "Framework"
|
||||
Version: master
|
||||
Version: "3.1"
|
||||
Stable: true
|
||||
DefaultEntity: true
|
||||
-
|
||||
Path: "src/framework_3.0/docs/"
|
||||
Title: "Framework"
|
||||
Version: "3.0"
|
||||
DefaultEntity: true
|
||||
-
|
||||
Path: "src/framework_2.4/docs/"
|
||||
Title: "Framework"
|
||||
Version: "2.4"
|
||||
DefaultEntity: true
|
||||
|
|
|
@ -52,21 +52,7 @@ function checkout {
|
|||
}
|
||||
|
||||
# core
|
||||
checkout 'silverstripe/sapphire.git' 'framework' 'master'
|
||||
checkout 'silverstripe/sapphire.git' 'framework' '3.1'
|
||||
checkout 'silverstripe/sapphire.git' 'framework' '3.0'
|
||||
checkout 'silverstripe/sapphire.git' 'framework' '2.4'
|
||||
checkout 'silverstripe/sapphire.git' 'framework' '2.3'
|
||||
|
||||
# core modules with docs
|
||||
checkout 'silverstripe/silverstripe-cms.git' 'cms' '3.0'
|
||||
|
||||
# checkout 'silverstripe/silverstripe-docsviewer.git' 'docsviewer'
|
||||
# checkout 'silverstripe/silverstripe-forum.git' 'forum'
|
||||
# checkout 'silverstripe/silverstripe-translatable.git' 'translatable'
|
||||
# checkout 'silverstripe/silverstripe-subsites.git' 'subsites'
|
||||
|
||||
# popular labs projects
|
||||
# checkout 'silverstripe-labs/silverstripe-staticpublisher.git' 'staticpublisher'
|
||||
checkout 'silverstripe/silverstripe-framework.git' 'framework' '3.0'
|
||||
checkout 'silverstripe/silverstripe-framework.git' 'framework' '2.4'
|
||||
|
||||
echo "Done."
|
|
@ -22,5 +22,10 @@
|
|||
"config": {
|
||||
"process-timeout": 600
|
||||
},
|
||||
"minimum-stability": "dev"
|
||||
}
|
||||
"minimum-stability": "dev",
|
||||
"scripts": {
|
||||
"post-update-cmd": [
|
||||
"./bin/update.sh"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -187,12 +187,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/silverstripe/silverstripe-docsviewer.git",
|
||||
"reference": "fbe7c861a58403e6951fd4846cd08716421290b7"
|
||||
"reference": "1e2737bc5ad60f216c6ab27cbe2ac30d5092cdc6"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/silverstripe/silverstripe-docsviewer/zipball/fbe7c861a58403e6951fd4846cd08716421290b7",
|
||||
"reference": "fbe7c861a58403e6951fd4846cd08716421290b7",
|
||||
"url": "https://api.github.com/repos/silverstripe/silverstripe-docsviewer/zipball/1e2737bc5ad60f216c6ab27cbe2ac30d5092cdc6",
|
||||
"reference": "1e2737bc5ad60f216c6ab27cbe2ac30d5092cdc6",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
Loading…
Reference in New Issue