Skip to content

Commit 114c898

Browse files
committed
feat: Add OpenGraph description and update title
1 parent 5834044 commit 114c898

3 files changed

Lines changed: 19 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ You can also check the
1414
- Features
1515
- Improved UX of interacting with conversion units multiplier input
1616
- Updated WMS & WMTS providers list
17+
- Added missing OpenGraph tags to the application (description, image) and
18+
updated the title
1719
- Fixes
1820
- Interactive calculation is now correctly reset when removing segmentation
1921
- Tooltips are now correctly displayed in data preview table

app/pages/_app.tsx

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ export default function App({
7474
<Head>
7575
<title key="title">visualize.admin.ch</title>
7676
<meta property="og:type" content="website" />
77-
<meta property="og:title" content={"visualize.admin.ch"} />
77+
<meta property="og:title" content={titleByLocale[locale]} />
78+
<meta property="og:description" content={descriptionByLocale[locale]} />
7879
<meta property="og:image" content={`${PUBLIC_URL}/og-image.png`} />
7980
<meta property="og:url" content={`${PUBLIC_URL}${asPath}`} />
8081
{federalTheme.preloadFonts?.map((src) => (
@@ -111,3 +112,17 @@ export default function App({
111112
</>
112113
);
113114
}
115+
116+
const titleByLocale = {
117+
de: "Visualisieren Sie Schweizer Open Government Data",
118+
fr: "Visualisez les données ouvertes de l’administration publique suisse",
119+
it: "Visualizza i dati aperti dell’amministrazione pubblica svizzera",
120+
en: "Visualize Swiss Open Government Data",
121+
};
122+
123+
const descriptionByLocale = {
124+
de: "Erstellen Sie Visualisierungen von Datensätzen, welche durch den Linked-Data Dienst (LINDAS) des Bundesarchivs bereitgestellt werden und betten Sie diese in Ihre Webseite ein.",
125+
fr: "Créez et intégrez des visualisations à partir des jeux de données du service LINDAS (Linked Data).",
126+
it: "Crea ed incorpora visualizzazioni partendo dai dataset forniti dal servizio LINDAS (Linked Data).",
127+
en: "Create and embed visualizations from any dataset provided by the LINDAS Linked Data Service.",
128+
};

app/pages/v/[chartId].tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,14 +147,12 @@ const VisualizationPage = (props: Serialized<PageProps>) => {
147147
return (
148148
<>
149149
<Head>
150-
<meta name="twitter:card" content="summary_large_image" />
151-
{/* FIXME: possibly we'll need to copy the content of first chart when migrating / saving to db
152-
or have additional annotator for dashboards / compositions. */}
153150
<meta property="og:title" content={state.layout.meta.title[locale]} />
154151
<meta
155152
property="og:description"
156153
content={state.layout.meta.description[locale]}
157154
/>
155+
<meta name="twitter:card" content="summary_large_image" />
158156
</Head>
159157
<ContentLayout>
160158
{config.published_state === PUBLISHED_STATE.PUBLISHED && (

0 commit comments

Comments
 (0)