user guide structure draft
Before Width: | Height: | Size: 4.3 MiB After Width: | Height: | Size: 4.3 MiB |
Before Width: | Height: | Size: 5.4 MiB After Width: | Height: | Size: 5.4 MiB |
Before Width: | Height: | Size: 2.9 MiB After Width: | Height: | Size: 2.9 MiB |
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
Before Width: | Height: | Size: 3.6 MiB After Width: | Height: | Size: 3.6 MiB |
Before Width: | Height: | Size: 6.9 MiB After Width: | Height: | Size: 6.9 MiB |
Before Width: | Height: | Size: 448 KiB After Width: | Height: | Size: 448 KiB |
@@ -44,10 +44,10 @@
|
||||
<Button
|
||||
variant="link"
|
||||
class="h-6 px-0 text-muted-foreground"
|
||||
href={getURLForLanguage('/[...language]/documentation', $locale)}
|
||||
href={getURLForLanguage('/[...language]/help', $locale)}
|
||||
>
|
||||
<BookOpenText size="16" class="mr-1" />
|
||||
{$_('homepage.documentation')}
|
||||
{$_('menu.help')}
|
||||
</Button>
|
||||
</div>
|
||||
<div class="flex flex-col items-start gap-1" id="contact">
|
||||
|
@@ -417,7 +417,7 @@
|
||||
<div class="h-fit flex flex-row items-center ml-1 gap-1">
|
||||
<Button
|
||||
variant="ghost"
|
||||
href={getURLForLanguage('/[...language]/documentation', $locale)}
|
||||
href={getURLForLanguage('/[...language]/help', $locale)}
|
||||
target="_blank"
|
||||
class="cursor-default h-fit rounded-sm px-3 py-0.5"
|
||||
>
|
||||
|
@@ -9,9 +9,9 @@
|
||||
|
||||
<nav class="w-full sticky top-0 bg-background z-10">
|
||||
<div class="mx-6 py-2 flex flex-row items-center border-b gap-4 md:gap-8">
|
||||
<a href={getURLForLanguage('/[...language]', $locale)} class="shrink-0">
|
||||
<a href={getURLForLanguage('/[...language]', $locale)} class="shrink-0 translate-y-0.5">
|
||||
<Logo class="h-8 sm:hidden" iconOnly={true} />
|
||||
<Logo class="h-7 hidden sm:block" />
|
||||
<Logo class="h-8 hidden sm:block" />
|
||||
</a>
|
||||
<Button
|
||||
variant="link"
|
||||
@@ -32,10 +32,10 @@
|
||||
<Button
|
||||
variant="link"
|
||||
class="text-base px-0"
|
||||
href={getURLForLanguage('/[...language]/documentation', $locale)}
|
||||
href={getURLForLanguage('/[...language]/help', $locale)}
|
||||
>
|
||||
<BookOpenText size="18" class="mr-1.5" />
|
||||
{$_('homepage.documentation')}
|
||||
{$_('menu.help')}
|
||||
</Button>
|
||||
<ModeSwitch class="ml-auto" />
|
||||
</div>
|
||||
|
@@ -1,11 +0,0 @@
|
||||
<script>
|
||||
import Test, { metadata } from '$lib/docs/en/introduction/test.md';
|
||||
|
||||
const toc = {
|
||||
introduction: ['test']
|
||||
};
|
||||
</script>
|
||||
|
||||
{metadata.title}
|
||||
|
||||
<Test />
|
@@ -2,22 +2,33 @@
|
||||
import { _, locale } from 'svelte-i18n';
|
||||
|
||||
export let path: string;
|
||||
export let titleOnly: boolean = false;
|
||||
|
||||
let module = undefined;
|
||||
let metadata: Record<string, any> = {};
|
||||
|
||||
const modules = import.meta.glob('/src/lib/docs/**/*.{md,svx}');
|
||||
|
||||
$: if ($locale) {
|
||||
modules[`/src/lib/docs/${$locale}/${path}`]().then((mod) => {
|
||||
function loadModule(path: string) {
|
||||
modules[path]().then((mod) => {
|
||||
module = mod.default;
|
||||
metadata = mod.metadata;
|
||||
});
|
||||
}
|
||||
|
||||
$: if ($locale) {
|
||||
loadModule(`/src/lib/docs/${$locale}/${path}`);
|
||||
}
|
||||
</script>
|
||||
|
||||
{#if module !== undefined}
|
||||
<div class="markdown space-y-3">
|
||||
<svelte:component this={module} />
|
||||
</div>
|
||||
{#if titleOnly}
|
||||
{metadata.title}
|
||||
{:else}
|
||||
<div class="markdown space-y-3">
|
||||
<svelte:component this={module} />
|
||||
</div>
|
||||
{/if}
|
||||
{/if}
|
||||
|
||||
<style lang="postcss">
|
||||
|
11
website/src/lib/docs/en/getting-started.svx
Normal file
@@ -0,0 +1,11 @@
|
||||
---
|
||||
title: Getting started
|
||||
---
|
||||
|
||||
# { title }
|
||||
|
||||
Welcome message.
|
||||
|
||||
- screenshot of the interface
|
||||
|
||||
explain main components of the interface and link to the corresponding sections
|
@@ -1,5 +0,0 @@
|
||||
---
|
||||
title: Test
|
||||
---
|
||||
|
||||
test
|
5
website/src/lib/docs/en/map-controls.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Map controls
|
||||
---
|
||||
|
||||
# { title }
|
6
website/src/lib/docs/en/menu.svx
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: Menu
|
||||
---
|
||||
|
||||
# { title }
|
||||
|
5
website/src/lib/docs/en/menu/edit.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Edit
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/menu/file.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: File
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/menu/settings.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Settings
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/menu/view.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: View
|
||||
---
|
||||
|
||||
# { title }
|
6
website/src/lib/docs/en/toolbar.svx
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
title: Toolbar
|
||||
---
|
||||
|
||||
# { title }
|
||||
|
5
website/src/lib/docs/en/toolbar/clean.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Clean
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/toolbar/extract.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Extract
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/toolbar/merge.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Merge
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/toolbar/poi.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Points of interest
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/toolbar/reduce.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Reduce
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/toolbar/routing.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Route planning and editing
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/toolbar/scissors.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Scissors
|
||||
---
|
||||
|
||||
# { title }
|
5
website/src/lib/docs/en/toolbar/time.svx
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
title: Time
|
||||
---
|
||||
|
||||
# { title }
|
@@ -3,7 +3,7 @@ import { glob } from 'glob';
|
||||
import { languages } from '$lib/languages';
|
||||
|
||||
function generateSitemap() {
|
||||
const pages = glob.sync('*.html', { cwd: 'build' });
|
||||
const pages = glob.sync('**/*.html', { cwd: 'build' });
|
||||
|
||||
let sitemap = '<?xml version="1.0" encoding="UTF-8"?>\n';
|
||||
sitemap += '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml">\n';
|
||||
@@ -11,7 +11,8 @@ function generateSitemap() {
|
||||
pages.forEach((page) => {
|
||||
const url = page.replace('.html', '').replace('index', '');
|
||||
|
||||
if (languages[url]) {
|
||||
const rootDir = url.split('/')[0];
|
||||
if (languages[url] || languages[rootDir]) {
|
||||
// Skip localized pages
|
||||
return;
|
||||
}
|
||||
|