mirror of
https://github.com/10h30/astroplate.git
synced 2026-06-05 15:08:00 +09:00
Added the lang attribute to the tag
This commit is contained in:
+21
-19
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "astroplate",
|
||||
"version": "4.0.0",
|
||||
"version": "4.0.1",
|
||||
"description": "Astro and Tailwindcss boilerplate",
|
||||
"author": "zeon.studio",
|
||||
"license": "MIT",
|
||||
@@ -10,52 +10,54 @@
|
||||
"build": "yarn generate-json && astro build",
|
||||
"preview": "astro preview",
|
||||
"format": "prettier -w ./src",
|
||||
"check": "astro check",
|
||||
"generate-json": "node scripts/jsonGenerator.js",
|
||||
"remove-darkmode": "node scripts/removeDarkmode.js && yarn format",
|
||||
"remove-multilang": "node scripts/removeMultilang.js && yarn format"
|
||||
},
|
||||
"dependencies": {
|
||||
"@astrojs/mdx": "^3.1.3",
|
||||
"@astrojs/react": "^3.6.1",
|
||||
"@astrojs/check": "^0.9.3",
|
||||
"@astrojs/mdx": "^3.1.4",
|
||||
"@astrojs/react": "^3.6.2",
|
||||
"@astrojs/rss": "^4.0.7",
|
||||
"@astrojs/sitemap": "^3.1.6",
|
||||
"@astrojs/tailwind": "^5.1.0",
|
||||
"astro": "^4.12.3",
|
||||
"astro": "^4.14.5",
|
||||
"astro-auto-import": "^0.4.2",
|
||||
"astro-font": "^0.0.81",
|
||||
"astro-font": "^0.1.81",
|
||||
"date-fns": "^3.6.0",
|
||||
"disqus-react": "^1.1.5",
|
||||
"github-slugger": "^2.0.0",
|
||||
"gray-matter": "^4.0.3",
|
||||
"marked": "^13.0.3",
|
||||
"marked": "^14.1.0",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"prettier-plugin-tailwindcss": "^0.6.6",
|
||||
"prop-types": "^15.8.1",
|
||||
"react": "^18.3.1",
|
||||
"react-dom": "^18.3.1",
|
||||
"react-icons": "^5.2.1",
|
||||
"react-icons": "^5.3.0",
|
||||
"react-lite-youtube-embed": "^2.4.0",
|
||||
"remark-collapse": "^0.1.2",
|
||||
"remark-toc": "^9.0.0",
|
||||
"swiper": "^11.1.8"
|
||||
"swiper": "^11.1.10"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@tailwindcss/forms": "^0.5.7",
|
||||
"@tailwindcss/typography": "^0.5.13",
|
||||
"@tailwindcss/typography": "^0.5.14",
|
||||
"@types/marked": "^5.0.2",
|
||||
"@types/node": "22.0.0",
|
||||
"@types/react": "18.3.3",
|
||||
"@types/node": "22.5.0",
|
||||
"@types/react": "18.3.4",
|
||||
"@types/react-dom": "18.3.0",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"eslint": "^9.8.0",
|
||||
"postcss": "^8.4.40",
|
||||
"autoprefixer": "^10.4.20",
|
||||
"eslint": "^9.9.1",
|
||||
"postcss": "^8.4.41",
|
||||
"prettier": "^3.3.3",
|
||||
"prettier-plugin-astro": "^0.14.1",
|
||||
"prettier-plugin-tailwindcss": "^0.6.5",
|
||||
"prettier-plugin-tailwindcss": "^0.6.6",
|
||||
"sass": "^1.77.8",
|
||||
"sharp": "0.33.4",
|
||||
"sharp": "0.33.5",
|
||||
"tailwind-bootstrap-grid": "^5.1.0",
|
||||
"tailwindcss": "^3.4.7",
|
||||
"typescript": "5.5.4"
|
||||
"tailwindcss": "^3.4.10",
|
||||
"typescript": "^5.5.4"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ const language = lang || getLangFromUrl(Astro.url);
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
<html lang={lang}>
|
||||
<html lang={language}>
|
||||
<head>
|
||||
<!-- favicon -->
|
||||
<link rel="shortcut icon" href={config.site.favicon} />
|
||||
@@ -111,7 +111,7 @@ const language = lang || getLangFromUrl(Astro.url);
|
||||
<meta
|
||||
name="description"
|
||||
content={plainify(
|
||||
description ? description : config.metadata.meta_description
|
||||
description ? description : config.metadata.meta_description,
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -124,7 +124,7 @@ const language = lang || getLangFromUrl(Astro.url);
|
||||
<meta
|
||||
property="og:title"
|
||||
content={plainify(
|
||||
meta_title ? meta_title : title ? title : config.site.title
|
||||
meta_title ? meta_title : title ? title : config.site.title,
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -132,7 +132,7 @@ const language = lang || getLangFromUrl(Astro.url);
|
||||
<meta
|
||||
property="og:description"
|
||||
content={plainify(
|
||||
description ? description : config.metadata.meta_description
|
||||
description ? description : config.metadata.meta_description,
|
||||
)}
|
||||
/>
|
||||
<meta property="og:type" content="website" />
|
||||
@@ -145,7 +145,7 @@ const language = lang || getLangFromUrl(Astro.url);
|
||||
<meta
|
||||
name="twitter:title"
|
||||
content={plainify(
|
||||
meta_title ? meta_title : title ? title : config.site.title
|
||||
meta_title ? meta_title : title ? title : config.site.title,
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -153,7 +153,7 @@ const language = lang || getLangFromUrl(Astro.url);
|
||||
<meta
|
||||
name="twitter:description"
|
||||
content={plainify(
|
||||
description ? description : config.metadata.meta_description
|
||||
description ? description : config.metadata.meta_description,
|
||||
)}
|
||||
/>
|
||||
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
---
|
||||
import config from "@/config/config.json";
|
||||
|
||||
const {
|
||||
theme_switcher,
|
||||
default_theme,
|
||||
}: { theme_switcher: boolean; default_theme: string } = config.settings;
|
||||
const { theme_switcher }: { theme_switcher: boolean; default_theme: string } =
|
||||
config.settings;
|
||||
const { className }: { className?: string } = Astro.props;
|
||||
---
|
||||
|
||||
@@ -49,7 +47,7 @@ const { className }: { className?: string } = Astro.props;
|
||||
const matchMedia = window.matchMedia("(prefers-color-scheme: dark)");
|
||||
|
||||
matchMedia.addEventListener("change", () =>
|
||||
toggleTheme(document.querySelectorAll("[data-theme-switcher]"))
|
||||
toggleTheme(document.querySelectorAll("[data-theme-switcher]")),
|
||||
);
|
||||
|
||||
function toggleTheme(themeSwitch: NodeListOf<Element>) {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
import Logo from "@/components/Logo.astro";
|
||||
import ThemeSwitcher from "@/components/ThemeSwitcher.astro";
|
||||
import config from "@/config/config.json";
|
||||
import languages from "@/config/language.json";
|
||||
import LanguageSwitcher from "@/helpers/LanguageSwitcher";
|
||||
import {
|
||||
getLangFromUrl,
|
||||
@@ -64,7 +63,7 @@ if (disabledLanguages.includes(lang)) {
|
||||
class={`nav-link inline-flex items-center ${
|
||||
menu.children
|
||||
?.map(({ url }: { url: string }) =>
|
||||
slugSelector(url, lang)
|
||||
slugSelector(url, lang),
|
||||
)
|
||||
.includes(pathname)
|
||||
? "active"
|
||||
|
||||
Reference in New Issue
Block a user