mirror of
https://github.com/sergeyyarkov/yarkov.tech.git
synced 2026-10-11 10:29:21 +03:00
refactor
This commit is contained in:
parent
2f2de872fd
commit
2d8807365d
@ -26,8 +26,9 @@ import { defineConfig } from "astro/config";
|
||||
import { h } from "hastscript";
|
||||
import { toString } from "hast-util-to-string";
|
||||
import { escape } from "html-escaper";
|
||||
import languages from "./src/i18n/languages";
|
||||
|
||||
const createAnchorLabel = (heading) => {
|
||||
const createAnchorLabel = (heading: string) => {
|
||||
const node = h("span.anchor-label", escape(heading));
|
||||
node.properties["is:raw"] = true;
|
||||
return node;
|
||||
@ -41,11 +42,7 @@ export default defineConfig({
|
||||
sitemap({
|
||||
i18n: {
|
||||
defaultLocale: "ru",
|
||||
locales: {
|
||||
ru: "ru",
|
||||
en: "en",
|
||||
de: "de",
|
||||
},
|
||||
locales: Object.fromEntries(Object.keys(languages).map((key) => [key, key])),
|
||||
},
|
||||
}),
|
||||
image(),
|
||||
|
||||
17
package-lock.json
generated
17
package-lock.json
generated
@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "yarkov.tech",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.1",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "yarkov.tech",
|
||||
"version": "0.0.1",
|
||||
"version": "1.0.1",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@astrojs/image": "^0.3.6",
|
||||
@ -14,6 +14,7 @@
|
||||
"@astrojs/rss": "^1.0.0",
|
||||
"@astrojs/sitemap": "^1.0.0",
|
||||
"@astrojs/solid-js": "^1.1.0",
|
||||
"@types/html-escaper": "^3.0.0",
|
||||
"@types/mdx": "^2.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
||||
"@typescript-eslint/parser": "^5.35.1",
|
||||
@ -1078,6 +1079,12 @@
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@types/html-escaper": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/html-escaper/-/html-escaper-3.0.0.tgz",
|
||||
"integrity": "sha512-OcJcvP3Yk8mjYwf/IdXZtTE1tb/u0WF0qa29ER07ZHCYUBZXSN29Z1mBS+/96+kNMGTFUAbSz9X+pHmHpZrTCw==",
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/@types/json-schema": {
|
||||
"version": "7.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||
@ -10373,6 +10380,12 @@
|
||||
"@types/unist": "*"
|
||||
}
|
||||
},
|
||||
"@types/html-escaper": {
|
||||
"version": "3.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@types/html-escaper/-/html-escaper-3.0.0.tgz",
|
||||
"integrity": "sha512-OcJcvP3Yk8mjYwf/IdXZtTE1tb/u0WF0qa29ER07ZHCYUBZXSN29Z1mBS+/96+kNMGTFUAbSz9X+pHmHpZrTCw==",
|
||||
"dev": true
|
||||
},
|
||||
"@types/json-schema": {
|
||||
"version": "7.0.11",
|
||||
"resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.11.tgz",
|
||||
|
||||
@ -24,6 +24,7 @@
|
||||
"@astrojs/rss": "^1.0.0",
|
||||
"@astrojs/sitemap": "^1.0.0",
|
||||
"@astrojs/solid-js": "^1.1.0",
|
||||
"@types/html-escaper": "^3.0.0",
|
||||
"@types/mdx": "^2.0.2",
|
||||
"@typescript-eslint/eslint-plugin": "^5.35.1",
|
||||
"@typescript-eslint/parser": "^5.35.1",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user