Skip to content

Commit e23fead

Browse files
committed
Merge remote-tracking branch 'template/main'
2 parents 6dd65fb + 692304e commit e23fead

23 files changed

+2995
-2816
lines changed

.github/workflows/build.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
operating-system: [ubuntu-latest]
16-
php-versions: ["8.0"]
16+
php-versions: ["8.2"]
1717
env:
1818
extensions: opcache, mbstring, ds, pcov
1919
tools: composer
@@ -40,7 +40,7 @@ jobs:
4040
key: ${{ env.key }}
4141

4242
- name: Cache extensions
43-
uses: actions/cache@v2
43+
uses: actions/cache@v4
4444
with:
4545
path: ${{ steps.extcache.outputs.dir }}
4646
key: ${{ steps.extcache.outputs.key }}
@@ -68,7 +68,7 @@ jobs:
6868
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
6969

7070
- name: Cache dependencies
71-
uses: actions/cache@v2
71+
uses: actions/cache@v4
7272
with:
7373
path: ${{ steps.composer-cache.outputs.dir }}
7474
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
@@ -87,14 +87,17 @@ jobs:
8787
id: yarn-cache-dir-path
8888
run: echo "::set-output name=dir::$(yarn cache dir)"
8989

90-
- uses: actions/cache@v2
90+
- uses: actions/cache@v4
9191
id: yarn-cache
9292
with:
9393
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
9494
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
9595
restore-keys: |
9696
${{ runner.os }}-yarn-
9797
98+
- name: Show dir contents
99+
run: ls -la docs/.vuepress
100+
98101
- name: vuepress-deploy
99102
uses: jenkey2011/vuepress-deploy@v1
100103
env:

.github/workflows/update-template.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,16 @@ on:
33
workflow_dispatch:
44
jobs:
55
update-template:
6-
runs-on: ubuntu-20.04
6+
runs-on: ubuntu-22.04
7+
permissions:
8+
contents: write
9+
pull-requests: write
710
steps:
811
- name: Checkout
9-
uses: actions/checkout@v2
12+
uses: actions/checkout@v4
1013
- name: actions-template-sync
11-
uses: AndreasAugustin/actions-template-sync@v0.1.3-draft
14+
uses: AndreasAugustin/actions-template-sync@v2
1215
with:
13-
github_token: ${{ secrets.GITHUB_TOKEN }}
16+
source_gh_token: ${{ secrets.GITHUB_TOKEN }}
1417
source_repo_path: chevere/docs-deploy
1518
upstream_branch: main

.header

Lines changed: 0 additions & 6 deletions
This file was deleted.

.vuepress/config.js

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,49 @@ const project = require('./config-project')
22

33
project.theme = 'default-prefers-color-scheme';
44
project.head.push(
5-
['meta', {
5+
['meta', {
66
name: 'viewport',
77
content: 'width=device-width, initial-scale=1.0'
88
}]
99
);
10-
10+
if (!project.themeConfig) {
11+
project.themeConfig = {};
12+
}
13+
if (!project.themeConfig.nav) {
14+
project.themeConfig.nav = [];
15+
}
1116
if (!project.plugins) {
1217
project.plugins = [];
1318
}
1419
project.plugins.push(
15-
['@vuepress/pwa', {
16-
serviceWorker: true,
17-
updatePopup: true
18-
}],
19-
['@vuepress/medium-zoom', true]
20+
['@vuepress/medium-zoom', true],
21+
['seo', project.themeConfig.seo || {}]
2022
);
21-
if (!project.themeConfig.nav) {
22-
project.themeConfig.nav = [];
23+
if (project.themeConfig.nav_before) {
24+
project.themeConfig.nav.unshift(
25+
...project.themeConfig.nav_before
26+
);
2327
}
2428
project.themeConfig.nav.push(
2529
...require('./nav/en')
2630
);
31+
if (project.themeConfig.nav_after) {
32+
project.themeConfig.nav.push(
33+
...project.themeConfig.nav_after
34+
);
35+
}
2736
if (!project.themeConfig.sidebar) {
2837
project.themeConfig.sidebar = [];
2938
}
39+
project.chainWebpack = (config) => {
40+
config.module
41+
.rule('webp')
42+
.test(/\.webp$/)
43+
.use('file-loader')
44+
.loader('file-loader')
45+
.options({
46+
name: 'assets/img/[name].[hash:8].[ext]'
47+
});
48+
}
3049
project.themeConfig.sidebar = require('./sidebar/en');
31-
module.exports = project
50+
module.exports = project

.vuepress/enhanceApp.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Client app enhancement file.
3+
*
4+
* https://v1.vuepress.vuejs.org/guide/basic-config.html#app-level-enhancements
5+
*/
6+
7+
export default ({
8+
Vue, // the version of Vue being used in the VuePress app
9+
options, // the options for the root Vue instance
10+
router, // the router instance for the app
11+
siteData // site metadata
12+
}) => {
13+
// ...apply enhancements to the app
14+
try {
15+
const enhanceAppProject = require('./enhanceApp-project.js').default;
16+
enhanceAppProject({ router });
17+
} catch (error) {
18+
// If the file doesn't exist, do nothing
19+
}
20+
}
21+
22+

.vuepress/styles/default-index.styl

Lines changed: 58 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,14 @@
44
* ref:https://vuepress.vuejs.org/config/#index-styl
55
*/
66

7+
.float-left {
8+
float:left;
9+
}
10+
11+
.margin-1em {
12+
margin: 1em;
13+
}
14+
715
.home .hero img
816
max-width 450px!important
917

@@ -26,4 +34,53 @@ h1, h2, h3, h4, h5, h6,
2634
border-color $borderColor !important
2735

2836
.theme-code-group .theme-code-group__nav .theme-code-group__nav-tab
29-
color var(--preTextColor) !important
37+
color var(--preTextColor) !important
38+
39+
.theme-default-content code
40+
font-size 0.93em
41+
42+
code, kbd, .line-number
43+
font-family "FiraCode Nerd Font", "Operator Mono", Inconsolata, source-code-pro, Menlo, Monaco, Consolas, "Courier New", monospace
44+
45+
.embed-responsive {
46+
position: relative;
47+
display: block;
48+
width: 100%;
49+
padding: 0;
50+
overflow: hidden
51+
}
52+
53+
.embed-responsive:before {
54+
display: block;
55+
content: ""
56+
}
57+
58+
.embed-responsive .embed-responsive-item,.embed-responsive embed,.embed-responsive iframe,.embed-responsive object,.embed-responsive video {
59+
position: absolute;
60+
top: 0;
61+
bottom: 0;
62+
left: 0;
63+
width: 100%;
64+
height: 100%;
65+
border: 0
66+
}
67+
68+
.embed-responsive-21by9:before {
69+
padding-top: 42.857143%
70+
}
71+
72+
.embed-responsive-16by9:before {
73+
padding-top: 56.25%
74+
}
75+
76+
.embed-responsive-4by3:before {
77+
padding-top: 75%
78+
}
79+
80+
.embed-responsive-1by1:before {
81+
padding-top: 100%
82+
}
83+
84+
a > span {
85+
display: inline-block;
86+
}

.vuepress/styles/default-palette.styl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@
77
$codeBgLightColor = $codeBgColor
88
$preTextLightColor = $preTextColor
99
$languageTextLightColor = $languageTextColor
10-
$lineNumbersLightColor = $lineNumbersColor
10+
$lineNumbersLightColor = $lineNumbersColor
11+
$accentColor = #006edb
12+
$accentDarkColor = #2B73DE

MARKDOWN.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,9 @@ The `.vuepress/` folder is required to config VuePress.
6464

6565
* `config-project.js`
6666
* Injects config values to `config.js`
67+
* `enhanceApp-project.js`
68+
* Injects custom Vue components to the VuePress app
6769
* `public/`
6870
* Use it for public content such as pics, icons and the manifest file. A file at `.vuepress/public/logo.svg` will resolve to `/logo.svg`
69-
* `styles/`
71+
* `styles/`
7072
* Uses to store styling (CSS) properties.

build.php

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,12 @@
1313

1414
use DocsDeploy\BuildController;
1515

16+
use function Chevere\Parameter\arguments;
17+
1618
require 'vendor/autoload.php';
1719

1820
(new BuildController())
1921
->run(
20-
(new BuildController())
21-
->getArguments(
22-
dir: getcwd() . '/docs/',
23-
stream: 'php://stdout',
24-
)
22+
dir: getcwd() . '/docs/',
23+
stream: 'php://stdout',
2524
);

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,12 @@
1818
}
1919
},
2020
"require": {
21-
"chevere/chevere": "^0.3"
21+
"chevere/chevere": "^3.2"
2222
},
2323
"require-dev": {
24-
"symplify/easy-coding-standard": "^9.1",
24+
"chevere/var-dump": "^0.9.0",
2525
"phpunit/phpunit": "^9.5",
26-
"chevere/xr": "^0.1"
26+
"symplify/easy-coding-standard": "^9.1"
2727
},
2828
"config": {
2929
"optimize-autoloader": true,

0 commit comments

Comments
 (0)