@centricle/rtfm 1.1.0 → 1.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centricle/rtfm",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Local docs reader. Zero dependencies. Zero network.",
5
5
  "bin": {
6
6
  "rtfm": "bin/rtfm.js"
@@ -184,7 +184,21 @@
184
184
  loadSidebar: true,
185
185
  subMaxLevel: 2,
186
186
  auto2top: true,
187
- routerMode: 'history'
187
+ routerMode: 'hash',
188
+ plugins: [
189
+ function(hook) {
190
+ hook.doneEach(function() {
191
+ var path = window.location.hash.replace(/^#\/?/, '');
192
+ if (path) {
193
+ // Use filename from route as tab title
194
+ var name = path.split('/').pop().replace(/\.md$/i, '');
195
+ document.title = decodeURIComponent(name);
196
+ } else {
197
+ document.title = 'rtfm';
198
+ }
199
+ });
200
+ }
201
+ ]
188
202
  }
189
203
  </script>
190
204
  <script src="/docsify.min.js"></script>