chore: update

This commit is contained in:
2025-07-15 17:28:41 +02:00
parent c7ef1146b3
commit 7c93cd76d9
38 changed files with 6306 additions and 11016 deletions

View File

@@ -10,20 +10,18 @@ interface CategoriesQueryResult {
}
const useCategoriesList = () => {
const { allMarkdownRemark } = useStaticQuery<CategoriesQueryResult>(
graphql`
query CategoriesListQuery {
allMarkdownRemark(
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
group(field: { frontmatter: { category: SELECT } }) {
fieldValue
totalCount
}
const { allMarkdownRemark } = useStaticQuery<CategoriesQueryResult>(graphql`
query CategoriesListQuery {
allMarkdownRemark(
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
group(field: { frontmatter: { category: SELECT } }) {
fieldValue
totalCount
}
}
`
);
}
`);
return allMarkdownRemark.group ?? [];
};

View File

@@ -1,52 +1,50 @@
import { graphql, useStaticQuery } from "gatsby";
const useSiteMetadata = () => {
const { site } = useStaticQuery(
graphql`
query SiteMetaData {
site {
siteMetadata {
author {
bio
name
photo
contacts {
rss
line
email
weibo
gitlab
medium
github
twitter
codepen
youtube
facebook
linkedin
telegram
instagram
soundcloud
phone
}
const { site } = useStaticQuery(graphql`
query SiteMetaData {
site {
siteMetadata {
author {
bio
name
photo
contacts {
rss
line
email
weibo
gitlab
medium
github
twitter
codepen
youtube
facebook
linkedin
telegram
instagram
soundcloud
phone
}
menu {
path
label
}
legalMenu {
path
label
}
url
title
subtitle
copyright
disqusShortname
}
menu {
path
label
}
legalMenu {
path
label
}
url
title
subtitle
copyright
disqusShortname
}
}
`
);
}
`);
return site.siteMetadata;
};

View File

@@ -10,20 +10,18 @@ interface TagsQueryResult {
}
const useTagsList = () => {
const { allMarkdownRemark } = useStaticQuery<TagsQueryResult>(
graphql`
query TagsListQuery {
allMarkdownRemark(
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
group(field: { frontmatter: { tags: SELECT } }) {
fieldValue
totalCount
}
const { allMarkdownRemark } = useStaticQuery<TagsQueryResult>(graphql`
query TagsListQuery {
allMarkdownRemark(
filter: { frontmatter: { template: { eq: "post" }, draft: { ne: true } } }
) {
group(field: { frontmatter: { tags: SELECT } }) {
fieldValue
totalCount
}
}
`
);
}
`);
return allMarkdownRemark.group || [];
};