Skip to content

Commit

Permalink
Adapt latest Voyager changes
Browse files Browse the repository at this point in the history
  • Loading branch information
emptynick committed May 22, 2021
1 parent 2ae2974 commit 70021fb
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion dist/voyager-docs.umd.js

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@
"devDependencies": {
"@vitejs/plugin-vue": "^1.2.2",
"@vue/compiler-sfc": "^3.0.11",
"vite": "^2.3.0"
"vite": "^2.3.2"
}
}
3 changes: 1 addition & 2 deletions src/VoyagerDocs.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,11 @@ public function provideProtectedRoutes(): void
$toc = $this->parseSummary(Str::markdown(Str::after(file_get_contents(base_path('vendor/voyager-admin/voyager/docs/summary.md')), "\n")));

return Inertia::render('voyager-docs', [
'title' => $title,
'content' => $content,
'toc' => $toc,
'path' => $request->get('path', 'introduction.md'),
'current' => $currentPath,
]);
])->withViewData('title', $title);
}

abort(404);
Expand Down
4 changes: 3 additions & 1 deletion src/components/Docs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ import hljs from 'highlight.js/lib/core';
import php from 'highlight.js/lib/languages/php';
import css from 'highlight.js/lib/languages/css';
import json from 'highlight.js/lib/languages/json';
import javascript from 'highlight.js/lib/languages/javascript';
hljs.registerLanguage('php', php);
hljs.registerLanguage('css', php);
hljs.registerLanguage('javascript', php);
hljs.registerLanguage('json', json);
hljs.registerLanguage('javascript', javascript);
export default {
props: {
Expand Down

0 comments on commit 70021fb

Please sign in to comment.