{"id":136135,"date":"2021-02-05T11:03:04","date_gmt":"2021-02-05T11:03:04","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/external-markdown\/"},"modified":"2023-08-29T13:01:54","modified_gmt":"2023-08-29T13:01:54","slug":"external-markdown","status":"closed","type":"plugin","link":"https:\/\/ps.wordpress.org\/plugins\/external-markdown\/","author":6116875,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.0.1","stable_tag":"0.0.1","tested":"6.3.8","requires":"4.7","requires_php":"7.0","requires_plugins":null,"header_name":"External Markdown","header_author":"Moritz Stueckler","header_description":"Include and parse markdown files from external web sources like GitHub, GitLab, etc.","assets_banners_color":"","last_updated":"2023-08-29 13:01:54","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"https:\/\/github.com\/pReya\/wordpress-external-markdown","header_author_uri":"","rating":5,"author_block_rating":0,"active_installs":70,"downloads":1704,"num_ratings":2,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description"],"tags":{"0.0.1":{"tag":"0.0.1","author":"pReya","date":"2023-08-29 13:01:54"}},"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":2},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["0.0.1"],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[1673,69110,4608],"plugin_category":[],"plugin_contributors":[195948],"plugin_business_model":[],"class_list":["post-136135","plugin","type-plugin","status-closed","hentry","plugin_tags-github","plugin_tags-gitlab","plugin_tags-markdown","plugin_contributors-preya","plugin_committers-preya"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/external-markdown.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p>This is a plugin for Wordpress to embed Markdown files from external web sources (e.g. GitHub, GitLab, etc) into WordPress content using the shortcode <code>[external_markdown]<\/code>. A possible use case for this is to show content from a single source of truth (like a GitHub repository) on your WordPress website.<\/p>\n\n<h3>Features<\/h3>\n\n<ul>\n<li>Embed any publicly accessible markdown file from other websites<\/li>\n<li>Uses the public and free <a href=\"https:\/\/docs.github.com\/en\/rest\/reference\/markdown\">GitHub API<\/a> to transform Markdown to HTML (there is a rate limit \u2013 so don't overdo it)<\/li>\n<li>Caching support (so you can configure how often the file is being fetched from the source \u2013 default is a <strong>once per hour<\/strong> maximum)<\/li>\n<li>Customise the CSS class of the markdown container to adjust styles<\/li>\n<\/ul>\n\n<h3>Instructions \/ Examples<\/h3>\n\n<p>Download and unpack or clone this repository into your <code>wp-content\/plugins<\/code> folder, so the PHP file resides in <code>wp-content\/plugins\/external-markdown\/external-markdown.php<\/code>.<\/p>\n\n<p>If you use the Guttenberg editor, you need to add a \"Shortcode\" block first. If your're using the classic editor, you can use the shortcode right away.<\/p>\n\n<h4>Simple embed<\/h4>\n\n<p>The <code>url<\/code> parameter takes the URL to the Markdown file you want to embed. Make sure to <a href=\"#attention-when-using-github-gitlab-etc\">use the \"raw\" URL when you use GitHub, GitLab, etc<\/a>.\n    <code>[external_markdown url=\"https:\/\/raw.githubusercontent.com\/pReya\/wordpress-external-markdown\/main\/README.md\"]<\/code><\/p>\n\n<h4>Adjust caching duration<\/h4>\n\n<p>The <code>ttl<\/code> parameter controls how long the cached version is used, before it's fetched again. The value is given in seconds. So 24 hours (24* 60 *60) result in a value of 86400.\n    <code>[external_markdown ttl=86400 url=\"https:\/\/raw.githubusercontent.com\/pReya\/wordpress-external-markdown\/main\/README.md\"]<\/code><\/p>\n\n<h4>Adjust container CSS class<\/h4>\n\n<p>The <code>class<\/code> parameter takes your desired class name for the external markdown container. The default class name for the container is <code>class='external-markdown'<\/code>.\n    <code>[external_markdown class=\"my-classname\" url=\"https:\/\/raw.githubusercontent.com\/pReya\/wordpress-external-markdown\/main\/README.md\"]<\/code><\/p>\n\n<h4>Attention when using GitHub, GitLab, etc.<\/h4>\n\n<p>When embedding content from Git hosting services like GitHub or GitLab, you need to make sure to use the proper \"raw\" markdown URL. You can find this URL in the upper right corner of the web view.<\/p>\n\n<h3>Attribution<\/h3>\n\n<ul>\n<li>This plugin was inspired by the great <a href=\"https:\/\/wordpress.org\/plugins\/documents-from-git\/\">wordpress-markdown-git<\/a> plugin, which serves a similar purpose, but uses the Git provider APIs to fetch the raw Markdown files \u2013 which is a little more complicated than this approach here.<\/li>\n<\/ul>","raw_excerpt":"This is a plugin for Wordpress to embed Markdown files from external web sources (e.g. GitHub, GitLab, etc) into WordPress content.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/136135","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=136135"}],"author":[{"embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/preya"}],"wp:attachment":[{"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=136135"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=136135"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=136135"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=136135"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=136135"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/ps.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=136135"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}