Skip to content

Commit

Permalink
fix(frontend): nuxt config was discarding all meta tags when setting …
Browse files Browse the repository at this point in the history
…no-robots
  • Loading branch information
Luscha committed Jan 16, 2025
1 parent fc5f813 commit c020267
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 38 deletions.
6 changes: 6 additions & 0 deletions frontend/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ yarn install
yarn generate
```

Or you can use any Node version setting legacy openssl compatibility

```bash
NODE_OPTIONS=--openssl-legacy-provider yarn generate
```

```bash
# Change into directory
$ cd odh-web-components-store/frontend/
Expand Down
72 changes: 34 additions & 38 deletions frontend/nuxt.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,47 +11,43 @@ module.exports = {
/*
** Headers of the page
*/
head: {
title: 'Open Data Hub Web Components',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: 'ODH Webcomponents',
},
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: 'https://scripts.opendatahub.testingmachine.eu/cookieconsent/cookieconsent.css' },
{ rel: 'stylesheet', href: 'https://fonts.testingmachine.eu/source-sans-pro/style.css' }
],
script: [{
src: '/matomo/matomo-analytics.js',
type: 'text/plain',
"data-cookiecategory": "targeting"
},
{
src: 'https://scripts.opendatahub.testingmachine.eu/cookieconsent/cookieconsent.js',
defer: true,
body: true
},
{
src: 'https://scripts.opendatahub.testingmachine.eu/cookieconsent/cookieconsent-init.js',
defer: true,
body: true
}
]
},
head() {
head() {
return {
title: 'Open Data Hub Web Components',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{
hid: 'description',
name: 'description',
content: 'ODH Webcomponents',
},
...(process.env.BUILD_ENVIRONMENT === 'testing'
? [{ name: 'robots', content: 'noindex, nofollow' }]
: []),
],
};
? [{ name: 'robots', content: 'noindex, nofollow' }]
: []),
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' },
{ rel: 'stylesheet', href: 'https://scripts.opendatahub.testingmachine.eu/cookieconsent/cookieconsent.css' },
{ rel: 'stylesheet', href: 'https://fonts.testingmachine.eu/source-sans-pro/style.css' }
],
script: [{
src: '/matomo/matomo-analytics.js',
type: 'text/plain',
"data-cookiecategory": "targeting"
},
{
src: 'https://scripts.opendatahub.testingmachine.eu/cookieconsent/cookieconsent.js',
defer: true,
body: true
},
{
src: 'https://scripts.opendatahub.testingmachine.eu/cookieconsent/cookieconsent-init.js',
defer: true,
body: true
}
]
}
},
/*
** Customize the progress-bar color
Expand Down

0 comments on commit c020267

Please sign in to comment.