Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
fchh-website-content
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository 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
FCHH Software
fchh-website-content
Commits
81e5480f
Commit
81e5480f
authored
2 years ago
by
Moritz Stückler
Browse files
Options
Downloads
Patches
Plain Diff
fix: missing update from old repo
parent
cdd840e5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Pipeline
#5944
passed
2 years ago
Stage: build
Stage: deploy
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/pages/[...slug].astro
+5
-4
5 additions, 4 deletions
src/pages/[...slug].astro
src/pages/index.astro
+2
-4
2 additions, 4 deletions
src/pages/index.astro
with
7 additions
and
8 deletions
src/pages/[...slug].astro
+
5
−
4
View file @
81e5480f
---
import
{
LANGUAGES
}
from
"@config"
;
import
CommonUtils
from
"@utils/CommonU
tils"
;
import
{
getBaseUrl
}
from
"@u
tils"
;
import
type
{
IPage
}
from
"@interfaces/IPage"
;
/**
...
...
@@ -12,7 +12,7 @@ export async function getStaticPaths() {
const
rawContent
=
await
Astro
.
glob
<
IPage
>
(
"../**/*.mdx"
);
const
allLocales
=
LANGUAGES
.
map
((
language
)
=>
language
.
locale
);
const
baseUrl
=
CommonUtils
.
getBaseUrl
(
true
);
const
baseUrl
=
getBaseUrl
(
true
);
const
translatedContent
=
rawContent
.
filter
((
post
)
=>
Boolean
(
post
.
frontmatter
.
slug
)
...
...
@@ -62,7 +62,6 @@ export async function getStaticPaths() {
}
});
return
staticRoutes
;
}
...
...
@@ -70,5 +69,7 @@ const { newTarget } = Astro.props;
---
<
html
>
<
head
><
meta
http
-
equiv
=
"refresh"
content
=
{
`0; url=${newTarget}`
}
/></
head
>
<
head
>
<
meta
http
-
equiv
=
"refresh"
content
=
{
`0; url=${newTarget}`
}
/>
</
head
>
</
html
>
This diff is collapsed.
Click to expand it.
src/pages/index.astro
+
2
−
4
View file @
81e5480f
<script>
import LanguageUtils from "@utils/LanguageUtils";
import CommonUtils from "@utils/CommonUtils";
import { getBaseUrl } from "@utils";
// Redirect user to previously set language preference (or get it from the browser)
const baseUrl =
CommonUtils.
getBaseUrl(true);
const baseUrl = getBaseUrl(true);
// const preferredLanguage =
// LanguageUtils.getOrGuessInitialLanguageFromBrowser();
const preferredLanguage = "de";
window.location.pathname = `${baseUrl}/${preferredLanguage.toLowerCase()}`;
</script>
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