Skip to content

Commit

Permalink
Upgrade vuepress to v2 and add dark mode support (#465)
Browse files Browse the repository at this point in the history
* Upgrade vuepress to v2 and add dark mode support

* Fix code snippets importing

* Fix nav item titles

* Fix some broken tables

* Fix blog, serch and command reference

* Fix doc building for vuepress-next, avoid using angle brackets

* Fix broken tables
  • Loading branch information
hustcer committed Jun 2, 2022
1 parent cf006aa commit f820bc7
Show file tree
Hide file tree
Showing 86 changed files with 493 additions and 481 deletions.
7 changes: 5 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
.temp/
.cache/
TODO.md
.DS_Store
node_modules
.vuepress/dist/
npm-debug.log
.DS_Store
.vuepress/dist/
package-lock.json
2 changes: 1 addition & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ package-lock.json
operators.md
dataframes.md
nushell_map.md
coming_from_bash.md
*_bash*.md
book/commands/*.md
14 changes: 14 additions & 0 deletions .vuepress/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Client app enhancement file.
*
* https://v2.vuepress.vuejs.org/advanced/cookbook/usage-of-client-config.html
*/

import { defineClientConfig } from '@vuepress/client';
import BlogPosts from './components/BlogPosts.vue';

export default defineClientConfig({
enhance({ app }) {
app.component('BlogPosts', BlogPosts);
},
});
3 changes: 2 additions & 1 deletion .vuepress/components/BlogPosts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,12 @@
</template>

<script>
import pages from '@temp/pages';
export default {
name: 'BlogPosts',
computed: {
posts() {
return this.$site.pages
return pages
.filter((p) => {
return p.path.indexOf('/blog/') >= 0 && p.path != '/blog/';
})
Expand Down
Loading

0 comments on commit f820bc7

Please sign in to comment.