Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(Meta): added ld+json markup #64

Merged
merged 5 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion components/grid-info.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="block">
<div class="grid__block">
<h2 class="title">Open Source</h2>
<div class="text">Исходный код открыт<br/>для исследования и обслуживания</div>
<div class="text">Исходный код открыт<br/>для исследования и обсуждения</div>
</div>
<div class="grid__block">
<div class="title">100 000 000</div>
Expand Down
6 changes: 6 additions & 0 deletions middleware/trailingSlashRedirect.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export default function ({ route, redirect }) {
if (route.path !== '/' && route.path.endsWith('/')) {
const withoutTrailingSlash = route.path.slice(0, -1)
redirect(301, withoutTrailingSlash)
}
}
12 changes: 12 additions & 0 deletions nuxt.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,16 @@
export default {
router: {
/**
* This will not allow to visit route with trailing slash
* (else redirect will be treated as navigation to the current page and error will be raised)
*/
trailingSlash: false,

/**
* This middleware will redirect user if he tries to visit route with trailing slash
*/
middleware: 'trailingSlashRedirect',
},
// Target (https://go.nuxtjs.dev/config-target)
target: 'static',

Expand Down
Loading
Loading