From a7942095c349c529b6ba9ee28da48effdf7581c6 Mon Sep 17 00:00:00 2001 From: Dima Boger Date: Mon, 18 May 2020 15:50:50 +0300 Subject: [PATCH] :recycle: Rename example dir and add styling --- README.md | 2 +- {vuepress-example => example}/package.json | 0 .../src/.vuepress/config.js | 2 +- .../src/.vuepress/theme/index.js | 0 .../src/.vuepress/theme/layouts/Layout.vue | 13 +++++++++++-- example/src/.vuepress/theme/package.json | 7 +++++++ {vuepress-example => example}/src/index.md | 0 7 files changed, 20 insertions(+), 4 deletions(-) rename {vuepress-example => example}/package.json (100%) rename {vuepress-example => example}/src/.vuepress/config.js (60%) rename {vuepress-example => example}/src/.vuepress/theme/index.js (100%) rename {vuepress-example => example}/src/.vuepress/theme/layouts/Layout.vue (55%) create mode 100644 example/src/.vuepress/theme/package.json rename {vuepress-example => example}/src/index.md (100%) diff --git a/README.md b/README.md index aca395a..f0b2993 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ You can use the component by itself: add `` to any `.md` file and But the most valuable part of this plugin is the ability to inject a distinct contributor list into each page. Unfortunately, VuePress allows to customize the `Page` component only via custom themes, so you need to do some magic as follows. -Create `theme` directory in your `.vuepress`, `index.js` and `layouts/Layout.vue` there as in (vuepress-example)[vuepress-example]. +Create `theme` directory in your `.vuepress`, `index.js` and `layouts/Layout.vue` there as in (example)[example]. Then add this theme as file dependency to a project (example), and setup your theme to config.js (example). If you to want change size or position of the `Contributors` component in the `Page` component, please use `Layout.vue` and (theme customization instruction)[https://vuepress.vuejs.org/theme/writing-a-theme.html]. diff --git a/vuepress-example/package.json b/example/package.json similarity index 100% rename from vuepress-example/package.json rename to example/package.json diff --git a/vuepress-example/src/.vuepress/config.js b/example/src/.vuepress/config.js similarity index 60% rename from vuepress-example/src/.vuepress/config.js rename to example/src/.vuepress/config.js index ef777f7..43e847c 100644 --- a/vuepress-example/src/.vuepress/config.js +++ b/example/src/.vuepress/config.js @@ -1,4 +1,4 @@ module.exports = { theme: 'custom-theme', - plugins: [['contributors']], + plugins: ['contributors'], }; diff --git a/vuepress-example/src/.vuepress/theme/index.js b/example/src/.vuepress/theme/index.js similarity index 100% rename from vuepress-example/src/.vuepress/theme/index.js rename to example/src/.vuepress/theme/index.js diff --git a/vuepress-example/src/.vuepress/theme/layouts/Layout.vue b/example/src/.vuepress/theme/layouts/Layout.vue similarity index 55% rename from vuepress-example/src/.vuepress/theme/layouts/Layout.vue rename to example/src/.vuepress/theme/layouts/Layout.vue index c2bb514..f0ef995 100644 --- a/vuepress-example/src/.vuepress/theme/layouts/Layout.vue +++ b/example/src/.vuepress/theme/layouts/Layout.vue @@ -1,7 +1,9 @@ @@ -17,4 +19,11 @@ export default { ParentLayout } } - \ No newline at end of file + + + \ No newline at end of file diff --git a/example/src/.vuepress/theme/package.json b/example/src/.vuepress/theme/package.json new file mode 100644 index 0000000..8a11c4a --- /dev/null +++ b/example/src/.vuepress/theme/package.json @@ -0,0 +1,7 @@ +{ + "name": "theme", + "version": "0.0.0", + "description": "Custom Theme with injected @tlbootcamp/contributor component", + "license": "MIT", + "dependencies": {} +} diff --git a/vuepress-example/src/index.md b/example/src/index.md similarity index 100% rename from vuepress-example/src/index.md rename to example/src/index.md