Skip to content

Commit

Permalink
docs: auto redirect & stats
Browse files Browse the repository at this point in the history
  • Loading branch information
nekomeowww committed Jan 22, 2025
1 parent 498d1c9 commit 71b283d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ export default defineConfig({
// ignore all localhost links
/^https?:\/\/localhost/,
],
head: [
// Proxying Plausible through Netlify | Plausible docs
// https://plausible.io/docs/proxy/guides/netlify
['script', { 'defer': 'true', 'data-domain': 'docs.neuri.dev', 'data-api': '/api/v1/page-external-data/submit', 'src': '/assets/page-external-data/js/script.js' }],
],
themeConfig: {
outline: 'deep',
socialLinks: [
Expand Down
10 changes: 10 additions & 0 deletions docs/public/_redirects
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Plausible.io analytics
#
# Proxying Plausible through Netlify | Plausible docs
# https://plausible.io/docs/proxy/guides/netlify
/assets/page-external-data/js/script.js https://plausible.io/js/script.js 200
/api/v1/page-external-data/submit https://plausible.io/api/event 200

# i18n
/* /pages/en/:splat 301
/* /pages/zh-CN/:splat 301 Language=zh-cn

0 comments on commit 71b283d

Please sign in to comment.