File tree 2 files changed +6
-1
lines changed
2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -5,15 +5,18 @@ import { useBlogPost } from '@docusaurus/theme-common/internal'
5
5
6
6
export default function BlogPostItemWrapper ( props ) {
7
7
const { metadata, isBlogPostPage } = useBlogPost ( ) ;
8
- const { frontMatter } = metadata ;
8
+ const { frontMatter, permalink } = metadata ;
9
9
const { disable_comments } = frontMatter ;
10
10
11
+ const hitUrl = `https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=${ encodeURI ( window . location . href ) } &count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=true` ;
12
+
11
13
return (
12
14
< >
13
15
< BlogPostItem { ...props } />
14
16
{ ( ! disable_comments && isBlogPostPage ) && (
15
17
< >
16
18
< br />
19
+ < img src = { hitUrl } />
17
20
< Giscus />
18
21
</ >
19
22
) }
Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export default function DocItemLayout({ children }) {
36
36
const { metadata } = useDoc ( ) ;
37
37
const { unlisted, frontMatter, slug } = metadata ;
38
38
let { disable_comments } = frontMatter ;
39
+ const hitUrl = `https://hits.seeyoufarm.com/api/count/incr/badge.svg?url=${ encodeURI ( window . location . href ) } &count_bg=%2379C83D&title_bg=%23555555&icon=&icon_color=%23E7E7E7&title=hits&edge_flat=true` ;
39
40
40
41
if ( slug . includes ( "/reference/" ) ) {
41
42
// Disable comments for all library reference pages
@@ -57,6 +58,7 @@ export default function DocItemLayout({ children }) {
57
58
< >
58
59
< br />
59
60
< br />
61
+ < img src = { hitUrl } />
60
62
< Giscus />
61
63
</ >
62
64
) }
You can’t perform that action at this time.
0 commit comments