Skip to content

Commit a3a02c6

Browse files
committed
Use VitePress for docs
1 parent 89cc334 commit a3a02c6

File tree

7 files changed

+756
-11622
lines changed

7 files changed

+756
-11622
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ composer.lock
66
/.php-cs-fixer.cache
77
/.phpunit.result.cache
88
/node_modules/
9-
/docs/.vuepress/dist/
10-
/docs/README.md
9+
/docs/.vitepress/dist/
10+
/docs/index.md

docs/.vuepress/components/UrlHelper.vue renamed to docs/.vitepress/components/UrlHelper.vue

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
<option value="patch">PATCH</option>
1717
</select>
1818
<h4>Strict mode</h4>
19-
<label><input type="checkbox" v-model="strictMode"> Use strict mode</label>
19+
<label class="label"><input type="checkbox" v-model="strictMode"> Use strict mode</label>
2020
<h4>Possible fixtures (in order of specificity)</h4>
2121
<ol v-if="fixtures.length">
2222
<li v-for="fixture in fixtures">/path/to/fixtures/{{ fixture }}</li>
@@ -277,7 +277,7 @@
277277
<style scoped>
278278
.input,
279279
.select {
280-
border-radius: 2rem;
280+
border-radius: 6px;
281281
border: 1px solid #cfd4db;
282282
box-sizing: border-box;
283283
color: #4e6e8e;
@@ -290,6 +290,12 @@
290290
width: 100%;
291291
}
292292
293+
.input,
294+
.select,
295+
.label {
296+
margin: 1rem 0;
297+
}
298+
293299
.input {
294300
cursor: text;
295301
padding: 0 1rem;
@@ -299,4 +305,8 @@
299305
height: 2rem;
300306
padding: 0 1rem;
301307
}
308+
309+
.label {
310+
display: inline-block;
311+
}
302312
</style>
Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
module.exports = {
1+
import { defineConfig } from 'vitepress'
2+
3+
export default defineConfig({
24
title: 'swisnl/php-http-fixture-client',
35
description: 'Fixture client for PHP-HTTP',
46
base: '/php-http-fixture-client/',
57
themeConfig: {
68
repo: 'swisnl/php-http-fixture-client',
7-
editLinks: true,
9+
editLinks: false,
810
}
9-
};
11+
})

docs/.vitepress/copy-readme.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
const cpFile = require('cp-file');
2+
3+
cpFile('README.md', 'docs/index.md');

docs/.vitepress/theme/index.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import DefaultTheme from 'vitepress/theme';
2+
import UrlHelper from '../components/UrlHelper.vue';
3+
4+
export default {
5+
...DefaultTheme,
6+
enhanceApp({ app }) {
7+
app.component('UrlHelper', UrlHelper)
8+
}
9+
}

0 commit comments

Comments
 (0)