Merge pull request #116 from life-itself/wiki-links-markdown
This commit is contained in:
commit
028ab56fe9
|
|
@ -1,4 +1,30 @@
|
|||
# Test page for video embed links in markdown
|
||||
# Test (Obsidian) wiki link syntax
|
||||
|
||||
1. Internal link
|
||||
*`[[recent-events]]`*
|
||||
[[recent-events]]
|
||||
|
||||
2. Internal link with custom divider
|
||||
*`[[are-crypto-tokens-securities|Crypto]]`*
|
||||
[[are-crypto-tokens-securities|Crypto]]
|
||||
|
||||
3. Internal link with heading
|
||||
*`[[about#Making Sense of Web3]]`*
|
||||
[[about#Making Sense of Web3]]
|
||||
|
||||
4. Internal link with heading and custom divider
|
||||
*`[[webinars#Upcoming|Upcoming webinars]]`*
|
||||
[[webinars#Upcoming|Upcoming webinars]]
|
||||
|
||||
5. Internal link heading within page
|
||||
*`[[#Our Approach]]`*
|
||||
[[#Our Approach]]
|
||||
|
||||
|
||||
***
|
||||
|
||||
# Test video embed links in markdown
|
||||
|
||||
This youtube link (https://www.youtube.com/embed/K5JtPTyc0y0) surrounded by newlines in markdown would display as follows:
|
||||
|
||||
https://www.youtube.com/embed/K5JtPTyc0y0
|
||||
|
|
@ -7,4 +33,9 @@ For eg .. Links without being surrounded by newlines will show as below:
|
|||
|
||||
* Youtube: https://www.youtube.com/watch?v=z2uAg-AIs-Y
|
||||
* Podcast: https://anchor.fm/life-itself/episodes/Are-Cryptocurrencies-Securities--The-Nature-of-Securities--Their-Relation-to-Crypto-Tokens-with-Stephen-Diehl-e1fph69
|
||||
* Wiki topic: [Securities Framework](../concepts/security.md)
|
||||
* Wiki topic: [Securities Framework](../concepts/security.md)
|
||||
|
||||
***
|
||||
|
||||
## Our Approach
|
||||
We intend to take a distinctive approach.
|
||||
|
|
@ -1,6 +1,9 @@
|
|||
import { defineDocumentType, makeSource } from 'contentlayer/source-files'
|
||||
// import readingTime from 'reading-time'
|
||||
import remarkGfm from 'remark-gfm';
|
||||
import rehypeSlug from 'rehype-slug'
|
||||
import rehypeAutolinkHeadings from 'rehype-autolink-headings'
|
||||
import wikiLinkPlugin from "remark-wiki-link-plus"
|
||||
|
||||
const OtherPage = defineDocumentType(() => ({
|
||||
name: 'OtherPage',
|
||||
|
|
@ -18,6 +21,10 @@ export default makeSource({
|
|||
contentDirPath: 'content',
|
||||
documentTypes: [OtherPage],
|
||||
mdx: {
|
||||
remarkPlugins: [remarkGfm],
|
||||
remarkPlugins: [
|
||||
remarkGfm,
|
||||
[wikiLinkPlugin, { markdownFolder: 'content' }]
|
||||
],
|
||||
rehypePlugins: [rehypeSlug, rehypeAutolinkHeadings]
|
||||
}
|
||||
})
|
||||
|
|
@ -23,9 +23,12 @@
|
|||
"react": "^17.0.2",
|
||||
"react-dom": "^17.0.2",
|
||||
"react-player": "^2.10.0",
|
||||
"rehype-autolink-headings": "^6.1.1",
|
||||
"rehype-slug": "^5.0.1",
|
||||
"remark-gfm": "^3.0.0",
|
||||
"remark-slug": "^7.0.0",
|
||||
"remark-toc": "^8.0.0"
|
||||
"remark-toc": "^8.0.0",
|
||||
"remark-wiki-link-plus": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"autoprefixer": "^10.2.6",
|
||||
|
|
|
|||
Loading…
Reference in New Issue