@@ -32,9 +31,9 @@ const {
@@ -43,7 +42,7 @@ const {
}
- --- {"просмотров"}
+ --- {t("article.views")}
diff --git a/src/components/BaseHead.astro b/src/components/BaseHead.astro
index 73c3c72..73ea506 100644
--- a/src/components/BaseHead.astro
+++ b/src/components/BaseHead.astro
@@ -1,6 +1,8 @@
---
import "@styles/global.scss";
+import siteconfig from "siteconfig.json";
import { SITE_METADATA } from "@root/constants";
+import YaMetrika from "./Analytics/YaMetrika.astro";
export interface Props {
title?: string;
@@ -10,6 +12,7 @@ export interface Props {
const canonicalURL = new URL(Astro.url.pathname, Astro.site);
const { title, description } = Astro.props;
+const isDev = import.meta.env.DEV;
---
@@ -72,5 +75,6 @@ const { title, description } = Astro.props;
-
+
+ {!isDev && siteconfig?.ymCounter && }
diff --git a/src/quicklink.js b/src/quicklink.js
new file mode 100644
index 0000000..7294f2e
--- /dev/null
+++ b/src/quicklink.js
@@ -0,0 +1,5 @@
+import { listen } from "quicklink/dist/quicklink.mjs";
+window.addEventListener("load", () => {
+ listen({ el: document.querySelector("body > header") });
+ listen({ el: document.querySelector("body > main article header") });
+});