docs: searchable documentation & seo (#911)

* create search field

* search trigger, show field on interaction

* update deps, fix emitter

* crop out html, filtered search, i18h, layout

* i18n

* catch crtl f

* create combindes result store

* fix search query, remove store

* fixed search on side

* fix preload

* improve mobile layout, assets

* layout optimisations

* header

* doc nav bar, mobile, new dashboard

* toolbar

* fix modal

* z-index issue, header

* hl param

* fix lang switch, nav

* home, sub section, 18n, layout, assets

* develope, docs sublinks

* update home, mobile first

* fix language switcher

* add home seo

* fix flex search, dashboard

* seo embed, fix docs dropdown

* mouse navigation in search

* jsonld

* seo

* fix link

* rm section if none

* rm unused segment

* update lock

* remove combined slug

* Apply suggestions from code review

Co-authored-by: Florian Forster <[email protected]>
This commit is contained in:
Max Peintner
2020-11-04 20:02:17 +01:00
committed by GitHub
co-authored by Florian Forster
parent 202aae4954
commit 1fc4034373
35 changed files with 1493 additions and 1562 deletions
-4
View File
@@ -51,10 +51,6 @@ export default function generate_docs(dirpath, dir, lang) {
return '<div class="side-by-side"><div class="copy">';
};
// renderer.list = (src) => {
// console.log(src);
// };
renderer.code = (source, lang) => {
source = source.replace(/^ +/gm, (match) => match.split(' ').join('\t'));
+9
View File
@@ -0,0 +1,9 @@
import fs from 'fs';
export default function generate_docs(dirpath, dir, lang) {
try {
return fs.readFileSync(`${dirpath}${dir}/seo_${lang}.html`, 'utf-8');
} catch (error) {
return '';
}
};