diff --git a/docs/proposal-block-embeds.md b/docs/proposal-block-embeds.md new file mode 100644 index 000000000..00bea7390 --- /dev/null +++ b/docs/proposal-block-embeds.md @@ -0,0 +1,29 @@ +# Proposal: Block Embeds + +Embedding content blocks (sections, or any html blocks with id) so that they are visible in the document where they are being linked from. + +We could use [VS Code Peek Definition](https://docs.microsoft.com/en-us/visualstudio/ide/how-to-view-and-edit-code-by-using-peek-definition-alt-plus-f12?view=vs-2019) to do this. + +You should be able to embed any wiki link, using the same [[proposal-deep-links]] anchor syntax: +``` +page#anchor +``` + +Our options for syntax: + +1. HTML style embed + + +2. Mediawiki hybrid monster +[[blank-document#section-1]] + +3. Our own special ?embed hack +[[blank-document?embed#section-1]] + +In order to get these to render inside HTML pages, we will need to customise the renderer. [MDX](https://github.com/mdx-js/mdx) + +Before properly implementing embedding with custom sections we need to solve some of the issues described in [[proposal-deep-links]] + +[//begin]: # "Autogenerated link references for markdown compatibility" +[proposal-deep-links]: proposal-deep-links "Proposal: Deep links" +[//end]: # "Autogenerated link references" \ No newline at end of file diff --git a/docs/proposal-deep-links.md b/docs/proposal-deep-links.md new file mode 100644 index 000000000..35757b5d7 --- /dev/null +++ b/docs/proposal-deep-links.md @@ -0,0 +1,86 @@ +# Proposal: Deep links + +Linking to a section within a document. + +A section is a part of a markdown document. +Sections are automatically created when using a heading. + +Custom sections can also be created by using content blocks (see [Declaring content blocks](#declaring-content-blocks) and [Content block](#content-block]) + + +## Section Heading + +Step 1: Just link to headings: + +[[document#section-heading]] + +## Declaring content blocks + +Step 2: Declare sections via HTML content blocks + +`