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

MDM #1164

Merged
merged 41 commits into from
Mar 8, 2024
Merged

MDM #1164

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
baf4971
Update index.html
okeul Feb 13, 2024
c382e70
Merge pull request #1142 from okeul/patch-8
karlgroves Feb 13, 2024
ba99f86
Setting up a basic multilingual content management system with goHugo
Feb 13, 2024
16be7b2
update readme with explanations on how to modify or add a language
Feb 14, 2024
6bc79f0
Merge pull request #1143 from okeul/develop
karlgroves Feb 23, 2024
3ddd49f
Add Adrian Wegener per email reques Feb 22, 2024
karlgroves Feb 23, 2024
7af2f0f
Merge pull request #1147 from karlgroves/karlgroves-patch-3
karlgroves Feb 23, 2024
5e70c25
Update role
mattobee Feb 25, 2024
f48bf82
new overlay tool vendor added
okeul Feb 27, 2024
d458656
Fix #1146
okeul Feb 27, 2024
2e11c85
Merge pull request #1148 from mattobee/patch-2
karlgroves Mar 6, 2024
86d9c2f
Merge pull request #1149 from okeul/patch-9
karlgroves Mar 6, 2024
9f58492
Merge pull request #1150 from okeul/patch-10
karlgroves Mar 6, 2024
5f7576d
Add Meg Harding per email request Mon, Mar 4, 3:23 PM
karlgroves Mar 6, 2024
bb6283a
Merge pull request #1151 from karlgroves/karlgroves-patch-3
karlgroves Mar 6, 2024
63b7ed3
Add Syed Talha Mustafa per email request Feb 16, 2024, 10:04 PM
karlgroves Mar 6, 2024
6553136
Merge pull request #1152 from karlgroves/karlgroves-patch-3
karlgroves Mar 6, 2024
4f86904
Adds Kurt Deutscher per email request Feb 13, 2024, 6:33 PM
karlgroves Mar 6, 2024
ae16b5d
Merge pull request #1153 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
ab3ae99
Add Jackelyn Hayduk, per email request Tue, Jan 30, 12:18 PM
karlgroves Mar 6, 2024
8be84b0
Merge pull request #1154 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
7326f85
Add Sonia Margollé, per email request Mon, Jan 29, 10:57 AM
karlgroves Mar 6, 2024
0579a98
Merge pull request #1155 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
f343849
Add Ryan Williams, Per email request Sun, Jan 28, 8:28 PM
karlgroves Mar 6, 2024
bfb6033
Merge pull request #1156 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
fd871cb
Adds Sambhavi Chandrashekar, per email request Jan 27, 2024, 8:53 PM
karlgroves Mar 6, 2024
bf7560c
Merge pull request #1157 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
bf24842
Adds Simon Jaeger per email request Thu, Jan 25, 7:40 PM
karlgroves Mar 6, 2024
98224b1
Merge pull request #1158 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
b150ed8
Adds Sara Temby, per email request Wed, Jan 17, 3:48 PM
karlgroves Mar 6, 2024
803cb1d
Merge pull request #1159 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
7834788
Adds Andrea Mancini per email request Mon, Dec 18, 2023, 6:44 AM
karlgroves Mar 6, 2024
7077918
Merge pull request #1160 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
df357b4
Add Kalicharan and KolaGayathri per email request Nov 22, 2023, 11:5…
karlgroves Mar 6, 2024
2e20615
Merge pull request #1161 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
21bb7b1
Closes #1144
karlgroves Mar 6, 2024
c5ba387
Merge pull request #1162 from karlgroves/karlgroves-patch-1
karlgroves Mar 6, 2024
3ef4e05
Update affiliation
cstrobbe Dec 13, 2023
46b33be
Rename hugo.toml to config.toml
karlgroves Mar 8, 2024
0e0a545
Setting up a basic multilingual content management system with goHugo
Feb 13, 2024
1adee59
merge
karlgroves Mar 8, 2024
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
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,35 @@ Please do not add links in the endorsement section. This isn't an exercise in SE

Please use the PR process described below, issuing your PR against the `develop` branch.

### Edit content in an existing language or add a new language

If you want to modify an existing language, simply go to the corresponding file in the `i18n/` folder, e.g. `i18n/en.yml` (for english) and modify the contents. If a translation key doesn't exist, it automatically switches to english content.

If you want to add a new language, it's only a 2-step process:
1. In the `hugo.toml` file, add the new language, e.g. spanish in third position
```
[languages]
[languages.en]
contentDir = 'i18n/en'
weight = 1
[languages.en.params]
languageName = 'english'
languageNameShort = 'en'
[languages.fr]
contentDir = 'i18n/fr'
weight = 2
[languages.fr.params]
languageName = 'français'
languageNameShort = 'fr'
[languages.es]
contentDir = 'i18n/es'
weight = 3
[languages.fr.params]
languageName = 'español'
languageNameShort = 'es'
```
2. In the `i18n/` folder, add a yml file with the language shortname, e.g. `i18n/es.yml` (if spanish), and translate each key in this file.

### Design and/or Code

Contributions to the design and/ or code are encouraged!
Expand Down
32 changes: 32 additions & 0 deletions config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
baseURL = 'https://overlayfactsheet.com/'
title = 'Overlay Fact Sheet'

# Site language. Available translations in the theme’s `/i18n` directory.
defaultContentLanguage = 'en'

# Renders the default content language in subdir, e.g. /. The root directory / will redirect to /
defaultContentLanguageInSubdir = 'true'

relativeURLs = 'true'

disableKinds = ['taxonomy', 'term']

[markup.goldmark.renderer]
unsafe = true

[outputs]
home = ['HTML']

[languages]
[languages.en]
contentDir = 'i18n/en'
weight = 1
[languages.en.params]
languageName = 'english'
languageNameShort = 'en'
[languages.fr]
contentDir = 'i18n/fr'
weight = 2
[languages.fr.params]
languageName = 'français'
languageNameShort = 'fr'
32 changes: 32 additions & 0 deletions hugo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
baseURL = 'https://overlayfactsheet.com/'
title = 'Overlay Fact Sheet'

# Site language. Available translations in the theme’s `/i18n` directory.
defaultContentLanguage = 'en'

# Renders the default content language in subdir, e.g. /. The root directory / will redirect to /
defaultContentLanguageInSubdir = 'true'

relativeURLs = 'true'

disableKinds = ['taxonomy', 'term']

[markup.goldmark.renderer]
unsafe = true

[outputs]
home = ['HTML']

[languages]
[languages.en]
contentDir = 'i18n/en'
weight = 1
[languages.en.params]
languageName = 'english'
languageNameShort = 'en'
[languages.fr]
contentDir = 'i18n/fr'
weight = 2
[languages.fr.params]
languageName = 'français'
languageNameShort = 'fr'
Binary file added i18n/.DS_Store
Binary file not shown.
174 changes: 174 additions & 0 deletions i18n/en.yml

Large diffs are not rendered by default.

172 changes: 172 additions & 0 deletions i18n/fr.yml

Large diffs are not rendered by default.

437 changes: 143 additions & 294 deletions src/index.html → layouts/index.html

Large diffs are not rendered by default.

42 changes: 42 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[build]
publish = "public"
command = "hugo --gc --minify"

[context.production.environment]
HUGO_VERSION = "0.93.3"
HUGO_ENV = "production"
HUGO_ENABLEGITINFO = "true"

[context.split1]
command = "hugo --gc --minify --enableGitInfo"

[context.split1.environment]
HUGO_VERSION = "0.93.3"
HUGO_ENV = "production"

[context.deploy-preview]
command = "hugo --gc --minify --buildFuture -b $DEPLOY_PRIME_URL"

[context.deploy-preview.environment]
HUGO_VERSION = "0.93.3"

[context.branch-deploy]
command = "hugo --gc --minify -b $DEPLOY_PRIME_URL"

[context.branch-deploy.environment]
HUGO_VERSION = "0.93.3"

[context.next.environment]
HUGO_ENABLEGITINFO = "true"

[[headers]]
for = "*.css"
[headers.values]
Cache-Control = "public, max-age=2592000"

[[headers]]
for = "/*"
[headers.values]
X-Content-Type-Options = "nosniff"
X-Frame-Options = "DENY"
Content-Security-Policy = "base-uri 'self';"
Binary file added static/.DS_Store
Binary file not shown.
File renamed without changes.
File renamed without changes
53 changes: 53 additions & 0 deletions src/screen.css → static/screen.css
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,19 @@ a:focus {


/* Utilities */
.sr-only {
border: 0;
clip: rect(1px, 1px, 1px, 1px);
clip-path: inset(50%);
height: 1px;
margin: -1px;
overflow: hidden;
padding: 0;
position: absolute;
width: 1px;
white-space: nowrap;
}

.text-align-center {
text-align: center;
}
Expand Down Expand Up @@ -238,6 +251,36 @@ a:focus {
margin-top: 0.5rem;
}

.lang {
position: absolute;
top: 1rem;
right: 1.5rem;
list-style-type: none;
padding: 0;
margin: 0;
}
.lang li {
display: inline-block;
margin: 0;
color: var(--color-gray-100);
font-size: 1rem;
text-transform: uppercase;
}
.lang li:not(:last-child)::after {
content: "";
border-right: 1px solid var(--color-gray-100);
padding-right: .5rem;
margin-right: .25rem;
}
.lang a {
display: inline-block;
margin: 0;
color: var(--color-red-100);
}
.lang a:hover, .lang a:focus{
background: none;
}

.summary {
border: var(--border-thickness) solid var(--color-yellow-200);
background-color: var(--color-yellow-100);
Expand Down Expand Up @@ -336,6 +379,16 @@ a:focus {
color: var(--color-gray-800);
}

.lang li {
color: var(--color-gray-800);
}
.lang li:not(:last-child)::after {
border-right-color: var(--color-gray-800);
}
.lang a {
color: var(--color-red-900);
}

.conformance-quote {
background-color: var(--color-gray-800);
}
Expand Down
Loading