Skip to content

Commit

Permalink
User feedback: Navigation order and new window for external links (#49)
Browse files Browse the repository at this point in the history
* feat: sort navigation alphabetically

* feat: remove unecessary preprocessing and update dependencies

* feat: remove unnecessary options

* ci: remove nasty workaround

* chore: dependencies updated & formatting
  • Loading branch information
maehr authored Jan 10, 2024
1 parent 45a078a commit 50a0a9e
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 95 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/sveltekitci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,8 @@ jobs:
- name: Prebuild
run: pnpm run prebuild

# FIXME: Remove timeout
- name: Build
run: timeout 90 pnpm run build || true
run: pnpm run build

- name: Postbuild
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
Expand Down
11 changes: 2 additions & 9 deletions mdsvex.config.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import rehypeAutolinkHeadings from 'rehype-autolink-headings';
import rehypeSlug from 'rehype-slug';
import { defineMDSveXConfig as defineConfig } from 'mdsvex';
import { rehypeMdsvexImageAutoimport } from 'rehype-mdsvex-image-autoimport';
import rehypeExternalLinks from 'rehype-external-links';
import remarkCaptions from 'remark-captions';
import remarkUnwrapImages from 'remark-unwrap-images';

const config = defineConfig({
extensions: ['.svelte.md', '.md', '.svx'],
Expand All @@ -13,13 +11,8 @@ const config = defineConfig({
dashes: 'oldschool'
},

remarkPlugins: [remarkCaptions, remarkUnwrapImages],
rehypePlugins: [
rehypeExternalLinks, // Adds 'target' and 'rel' to external links
rehypeSlug, // Adds 'id' attributes to Headings (h1,h2,etc)
rehypeAutolinkHeadings,
rehypeMdsvexImageAutoimport
]
remarkPlugins: [remarkCaptions],
rehypePlugins: [rehypeSlug, [rehypeExternalLinks, { target: '_blank' }], rehypeAutolinkHeadings]
});

export default config;
4 changes: 1 addition & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@skeletonlabs/skeleton": "^2.7.0",
"@skeletonlabs/tw-plugin": "^0.3.1",
"@sveltejs/adapter-static": "^3.0.1",
"@sveltejs/kit": "^2.0.6",
"@sveltejs/kit": "^2.1.2",
"@sveltejs/vite-plugin-svelte": "^3.0.1",
"@tailwindcss/typography": "^0.5.10",
"autoprefixer": "^10.4.16",
Expand All @@ -52,10 +52,8 @@
"prettier-plugin-tailwindcss": "^0.5.11",
"rehype-autolink-headings": "^7.1.0",
"rehype-external-links": "^3.0.0",
"rehype-mdsvex-image-autoimport": "^1.1.0",
"rehype-slug": "^6.0.0",
"remark-captions": "^2.2.3",
"remark-unwrap-images": "^4.0.0",
"svelte": "^4.2.8",
"svelte-check": "^3.6.2",
"svelte-maplibre": "^0.7.5",
Expand Down
86 changes: 15 additions & 71 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions src/lib/components/Navigation.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
const drawerClose = () => drawerStore.close();
const navItems = [
{ label: 'Startseite', path: '/' },
{ label: 'Blog', path: '/blog' },
{ label: 'Bände', path: '/baende' },
{ label: 'Agenda', path: '/agenda' },
{ label: 'Bände', path: '/baende' },
{ label: 'Blog', path: '/blog' },
{ label: 'Partner', path: '/partner' },
{ label: 'Projekt', path: '/projekt' },
{ label: 'Über uns', path: '/ueber-uns' }
Expand Down
9 changes: 1 addition & 8 deletions svelte.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,7 @@ const config = {
// adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
// If your environment is not supported or you settled on a specific environment, switch out the adapter.
// See https://kit.svelte.dev/docs/adapters for more information about adapters.
adapter: adapter({
// does not work with JamPack
// precompress: true
}),
// do abort on build errors
prerender: {
handleHttpError: 'fail'
}
adapter: adapter()
}
};
export default config;

0 comments on commit 50a0a9e

Please sign in to comment.