Skip to content

Commit

Permalink
chore(deps): update
Browse files Browse the repository at this point in the history
  • Loading branch information
Sun-ZhenXing committed Dec 23, 2024
1 parent 113b587 commit fc73327
Show file tree
Hide file tree
Showing 5 changed files with 1,415 additions and 906 deletions.
29 changes: 18 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
ARG NODE_VERSION=22.2.0
ARG NODE_VERSION=22.11.0
ARG NPM_REGISTER=https://registry.npmjs.org
ARG BASE_URL=/vuepress-solid-template/

# Builder
FROM node:$NODE_VERSION-bookworm AS builder
WORKDIR /app
FROM node:${NODE_VERSION}-bookworm AS builder
ARG NPM_REGISTER
COPY . ./
WORKDIR /app
ENV NODE_OPTIONS=--max-old-space-size=4096

COPY package.json pnpm-lock.yaml ./

RUN npm -v \
&& npm config set registry $NPM_REGISTER \
&& npm install -g pnpm \
&& pnpm -v \
&& pnpm config set registry $NPM_REGISTER \
&& pnpm install \
&& pnpm build
&& pnpm install

COPY . ./

RUN pnpm build

# Nginx Server
FROM nginx:1.25.5-alpine3.19-slim
WORKDIR /usr/share/nginx/html/
COPY --from=builder /app/docs/.vuepress/dist/ ./
RUN echo "<script>window.location.href = '/vuepress-solid-template/'</script>" > /usr/share/nginx/html/index.html
EXPOSE 80
FROM nginx:1.27.3-alpine3.20-slim
ARG BASE_URL
WORKDIR /usr/share/nginx/html${BASE_URL}
COPY --from=builder /app/docs/.vuepress/dist ./
COPY ./docker/nginx.conf /etc/nginx/conf.d/default.conf
EXPOSE 8080
CMD ["nginx", "-g", "daemon off;"]
19 changes: 19 additions & 0 deletions docker/nginx.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
server {
listen 8080 default_server;
server_name _;
absolute_redirect off;

location / {
rewrite ^/$ /vuepress-solid-template/ permanent;
}

location /vuepress-solid-template/ {
root /usr/share/nginx/html;
try_files $uri $uri/ @router;
index index.html;
}

location @router {
rewrite ^.*$ /index.html last;
}
}
46 changes: 25 additions & 21 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
import { viteBundler } from '@vuepress/bundler-vite'
import { catalogPlugin } from '@vuepress/plugin-catalog'
import { markdownExtPlugin } from '@vuepress/plugin-markdown-ext'
import { markdownImagePlugin } from '@vuepress/plugin-markdown-image'
import { markdownMathPlugin } from '@vuepress/plugin-markdown-math'
import { markdownStylizePlugin } from '@vuepress/plugin-markdown-stylize'
import { shikiPlugin } from '@vuepress/plugin-shiki'
import { slimsearchPlugin } from '@vuepress/plugin-slimsearch'
import { defaultTheme } from '@vuepress/theme-default'
import { slug as slugify } from 'github-slugger'
import process from 'node:process'
import { defineUserConfig } from 'vuepress'
import { mdEnhancePlugin } from 'vuepress-plugin-md-enhance'
import { searchProPlugin } from 'vuepress-plugin-search-pro'
import { getDirname, path } from 'vuepress/utils'

const __dirname = getDirname(import.meta.url)
Expand Down Expand Up @@ -56,25 +58,28 @@ export default defineUserConfig({
},
plugins: [
mdEnhancePlugin({
align: true,
attrs: true,
component: true,
echarts: true,
flowchart: true,
markmap: true,
mermaid: true,
plantuml: true,
demo: true,
delay: 200,
}, false),
slimsearchPlugin({}),
markdownExtPlugin({
breaks: false,
component: true,
footnote: true,
gfm: true,
include: {
resolvePath: (file) => {
if (file.startsWith('@/'))
return file.replace(/^@\//, CURRENT_PATH)
if (file.startsWith('/'))
return file.replace(/^\//, ROOT_PATH.replace(/(?:\\|\/)?$/, '/'))
return file
},
},
linkify: false,
mark: true,
mermaid: true,
stylize: [
linkify: true,
tasklist: true,
vPre: true,
}),
markdownStylizePlugin({
align: true,
attrs: true,
custom: [
{
matcher: '@recommend',
replacer: ({ tag }) => {
Expand All @@ -88,12 +93,11 @@ export default defineUserConfig({
},
},
],
mark: true,
spoiler: false,
sub: true,
sup: true,
tasklist: true,
vPre: true,
}, false),
searchProPlugin({}),
}),
catalogPlugin({}),
markdownImagePlugin({
lazyload: true,
Expand Down
37 changes: 22 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "vuepress-solid-template",
"type": "module",
"version": "0.1.0",
"packageManager": "pnpm@9.13.2",
"packageManager": "pnpm@9.15.1",
"description": "Best Vuepress Template",
"author": "Alex Sun",
"license": "MIT",
Expand All @@ -17,22 +17,29 @@
"docs:clean-dev": "vuepress dev docs --clean-cache"
},
"devDependencies": {
"@types/node": "^22.10.1",
"@vuepress/bundler-vite": "2.0.0-rc.18",
"@vuepress/client": "2.0.0-rc.18",
"@vuepress/plugin-catalog": "2.0.0-rc.61",
"@vuepress/plugin-copy-code": "2.0.0-rc.61",
"@vuepress/plugin-markdown-image": "2.0.0-rc.61",
"@vuepress/plugin-markdown-math": "2.0.0-rc.61",
"@vuepress/plugin-shiki": "2.0.0-rc.61",
"@vuepress/theme-default": "2.0.0-rc.61",
"@types/node": "^22.10.2",
"@vuepress/bundler-vite": "2.0.0-rc.19",
"@vuepress/client": "2.0.0-rc.19",
"@vuepress/plugin-catalog": "2.0.0-rc.66",
"@vuepress/plugin-copy-code": "2.0.0-rc.66",
"@vuepress/plugin-markdown-ext": "2.0.0-rc.66",
"@vuepress/plugin-markdown-image": "2.0.0-rc.66",
"@vuepress/plugin-markdown-math": "2.0.0-rc.66",
"@vuepress/plugin-markdown-stylize": "2.0.0-rc.66",
"@vuepress/plugin-shiki": "2.0.0-rc.66",
"@vuepress/plugin-slimsearch": "2.0.0-rc.67",
"@vuepress/theme-default": "2.0.0-rc.66",
"echarts": "^5.5.1",
"flowchart.ts": "^3.0.1",
"github-slugger": "^2.0.0",
"katex": "^0.16.11",
"katex": "^0.16.18",
"markmap-lib": "^0.17.0",
"markmap-toolbar": "^0.17.0",
"markmap-view": "^0.17.0",
"mermaid": "^11.4.1",
"sass-embedded": "^1.81.1",
"sass-embedded": "^1.83.0",
"vue": "^3.5.13",
"vuepress": "2.0.0-rc.18",
"vuepress-plugin-md-enhance": "2.0.0-rc.59",
"vuepress-plugin-search-pro": "2.0.0-rc.59"
"vuepress": "2.0.0-rc.19",
"vuepress-plugin-md-enhance": "2.0.0-rc.64"
}
}
Loading

0 comments on commit fc73327

Please sign in to comment.