Skip to content

Commit

Permalink
Merge pull request #4 from mvasigh/consolidate-mdsvex-config
Browse files Browse the repository at this point in the history
Remove mdsvex.config.cjs and use ES module version
  • Loading branch information
mvasigh authored May 22, 2021
2 parents 7b45551 + f3040e9 commit b63bb1d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 23 deletions.
19 changes: 0 additions & 19 deletions mdsvex.config.cjs

This file was deleted.

32 changes: 29 additions & 3 deletions mdsvex.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,30 @@
import { createRequire } from "module";
const require = createRequire(import.meta.url)
import remarkGithub from 'remark-github';
import remarkAbbr from 'remark-abbr';
import rehypeSlug from 'rehype-slug';
import rehypeAutolinkHeadings from 'rehype-autolink-headings';

export const mdsvexConfig = require("./mdsvex.config.cjs");
export default {
extensions: ['.svelte.md', '.md', '.svx'],
smartypants: {
dashes: 'oldschool'
},
remarkPlugins: [
[
remarkGithub,
{
// Use your own repository
repository: 'https://github.com/mvasigh/sveltekit-mdsvex-blog.git'
}
],
remarkAbbr
],
rehypePlugins: [
rehypeSlug,
[
rehypeAutolinkHeadings,
{
behavior: 'wrap'
}
]
]
};
2 changes: 1 addition & 1 deletion svelte.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import adapter from '@sveltejs/adapter-static';
import md from 'mdsvex';
import { mdsvexConfig } from './mdsvex.config.js';
import mdsvexConfig from './mdsvex.config.js';

/** @type {import('@sveltejs/kit').Config} */
const config = {
Expand Down

0 comments on commit b63bb1d

Please sign in to comment.