pict-docuserve 0.0.1 → 0.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-site.js +8 -2
- package/dist/index.html +2 -2
- package/dist/pict-docuserve.js +8 -0
- package/dist/pict-docuserve.js.map +1 -1
- package/dist/pict-docuserve.min.js +1 -1
- package/dist/pict-docuserve.min.js.map +1 -1
- package/html/index.html +2 -2
- package/package.json +6 -2
- package/source/Pict-Application-Docuserve.js +11 -0
- package/source/cli/commands/Docuserve-Command-Inject.js +25 -22
- package/source/cli/commands/Docuserve-Command-Serve.js +2 -2
package/build-site.js
CHANGED
|
@@ -119,9 +119,15 @@ if (libFS.existsSync(tmpOutputPath))
|
|
|
119
119
|
}
|
|
120
120
|
ensureDir(tmpOutputPath);
|
|
121
121
|
|
|
122
|
-
// 1. Copy the
|
|
122
|
+
// 1. Copy only the required dist/ artifacts (minified bundles, css, index.html)
|
|
123
123
|
console.log(' Copying dist/ build artifacts...');
|
|
124
|
-
|
|
124
|
+
copyFile(libPath.join(tmpDistPath, 'index.html'), libPath.join(tmpOutputPath, 'index.html'));
|
|
125
|
+
copyDir(libPath.join(tmpDistPath, 'css'), libPath.join(tmpOutputPath, 'css'));
|
|
126
|
+
ensureDir(libPath.join(tmpOutputPath, 'js'));
|
|
127
|
+
copyFile(libPath.join(tmpDistPath, 'js', 'pict.min.js'), libPath.join(tmpOutputPath, 'js', 'pict.min.js'));
|
|
128
|
+
copyFile(libPath.join(tmpDistPath, 'js', 'pict.min.js.map'), libPath.join(tmpOutputPath, 'js', 'pict.min.js.map'));
|
|
129
|
+
copyFile(libPath.join(tmpDistPath, 'pict-docuserve.min.js'), libPath.join(tmpOutputPath, 'pict-docuserve.min.js'));
|
|
130
|
+
copyFile(libPath.join(tmpDistPath, 'pict-docuserve.min.js.map'), libPath.join(tmpOutputPath, 'pict-docuserve.min.js.map'));
|
|
125
131
|
|
|
126
132
|
// 2. Copy markdown content files from docs/
|
|
127
133
|
console.log(' Copying documentation markdown files...');
|
package/dist/index.html
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
<meta charset="utf-8">
|
|
5
5
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
|
7
|
-
<meta name="description" content="
|
|
7
|
+
<meta name="description" content="Documentation powered by pict-docuserve">
|
|
8
8
|
|
|
9
|
-
<title>
|
|
9
|
+
<title>Documentation</title>
|
|
10
10
|
|
|
11
11
|
<!-- Application Stylesheet -->
|
|
12
12
|
<link href="css/docuserve.css" rel="stylesheet">
|
package/dist/pict-docuserve.js
CHANGED
|
@@ -3079,6 +3079,14 @@ function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e =
|
|
|
3079
3079
|
// Load the catalog, then render the layout
|
|
3080
3080
|
let tmpDocProvider = this.pict.providers['Docuserve-Documentation'];
|
|
3081
3081
|
tmpDocProvider.loadCatalog(() => {
|
|
3082
|
+
// Set the page title from cover.md or _topbar.md
|
|
3083
|
+
let tmpDocuserve = this.pict.AppData.Docuserve;
|
|
3084
|
+
if (tmpDocuserve.CoverLoaded && tmpDocuserve.Cover && tmpDocuserve.Cover.Title) {
|
|
3085
|
+
document.title = tmpDocuserve.Cover.Title;
|
|
3086
|
+
} else if (tmpDocuserve.TopBarLoaded && tmpDocuserve.TopBar && tmpDocuserve.TopBar.Brand) {
|
|
3087
|
+
document.title = tmpDocuserve.TopBar.Brand;
|
|
3088
|
+
}
|
|
3089
|
+
|
|
3082
3090
|
// Render the layout shell, which triggers child view rendering
|
|
3083
3091
|
this.pict.views['Docuserve-Layout'].render();
|
|
3084
3092
|
return super.onAfterInitializeAsync(fCallback);
|