]> git.localhorst.tv Git - alttp.git/blobdiff - resources/js/components/pages/Technique.js
add language references to tech pages
[alttp.git] / resources / js / components / pages / Technique.js
index e38061106a5d582bf9368fe05d6f6ab34e1a8f91..aabb8d0780db86a73be7e50133fe66ac2a66d7c8 100644 (file)
@@ -9,7 +9,7 @@ import ErrorMessage from '../common/ErrorMessage';
 import Loading from '../common/Loading';
 import NotFound from '../pages/NotFound';
 import Detail from '../techniques/Detail';
-import { getTranslation } from '../../helpers/Technique';
+import { getLanguages, getTranslation } from '../../helpers/Technique';
 import i18n from '../../i18n';
 
 const Technique = () => {
@@ -56,6 +56,19 @@ const Technique = () => {
                <Helmet>
                        <title>{getTranslation(technique, 'title', i18n.language)}</title>
                        <meta name="description" content={getTranslation(technique, 'short', i18n.language)} />
+                       <link
+                               href={`https://alttp.localhorst.tv/tech/${technique.name}`}
+                               hrefLang="x-default"
+                               rel="alternate"
+                       />
+                       {getLanguages(technique).map(l =>
+                               <link
+                                       key={l}
+                                       href={`https://alttp.localhorst.tv/tech/${technique.name}?lng=${l}`}
+                                       hrefLang={l}
+                                       rel="alternate"
+                               />
+                       )}
                </Helmet>
                <Detail technique={technique} />
        </ErrorBoundary>;