File size: 646 Bytes
96dd062
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
---
import { commentConfig } from "@/config";

interface Props {
	path: string;
}

const config = {
	...commentConfig.waline,
	el: "#waline",
	path: Astro.props.path,
	dark: "html.dark",
	wordLimit: ["2", "300"],
	...(commentConfig.waline?.visitorCount ? { pageview: true } : {}),
};
---
<!-- Waline -->
<div class="relative w-full">
  <div id="waline"></div>
  <link rel="stylesheet" href="https://unpkg.com/@waline/client@v3/dist/waline.css" />
  <script type="module" is:inline define:vars={{ config }}>
    import { init } from 'https://unpkg.com/@waline/client@v3/dist/waline.js';
    init(config);
  </script>
</div>