-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Roman
committed
Jun 9, 2023
1 parent
823255f
commit 71e6ef3
Showing
18 changed files
with
244 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"title": "Your Search For Better Sleep Ends Here", | ||
"hello": "привіт", | ||
"Roman Rud Blog": "Roman Rud Blog" | ||
"hero_greeting": "Hi", | ||
"hero_description": "From time to time I write articles on topics that interest me :)", | ||
"hero_recent_posts": "Нещодавні пости", | ||
"Roman Rud Blog": "Roman Rud" | ||
} |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
{ | ||
"title": "заголовок", | ||
"hello": "Привет", | ||
"title": "Your Search For Better Sleep Ends Here", | ||
"hero_greeting": "Hi", | ||
"hero_description": "From time to time I write articles on topics that interest me :)", | ||
"hero_recent_posts": "Нещодавні пости", | ||
"Roman Rud Blog": "Roman Rud" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"title": "Das ist der Titel des Blogbeitrags", | ||
"section1": "Dies ist der erste Abschnitt des Blogbeitrags", | ||
"section2": "Dies ist der zweite Abschnitt des Blogbeitrags" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"title": "This is the blog post title", | ||
"section1": "This is the first section of the blog post", | ||
"section2": "This is the second section of the blog post" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
{ | ||
"title": "назва", | ||
"hello": "привіт", | ||
"Roman Rud Blog": "Roman Rud" | ||
"title": "Your Search For Better Sleep Ends Here", | ||
"hero_greeting": "Hi", | ||
"hero_description": "From time to time I write articles on topics that interest me :)", | ||
"hero_recent_posts": "Нещодавні пости", | ||
"Roman Rud Blog": "Roman Rud", | ||
"Блог": "БЛОГГГ" | ||
} |
35 changes: 35 additions & 0 deletions
35
src/@lekoarts/gatsby-theme-minimal-blog-core/templates/homepage-query.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { graphql } from "gatsby" | ||
import HomepageComponent, { Head } from "../../gatsby-theme-minimal-blog/components/homepage" | ||
|
||
export default HomepageComponent | ||
|
||
export { Head } | ||
|
||
export const query = graphql` | ||
query ($formatString: String!, $language: String!) { | ||
allPost(sort: { date: DESC }, limit: 3) { | ||
nodes { | ||
slug | ||
title | ||
date(formatString: $formatString) | ||
excerpt | ||
timeToRead | ||
description | ||
tags { | ||
name | ||
slug | ||
} | ||
} | ||
} | ||
locales: allLocale(filter: { language: { eq: $language } }) { | ||
edges { | ||
node { | ||
ns | ||
data | ||
language | ||
} | ||
} | ||
} | ||
} | ||
`; |
26 changes: 26 additions & 0 deletions
26
src/@lekoarts/gatsby-theme-minimal-blog-core/templates/page-query.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import { graphql } from "gatsby" | ||
import PageComponent, { Head } from "../../gatsby-theme-minimal-blog/components/page" | ||
|
||
export default PageComponent | ||
|
||
export { Head } | ||
|
||
export const query = graphql` | ||
query ($slug: String!, $language: String!) { | ||
page(slug: { eq: $slug }) { | ||
title | ||
slug | ||
excerpt | ||
} | ||
locales: allLocale(filter: { language: { eq: $language } }) { | ||
edges { | ||
node { | ||
ns | ||
data | ||
language | ||
} | ||
} | ||
} | ||
} | ||
` |
41 changes: 41 additions & 0 deletions
41
src/@lekoarts/gatsby-theme-minimal-blog-core/templates/post-query.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import { graphql } from "gatsby" | ||
import PostComponent, { Head } from "../../gatsby-theme-minimal-blog/components/post"; | ||
|
||
export default PostComponent | ||
|
||
export { Head } | ||
|
||
export const query = graphql` | ||
query ($slug: String!, $formatString: String!, $language: String!) { | ||
post(slug: { eq: $slug }) { | ||
slug | ||
title | ||
date(formatString: $formatString) | ||
tags { | ||
name | ||
slug | ||
} | ||
description | ||
canonicalUrl | ||
excerpt | ||
timeToRead | ||
banner { | ||
childImageSharp { | ||
resize(width: 1200, quality: 90) { | ||
src | ||
} | ||
} | ||
} | ||
} | ||
locales: allLocale(filter: { language: { eq: $language } }) { | ||
edges { | ||
node { | ||
ns | ||
data | ||
language | ||
} | ||
} | ||
} | ||
} | ||
` |
35 changes: 35 additions & 0 deletions
35
src/@lekoarts/gatsby-theme-minimal-blog-core/templates/tag-query.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { graphql } from "gatsby" | ||
import TagComponent, { Head } from "../../gatsby-theme-minimal-blog/components/tag" | ||
|
||
export default TagComponent | ||
|
||
export { Head } | ||
|
||
export const query = graphql` | ||
query ($slug: String!, $formatString: String!, $language: String!) { | ||
allPost(sort: { date: DESC }, filter: { tags: { elemMatch: { slug: { eq: $slug } } } }) { | ||
nodes { | ||
slug | ||
title | ||
date(formatString: $formatString) | ||
excerpt | ||
timeToRead | ||
description | ||
tags { | ||
name | ||
slug | ||
} | ||
} | ||
} | ||
locales: allLocale(filter: { language: { eq: $language } }) { | ||
edges { | ||
node { | ||
ns | ||
data | ||
language | ||
} | ||
} | ||
} | ||
} | ||
` |
27 changes: 27 additions & 0 deletions
27
src/@lekoarts/gatsby-theme-minimal-blog-core/templates/tags-query.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import { graphql } from "gatsby" | ||
import TagsComponent, { Head } from "../../gatsby-theme-minimal-blog/components/tags" | ||
|
||
export default TagsComponent | ||
|
||
export { Head } | ||
|
||
export const query = graphql` | ||
query ($language: String!) { | ||
allPost { | ||
group(field: tags___name) { | ||
fieldValue | ||
totalCount | ||
} | ||
} | ||
locales: allLocale(filter: { language: { eq: $language } }) { | ||
edges { | ||
node { | ||
ns | ||
data | ||
language | ||
} | ||
} | ||
} | ||
} | ||
` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
src/@lekoarts/gatsby-theme-minimal-blog/components/translate-blog.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import React from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
|
||
type TranslateProps = { | ||
id: string; | ||
}; | ||
|
||
const Translate: React.FC<TranslateProps> = ({ id }) => { | ||
const { t } = useTranslation(); | ||
return <>{t(id)}</>; | ||
}; | ||
|
||
export default Translate; |