Skip to content

Commit

Permalink
Update gtat config
Browse files Browse the repository at this point in the history
  • Loading branch information
maks-oleksyuk committed Oct 20, 2024
1 parent b10b372 commit ea0a02f
Show file tree
Hide file tree
Showing 7 changed files with 325 additions and 318 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
VITE_GTAG='G-xxxxxxxxxx'
2 changes: 2 additions & 0 deletions .github/workflows/cd-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@ jobs:

- name: ⚡️ Build site with VitePress
run: pnpm notes:build
env:
VITE_GTAG: ${{ vars.VITE_GTAG }}

- name: 📤 Upload artifact
uses: actions/upload-pages-artifact@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 🔁 CI | ⚡️ VitePress
name: 🔄 CI | ⚡️ VitePress

on:
push:
Expand All @@ -18,7 +18,7 @@ on:
workflow_dispatch:

concurrency:
group: pages
group: ci
cancel-in-progress: false

jobs:
Expand Down
1 change: 1 addition & 0 deletions .vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ export default defineConfig({
},
},
vite: {
envDir: './../',
ssr: {
noExternal: ['@nolebase/vitepress-plugin-enhanced-readabilities'],
},
Expand Down
4 changes: 3 additions & 1 deletion .vitepress/theme/index.mts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ import './styles/components/vp-doc.css';
import './styles/components/back-to-top.css';
import '@nolebase/vitepress-plugin-enhanced-readabilities/client/style.css';

console.log(import.meta.env);

export default {
extends: DefaultTheme,
Layout: () => {
Expand All @@ -21,6 +23,6 @@ export default {
enhanceApp({ app }) {
enhanceAppWithTabs(app);
vitepressBackToTop({ threshold: 300 });
googleAnalytics({ id: 'G-L5YJQ5Q3TD' });
googleAnalytics({ id: import.meta.env.VITE_GTAG });
},
};
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@
"lint:format:fix": "prettier -wl ./ '!pnpm-lock.yaml' --cache"
},
"devDependencies": {
"@nolebase/vitepress-plugin-enhanced-readabilities": "2.5.0",
"@nolebase/vitepress-plugin-enhanced-readabilities": "2.6.1",
"prettier": "^3.3.3",
"vitepress": "^1.3.4",
"vitepress": "^1.4.1",
"vitepress-plugin-back-to-top": "^1.0.1",
"vitepress-plugin-google-analytics": "^1.0.2",
"vitepress-plugin-tabs": "^0.5.0",
"vitepress-sidebar": "^1.27.1",
"vue": "^3.5.10"
"vue": "^3.5.12"
},
"packageManager": "pnpm@9.11.0",
"packageManager": "pnpm@9.12.2",
"engines": {
"pnpm": ">=9",
"node": ">=20"
Expand Down
623 changes: 312 additions & 311 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

0 comments on commit ea0a02f

Please sign in to comment.