Skip to content

Commit

Permalink
add ad
Browse files Browse the repository at this point in the history
  • Loading branch information
EzrealJ committed Apr 23, 2023
1 parent 506990a commit 6335a91
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 0 deletions.
14 changes: 14 additions & 0 deletions docs/.vuepress/client.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
// .vuepress/client.js
import { defineClientConfig } from "@vuepress/client";
import Ad from "./components/ad.vue";

export default defineClientConfig({
setup() {
// do some initialization
},
rootComponents: [Ad],
enhance({ app, router, siteData }) {
// register Ad as a global component
app.component("Ad", Ad);
},
});
12 changes: 12 additions & 0 deletions docs/.vuepress/components/ad.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<template>
<div
class="wwads-cn wwads-vertical wwads-sticky"
data-id="233"
style="max-width: 180px"
></div>
</template>
<script>
export default {
name: "ad",
};
</script>
13 changes: 13 additions & 0 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { defineUserConfig } from "vuepress";
import { path } from "@vuepress/utils";
import { defaultTheme } from "@vuepress/theme-default";
import { navbarZh, sidebarZh } from "./configs/index.js";
import { prismjsPlugin } from "@vuepress/plugin-prismjs";
Expand All @@ -10,6 +11,17 @@ export default defineUserConfig({
title: "WebApiClient",
description: "声明,调用!",
base: "/", // 或者 '/'
head: [
[
"script",
{
src: "https://cdn.wwads.cn/js/makemoney.js",
type: "text/javascript",
charset: "UTF-8",
async: true,
},
],
],
// configure default theme
theme: defaultTheme({
logo: "/logo.png",
Expand Down Expand Up @@ -79,4 +91,5 @@ export default defineUserConfig({
// 配置项
}),
],
clientConfigFile: path.resolve(__dirname, "./client.js"),
});
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
},
"homepage": "https://github.com/EzrealJ/WebApiClientWiki#readme",
"devDependencies": {
"@vuepress/plugin-register-components": "^2.0.0-beta.61",
"vuepress": "^2.0.0-beta.61"
},
"directories": {
Expand Down
9 changes: 9 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,15 @@
"@vuepress/core" "2.0.0-beta.61"
prismjs "^1.29.0"

"@vuepress/plugin-register-components@^2.0.0-beta.61":
version "2.0.0-beta.61"
resolved "https://registry.yarnpkg.com/@vuepress/plugin-register-components/-/plugin-register-components-2.0.0-beta.61.tgz#b7b6b2fe81c70e40e3fe965d18fef76c315941e5"
integrity sha512-3sbJbiY8pZ3/M4TMfyhIn+aGAlXz+xR57I5k4NQnekzJjDxSiCmaet6FjUeUChX6/eREkVBlitfDvXq4t45RKw==
dependencies:
"@vuepress/core" "2.0.0-beta.61"
"@vuepress/utils" "2.0.0-beta.61"
chokidar "^3.5.3"

"@vuepress/[email protected]":
version "2.0.0-beta.61"
resolved "https://registry.yarnpkg.com/@vuepress/plugin-theme-data/-/plugin-theme-data-2.0.0-beta.61.tgz#f95a56c8ffb4cca8b559b4cf81ef665fe07523aa"
Expand Down

0 comments on commit 6335a91

Please sign in to comment.