From 7b5dd8de3b9a522ff976de9ae7759fef89d7d3eb Mon Sep 17 00:00:00 2001 From: Sander Spies Date: Wed, 4 Mar 2020 21:39:57 +0100 Subject: [PATCH] Persistent syntax selection. --- gitlab-pages/website/src/theme/DocPage/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gitlab-pages/website/src/theme/DocPage/index.js b/gitlab-pages/website/src/theme/DocPage/index.js index 5c2f21044..69d441f9d 100644 --- a/gitlab-pages/website/src/theme/DocPage/index.js +++ b/gitlab-pages/website/src/theme/DocPage/index.js @@ -59,7 +59,10 @@ function DocPage(props) { sidebar={sidebar} sidebarCollapsible={sidebarCollapsible} syntax={syntax} - onSyntaxChange={l => setSyntax(l)} + onSyntaxChange={l => { + localStorage.setItem('syntax', l); + setSyntax(l) + }} /> )}