Changeset 2187581
- Timestamp:
- 11/07/2019 09:41:17 AM (6 years ago)
- Location:
- markdown-github
- Files:
-
- 1 added
- 3 edited
-
tags/1.2.0 (added)
-
trunk/css/md-github.css (modified) (1 diff)
-
trunk/md_github.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
markdown-github/trunk/css/md-github.css
r2177428 r2187581 1 1 /*From https://github.com/ghandic/nbconvert/blob/master/css/nbconvert.css*/ 2 3 div.md_dashedbox { 4 position: relative; 5 font-size: 0.75em; 6 border: 3px dashed; 7 padding: 10px; 8 margin-bottom:15px 9 } 10 11 div.md_dashedbox div.markdown-github { 12 color:white; 13 line-height: 20px; 14 padding: 0px 5px; 15 position: absolute; 16 background-color: #345; 17 top: -3px; 18 left: -3px; 19 text-transform:none; 20 font-size:1em; 21 font-family: "Helvetica Neue",Helvetica,Arial,sans-serif; 22 } 23 2 24 div.markdown-github { 3 25 position: relative; -
markdown-github/trunk/md_github.php
r2177428 r2187581 4 4 Description: A plugin to inject markdown files directly into a post from Github 5 5 Plugin URI: https://github.com/gis-ops/md-github-wordpress 6 Version: 1. 1.06 Version: 1.2.0 7 7 Author: Nils Nolde 8 8 Author URI: https://gis-ops.com … … 106 106 } 107 107 108 function MDGH_md_dashedbox_github($atts) { 109 list($url, $token) = MDGH_atts_extract($atts); 110 //get checkout lable from file URL 111 $checkout = MDGH_md_github_checkout($atts); 112 //get raw markdown from file URL 113 $markdown = MDGH_get_api_response($url, $token, 'file'); 114 //generate frame with border, checkout label and markdown content 115 $md_dashedbox = ' 116 <div class="md_dashedbox"> 117 '.$checkout.' 118 '.$markdown.' 119 </div>'; 120 //send back text to replace shortcode in post 121 return $md_dashedbox; 122 } 123 108 124 function MDGH_md_github_checkout($atts) { 109 125 list($url, $token) = MDGH_atts_extract($atts); … … 130 146 add_shortcode("md_github", "MDGH_md_github_handler"); 131 147 add_shortcode('history_github', "MDHG_md_github_history"); 148 add_shortcode("md_dashedbox_github", "MDGH_md_dashedbox_github"); 149 -
markdown-github/trunk/readme.txt
r2177428 r2187581 20 20 - Write Markdown in your favorite editor and just push to your repo to update your blog 21 21 22 It features 3shortcodes:22 It features the following shortcodes: 23 23 24 24 1. `[md_github token=YourToken url=Github URL]`: Pulls raw HTML from the `https://api.github.com/repos/` endpoint and styles it with Github markdown CSS 25 25 2. `[checkout_github token=YourToken url=Github URL]`: Displays a formatted link to the repo with the date of the latest update 26 26 3. `[history_github token=YourToken url=Github URL]`: Displays a commit history of the last 5 commits. 27 4. `[md_dashedbox_github token=YourToken url=Github URL]`: Displays GitHub markdown file similar to [nbconvert](https://github.com/ghandic/nbconvert). This shortcode is mutually exclusive with `md_github` and `checkout_github`. 27 28 28 29 Github API is queried on every new load of the page, so that changes in the repository will immediately be reflected on your blog. Private authentication tokens help increasing the API limit to 5000 requests per hour (enough even for Digital Ocean blogs) and accessing private repositories. … … 40 41 `[history_github token=1d6ef5ba426648ef7d2273aca2fc80787 url=https://github.com/gis-ops/tutorials/blob/master/qgis/QGIS_PluginBasics.md]` 41 42 43 `[md_dashedbox_github token=1d6ef5ba426648ef7d2273aca2fc80787 url=https://github.com/gis-ops/tutorials/blob/master/qgis/QGIS_PluginBasics.md]` 44 42 45 ## Demo 43 46 … … 45 48 46 49 https://gis-ops.com/react-redux-leaflet-turfjs-building-a-density-based-clustering-dbscan-app-with-the-almighty-here-maps-places-api/ 50 51 https://www.beyond-storage.com/wordpress-plugin-github-markdown 47 52 48 53 ## Support … … 60 65 61 66 == Changelog == 67 = c1.2.0 = 68 * Add shortcode to display dashed box around post 69 62 70 = v1.1.0 = 63 71 * Add shortcode to display commit history
Note: See TracChangeset
for help on using the changeset viewer.