Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
G
Gatsby Theme Onegeo
Manage
Activity
Members
Plan
Redmine
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OneGeo Suite
Libs
Gatsby Theme Onegeo
Commits
c20f30d6
Commit
c20f30d6
authored
2 years ago
by
Tojo Andrianomentsoaniaina
Committed by
Julien MARGAIL
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Feat/layout
parent
39153a30
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/layouts/layout.tsx
+12
-6
12 additions, 6 deletions
src/layouts/layout.tsx
src/layouts/seo.tsx
+61
-62
61 additions, 62 deletions
src/layouts/seo.tsx
src/pages-doc/doc/core/menu.tsx
+1
-1
1 addition, 1 deletion
src/pages-doc/doc/core/menu.tsx
with
74 additions
and
69 deletions
src/layouts/layout.tsx
+
12
−
6
View file @
c20f30d6
...
...
@@ -18,11 +18,17 @@ interface Props {
* @returns {JSX.Element} The complete page
*/
const
Layout
=
({
children
}:
Props
):
JSX
.
Element
=>
{
const
query
=
useStaticQuery
(
graphql
`
query LayoutQuery {
site {
siteMetadata {
icon
const
data
=
useStaticQuery
(
graphql
`
query {
directus {
site {
icon {
id
imageFile {
id
publicURL
}
}
}
}
}
...
...
@@ -33,7 +39,7 @@ const Layout = ({ children }: Props): JSX.Element => {
<
Helmet
>
<
link
rel
=
"icon"
href
=
{
query
.
site
.
siteMetadata
.
icon
}
href
=
{
data
.
directus
.
site
?.
icon
?.
imageFile
?.
publicURL
}
type
=
"image/png"
/>
</
Helmet
>
...
...
This diff is collapsed.
Click to expand it.
src/layouts/seo.tsx
+
61
−
62
View file @
c20f30d6
import
React
from
"
react
"
;
import
{
Helmet
}
from
"
react-helmet
"
;
import
{
useStaticQuery
,
graphql
}
from
"
gatsby
"
;
import
React
from
"
react
"
import
{
Helmet
}
from
"
react-helmet
"
import
{
useStaticQuery
,
graphql
}
from
"
gatsby
"
const
SEO
=
()
=>
{
const
query
=
useStaticQuery
(
graphql
`
query SeoQuery {
site {
siteMetadata {
title
description
author
theme
}
const
data
=
useStaticQuery
(
graphql
`
query {
directus {
site {
id
theme
title
description
author
}
}
}
}
`
);
const
dt
=
query
.
site
.
siteMetadata
;
`
)
const
dt
=
data
.
directus
.
site
return
(
<
Helmet
htmlAttributes
=
{
{
lang
:
`fr`
,
"
data-theme
"
:
dt
.
theme
,
}
}
title
=
{
dt
.
title
}
meta
=
{
[
{
name
:
`description`
,
content
:
dt
.
description
,
},
{
property
:
`og:title`
,
content
:
dt
.
title
,
},
{
property
:
`og:description`
,
content
:
dt
.
description
,
},
{
property
:
`og:type`
,
content
:
`website`
,
},
{
name
:
`twitter:card`
,
content
:
`summary`
,
},
{
name
:
`twitter:creator`
,
content
:
dt
.
author
,
},
{
name
:
`twitter:title`
,
content
:
dt
.
title
,
},
{
name
:
`twitter:description`
,
content
:
dt
.
description
,
},
]
}
/>
)
;
}
;
return
(
<
Helmet
htmlAttributes
=
{
{
lang
:
`fr`
,
"
data-theme
"
:
dt
?
.
theme
,
}
}
title
=
{
dt
?
.
title
}
meta
=
{
[
{
name
:
`description`
,
content
:
dt
?
.
description
,
},
{
property
:
`og:title`
,
content
:
dt
?
.
title
,
},
{
property
:
`og:description`
,
content
:
dt
?
.
description
,
},
{
property
:
`og:type`
,
content
:
`website`
,
},
{
name
:
`twitter:card`
,
content
:
`summary`
,
},
{
name
:
`twitter:creator`
,
content
:
dt
?
.
author
,
},
{
name
:
`twitter:title`
,
content
:
dt
?
.
title
,
},
{
name
:
`twitter:description`
,
content
:
dt
?
.
description
,
},
]
}
/>
)
}
export
default
SEO
;
export
default
SEO
This diff is collapsed.
Click to expand it.
src/pages-doc/doc/core/menu.tsx
+
1
−
1
View file @
c20f30d6
...
...
@@ -71,7 +71,7 @@ const menu = () => {
<
div
>
<
h3
className
=
"underline underline-offset-1"
>
Menu Footer
</
h3
>
<
div
className
=
"flex gap-6 m-4"
>
<
Menu
name
=
'Footer'
/>
<
Menu
name
=
'Footer'
className
=
"menu menu-horizontal p-0"
/>
</
div
>
</
div
>
</
Content
>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment