I recently created an Orchard Core module that adds a shortcode for inserting external data into a HtmlBody or Markdown part or field. My motivation for creating this is that I wanted to include a recipe that I have as markdown on GitHub in a blog post. I didn't want to just copy the recipe because I'm slightly changing it fairly often and didn't want to have to update GitHub and my blog post. With this shortcode, I was able to have the recipe display in my blog post just like it was part of the blog post but when I change the recipe on GitHub, the changes show in the blog post as well.
The actual body of the post is this: TacoBellBody.png
You can see how it displays here: drewbrasher.com/blog/taco-bell-red-sauce
Here is the readme for the module (embedded from GitHub with the shortcode) if you would like to try it out.
An Orchard Core CMS module to embed the content of external URLs in Markdown or HtmlBody, with a shortcode.
You should only embed content like this for URLs that you have full control over.
DrewBrasher.OrchardCore.ExternalData
) in your web application.A shortcode for embedding the content of external URLs in Markdown or HtmlBody.
[external_content url='https://...' renderMode='MarkdownToHtml'][/external_content]
If you have a markdown file on GitHub with the url https://{YourGitHubRepoUrl}/readme.md
that you would like to include in your Orchard Core blog post, you could put the shortcode in the MarkdownBody of your blog post:
[external_content url='https://{YourGitHubRepoUrl}/readme.md' renderMode='MarkdownToHtml'][/external_content]
The contents of the readme.md file would be rendered to HTML along with the rest of the MarkdownBody of your blog post.