From 3c7f06997076869fce122b8d4494362e9487dcd9 Mon Sep 17 00:00:00 2001 From: "Krasnikov.pro" Date: Fri, 22 Jul 2022 23:27:12 +0300 Subject: [PATCH] modified: components/Head.tsx modified: package-lock.json modified: package.json modified: pages/_app.tsx modified: pages/_document.tsx modified: pages/about.tsx new file: public/robots.txt new file: public/sitemap.xml modified: yarn.lock --- .history/.env_20220613182216.local | 0 .history/.env_20220613182253.local | 12 ------- .history/.env_20220613182355.local | 12 ------- .history/.env_20220613182359.local | 12 ------- .history/.env_20220613183941.local | 12 ------- components/Head.tsx | 4 +++ package-lock.json | 40 ++++++++++++++--------- package.json | 1 + pages/_app.tsx | 10 +++--- pages/_document.tsx | 2 ++ pages/about.tsx | 8 ++--- public/robots.txt | 6 ++++ public/sitemap.xml | 51 ++++++++++++++++++++++++++++++ yarn.lock | 13 +++++--- 14 files changed, 107 insertions(+), 76 deletions(-) delete mode 100644 .history/.env_20220613182216.local delete mode 100644 .history/.env_20220613182253.local delete mode 100644 .history/.env_20220613182355.local delete mode 100644 .history/.env_20220613182359.local delete mode 100644 .history/.env_20220613183941.local create mode 100644 public/robots.txt create mode 100644 public/sitemap.xml diff --git a/.history/.env_20220613182216.local b/.history/.env_20220613182216.local deleted file mode 100644 index e69de29..0000000 diff --git a/.history/.env_20220613182253.local b/.history/.env_20220613182253.local deleted file mode 100644 index 61ab8a7..0000000 --- a/.history/.env_20220613182253.local +++ /dev/null @@ -1,12 +0,0 @@ -// .env.local - -USER_="crapshr6_robotop" -HOST="crapshr6.beget.tech" -DATABASE="crapshr6_pizza" -PASSWORD="M2PJD&wG" - -MAILSERVER="smtp.beget.com" -MAILNAME="service@vsst.su" -MAILPASS = "&ekS0NPD" - -SITE="http://localhost:3000/api/" \ No newline at end of file diff --git a/.history/.env_20220613182355.local b/.history/.env_20220613182355.local deleted file mode 100644 index e1270af..0000000 --- a/.history/.env_20220613182355.local +++ /dev/null @@ -1,12 +0,0 @@ -// .env.local - -USER_="crapshr6_robotop" -HOST="crapshr6.beget.tech" -DATABASE="crapshr6_robotop" -PASSWORD="5NC*%v0v" - -MAILSERVER="smtp.beget.com" -MAILNAME="service@vsst.su" -MAILPASS = "&ekS0NPD" - -SITE="http://localhost:3000/api/" \ No newline at end of file diff --git a/.history/.env_20220613182359.local b/.history/.env_20220613182359.local deleted file mode 100644 index e1270af..0000000 --- a/.history/.env_20220613182359.local +++ /dev/null @@ -1,12 +0,0 @@ -// .env.local - -USER_="crapshr6_robotop" -HOST="crapshr6.beget.tech" -DATABASE="crapshr6_robotop" -PASSWORD="5NC*%v0v" - -MAILSERVER="smtp.beget.com" -MAILNAME="service@vsst.su" -MAILPASS = "&ekS0NPD" - -SITE="http://localhost:3000/api/" \ No newline at end of file diff --git a/.history/.env_20220613183941.local b/.history/.env_20220613183941.local deleted file mode 100644 index a1d837d..0000000 --- a/.history/.env_20220613183941.local +++ /dev/null @@ -1,12 +0,0 @@ -// .env.local - -USER_="crapshr6_robotop" -HOST="crapshr6.beget.tech" -DATABASE="crapshr6_robotop" -PASSWORD="sJ9&alNk" - -MAILSERVER="smtp.beget.com" -MAILNAME="service@vsst.su" -MAILPASS = "&ekS0NPD" - -SITE="http://localhost:3000/api/" \ No newline at end of file diff --git a/components/Head.tsx b/components/Head.tsx index 09fe080..8b69669 100644 --- a/components/Head.tsx +++ b/components/Head.tsx @@ -3,6 +3,10 @@ import { useRouter } from 'next/router'; import React from 'react'; import { MetaProps } from '../types/layout'; +export type WithYandexMetrikaProps = { + children: React.ReactNode; +} + export const WEBSITE_HOST_URL = 'https://robotop.krasnikov.pro/'; const Head = ({ customMeta }: { customMeta?: MetaProps }): JSX.Element => { diff --git a/package-lock.json b/package-lock.json index b7dbb62..c666f5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -27,6 +27,7 @@ "react-hook-form": "^7.33.1", "react-redux": "^8.0.2", "react-toastify": "^9.0.5", + "react-yandex-metrika": "^2.6.0", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", "remark-code-titles": "^0.1.2", @@ -9907,7 +9908,6 @@ "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, "engines": { "node": ">=0.10.0" } @@ -10447,7 +10447,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "dependencies": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -10457,8 +10456,7 @@ "node_modules/prop-types/node_modules/react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" }, "node_modules/property-information": { "version": "6.1.1", @@ -10629,6 +10627,15 @@ "react-dom": ">=16" } }, + "node_modules/react-yandex-metrika": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/react-yandex-metrika/-/react-yandex-metrika-2.6.0.tgz", + "integrity": "sha512-8K4wExsNZtY3DTxh1G8a+zWH9Pg8fw23MJcoJ4I/562qrHRnh7L5nteq3lnNL58dnNQbuuHIRoGgMjIo+r1GjA==", + "peerDependencies": { + "prop-types": "*", + "react": "*" + } + }, "node_modules/read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -12048,9 +12055,9 @@ } }, "node_modules/terser": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.1.tgz", - "integrity": "sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", + "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", "peer": true, "dependencies": { "@jridgewell/source-map": "^0.3.2", @@ -20072,8 +20079,7 @@ "object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true + "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==" }, "object-hash": { "version": "3.0.0", @@ -20424,7 +20430,6 @@ "version": "15.8.1", "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz", "integrity": "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==", - "dev": true, "requires": { "loose-envify": "^1.4.0", "object-assign": "^4.1.1", @@ -20434,8 +20439,7 @@ "react-is": { "version": "16.13.1", "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", - "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", - "dev": true + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" } } }, @@ -20536,6 +20540,12 @@ "clsx": "^1.1.1" } }, + "react-yandex-metrika": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/react-yandex-metrika/-/react-yandex-metrika-2.6.0.tgz", + "integrity": "sha512-8K4wExsNZtY3DTxh1G8a+zWH9Pg8fw23MJcoJ4I/562qrHRnh7L5nteq3lnNL58dnNQbuuHIRoGgMjIo+r1GjA==", + "requires": {} + }, "read-cache": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/read-cache/-/read-cache-1.0.0.tgz", @@ -21546,9 +21556,9 @@ } }, "terser": { - "version": "5.14.1", - "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.1.tgz", - "integrity": "sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ==", + "version": "5.14.2", + "resolved": "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz", + "integrity": "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==", "peer": true, "requires": { "@jridgewell/source-map": "^0.3.2", diff --git a/package.json b/package.json index 442eede..97ac6bf 100644 --- a/package.json +++ b/package.json @@ -43,6 +43,7 @@ "react-hook-form": "^7.33.1", "react-redux": "^8.0.2", "react-toastify": "^9.0.5", + "react-yandex-metrika": "^2.6.0", "rehype-autolink-headings": "^6.1.1", "rehype-slug": "^5.0.1", "remark-code-titles": "^0.1.2", diff --git a/pages/_app.tsx b/pages/_app.tsx index f1ceb3a..60ef39b 100644 --- a/pages/_app.tsx +++ b/pages/_app.tsx @@ -7,11 +7,11 @@ import { store } from '../redux/store'; const MyApp = ({ Component, pageProps }: AppProps): JSX.Element => { return ( - - - - - + + + + + ); }; diff --git a/pages/_document.tsx b/pages/_document.tsx index abe903b..e4f75b6 100644 --- a/pages/_document.tsx +++ b/pages/_document.tsx @@ -1,4 +1,5 @@ import Document, { Head, Html, Main, NextScript } from 'next/document'; +import { YMInitializer } from 'react-yandex-metrika'; class MyDocument extends Document { render(): JSX.Element { @@ -8,6 +9,7 @@ class MyDocument extends Document {
+ ); diff --git a/pages/about.tsx b/pages/about.tsx index 7177ebc..dde2e01 100644 --- a/pages/about.tsx +++ b/pages/about.tsx @@ -8,10 +8,10 @@ export const About = (): JSX.Element => { title: 'О нас', }} > -

РоботТоп

-

Мы команда робототехников школы 103 города Краснодар. С 2006 года занимаемся робототехникой. В 2022 году проводим первый Краевой - робототехнический фестиваль на базе школы 103 -

+

РоботТоп

+

Мы команда робототехников школы № 103 города Краснодар.

+

С 2006 года занимаемся робототехникой.

+

В 2022 году проводим первый Краевой робототехнический фестиваль на базе школы 103

); }; diff --git a/public/robots.txt b/public/robots.txt new file mode 100644 index 0000000..66ad72d --- /dev/null +++ b/public/robots.txt @@ -0,0 +1,6 @@ +Sitemap: https://robotop.krasnikov.pro/sitemap.xml + +User-agent: * +Allow: /* + +Disallow: /api/* \ No newline at end of file diff --git a/public/sitemap.xml b/public/sitemap.xml new file mode 100644 index 0000000..fb01a7e --- /dev/null +++ b/public/sitemap.xml @@ -0,0 +1,51 @@ + + + + https://robotop.krasnikoc.pro + 2022-06-20 + monthly + 0.8 + + + https://robotop.krasnikoc.pro + 2022-07-20 + monthly + 0.8 + + + https://robotop.krasnikov.pro/posts/regulations + 2022-07-20 + monthly + 0.8 + + + https://robotop.krasnikov.pro/registration + 2022-07-20 + monthly + 0.8 + + + https://robotop.krasnikov.pro/posts/festival-schedule + 2022-07-20 + monthly + 0.8 + + + https://robotop.krasnikov.pro/posts/task-completion-examples + 2022-07-20 + monthly + 0.8 + + + https://robotop.krasnikov.pro/contacts + 2022-07-20 + monthly + 0.8 + + + https://robotop.krasnikov.pro/about + 2022-07-20 + monthly + 0.8 + + diff --git a/yarn.lock b/yarn.lock index 72e95a6..7d745dd 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4897,7 +4897,7 @@ "kleur" "^3.0.3" "sisteransi" "^1.0.5" -"prop-types@^15.8.1": +"prop-types@*", "prop-types@^15.8.1": "integrity" "sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==" "resolved" "https://registry.npmjs.org/prop-types/-/prop-types-15.8.1.tgz" "version" "15.8.1" @@ -4995,6 +4995,11 @@ dependencies: "clsx" "^1.1.1" +"react-yandex-metrika@^2.6.0": + "integrity" "sha512-8K4wExsNZtY3DTxh1G8a+zWH9Pg8fw23MJcoJ4I/562qrHRnh7L5nteq3lnNL58dnNQbuuHIRoGgMjIo+r1GjA==" + "resolved" "https://registry.npmjs.org/react-yandex-metrika/-/react-yandex-metrika-2.6.0.tgz" + "version" "2.6.0" + "react@*", "react@^16 || ^17 || ^18", "react@^16.8 || ^17.0 || ^18.0", "react@^16.8.0 || ^17 || ^18", "react@^16.8.0 || ^17.0.0 || ^18.0.0", "react@^16.9.0 || ^17.0.0 || ^18", "react@^17.0.2 || ^18.0.0-0", "react@^18.0.0", "react@^18.2.0", "react@>= 16", "react@>= 16.8.0 || 17.x.x || ^18.0.0-0", "react@>=16", "react@>=16.x <=18.x", "react@>=18.0.0": "integrity" "sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==" "resolved" "https://registry.npmjs.org/react/-/react-18.2.0.tgz" @@ -5674,9 +5679,9 @@ "terser" "^5.7.2" "terser@^5.7.2": - "integrity" "sha512-+ahUAE+iheqBTDxXhTisdA8hgvbEG1hHOQ9xmNjeUJSoi6DU/gMrKNcfZjHkyY6Alnuyc+ikYJaxxfHkT3+WuQ==" - "resolved" "https://registry.npmjs.org/terser/-/terser-5.14.1.tgz" - "version" "5.14.1" + "integrity" "sha512-oL0rGeM/WFQCUd0y2QrWxYnq7tfSuKBiqTjRPWrRgB46WD/kiwHwF8T23z78H6Q6kGCuuHcPB+KULHRdxvVGQA==" + "resolved" "https://registry.npmjs.org/terser/-/terser-5.14.2.tgz" + "version" "5.14.2" dependencies: "@jridgewell/source-map" "^0.3.2" "acorn" "^8.5.0"