WordPress maintenance or security needs? Reach out!
TLDWP

Plugin: documents-from-git (Used by 59 domains)

Documents from Git

Official documentation: https://github.com/gis-ops/wordpress-markdown-git

This WordPress Plugin lets you easily publish, collaborate on and version control your [Markdown, Jupyter notebook] documents directly from your favorite remote Git platform, even if it’s self-hosted.

The advantages are:

  • Write documents in your favorite editor and just push to your remote repository to update your blog instantly
  • Use the power of version control: publish different versions of the document in different posts, i.e. from another branch or commit than latest master
  • Easy to update by your readers via pull requests, minimizing the chance of stale tutorials

The following document types are currently supported:

  • Markdown
  • Jupyter notebooks (only for public repositories)

The following platforms are currently supported:

  • Github
  • Bitbucket
  • Gitlab

Usage

Note, this plugin uses Github’s wonderful /markdown API to render to HTML. This comes with 2 caveats:

  1. Unless authenticated, the rate limit is set at 60 requests per minute. Since v1.1.0 the plugin is capable of statically caching content. In case that’s not dynamic enough for you, your only option currently is to not use any cache in which case every document will be pulled from your provider every time someone opens it on your site. Then it’s strongly recommended to create a Github access token and register it with the plugin. Then the rate limit will be set to 5000 requests per hour. See Global attributes section for details on how to do that.
  2. The Markdown content cannot exceed 400 KB, so roughly 400 000 characters incl whitespace. If not a monographic dissertation, this should not be an applicable limit though.

Shortcodes

The plugin features a variety of shortcodes.

Publish documents

The document-specific shortcodes follow a pattern of [git--], where

  • can be one of
    • github: if you use Github as your VCS platform
    • bitbucket: if you use Bitbucket as your VCS platform
    • gitlab: if you use Gitlab as your VCS platform
  • can be one of
    • markdown: Render your Markdown files hosted on your VCS platform in Github’s rendering style
    • jupyter: Render your Jupyter notebook hosted on your VCS platfrom (only for public repositories)
    • checkout: Renders a small badge-like box with a link to the document and the date of the last commit
    • history: Renders a

      section with the last commit dates, messages and authors

Manipulate rendering style

Additionally, there’s an enclosing shortcode [git-add-css] which adds a

to wrap its contents. That way you can manipulate the style freely with additional CSS classes. Follow these steps:

  1. Add a CSS file to your theme’s root folder, which contains some classes, e.g. class1, class2, class3
  2. Enqueue the CSS file by adding wp_enqueue_style('my-style', get_template_directory_uri().'/my-style.css'); to the theme’s functions.php
  3. Add the enclosing git-add-css shortcode to your post with the custom CSS classes in the classes attribute, e.g.:

    [git-add-css classes="class1 class2 class3"]
    [git-gitlab-checkout url=...]
    [git-gitlab-markdown url=...]
    [git-gitlab-history url=...]
    [/git-add-css]

Attributes

Each shortcode takes a few attributes, indicating if it’s required for public or private repositories:

Attribute
Action
Public repo
Private repo
Type
Description

url
all except git-add-css
:ballot_box_with_check:
:ballot_box_with_check:
string
The browser URL of the document, e.g. https://github.com/gis-ops/wordpress-markdown-git/blob/master/README.md

user
all except git-add-css
:negative_squared_cross_mark:
:ballot_box_with_check:
string
The user name (not email) of an authorized user

token
all except git-add-css
:negative_squared_cross_mark:
:ballot_box_with_check:
string
The access token/app password for the authorized user

cache_ttl
all except git-add-css
:negative_squared_cross_mark:
:negative_squared_cross_mark:
integer
The time in seconds that the plugin will cache, only for cache_strategy=static.

cache_strategy
all except git-add-css
:negative_squared_cross_mark:
:negative_squared_cross_mark:
integer
Only static caching is implemented so far. dynamic caching is on the way!

limit
history
:negative_squared_cross_mark:
:negative_squared_cross_mark:
integer
Limits the history of commits to this number. Default 5.

classes
git-add-css
:ballot_box_with_check:
:ballot_box_with_check:
string
The additional CSS classes to render the content with

Global attributes

Since most attributes will be the same across the entire system, this plugin offers the possibility to set all attributes globally except for url:

In the menu PluginsPlugin Editor, choose “Documents from Git” and enter your preferences in the includes/config.json.

Note, setting the attributes manually in the shortcode has always precedence over any settings in includes/config.json.

Caching

Often we need to prioritize speed when loading content and, in addition, it is very costly to fetch, load and format the content every time we need to read the content of the post.

This plugin soon offers 2 methods for caching, static and dynamic which can be set via the cache_strategy property.

Static caching (cache_strategy=static)

This is the default strategy, as it doesn’t require any user action.

The property cache_ttl sets how many seconds the content cache will keep alive.

Currently there’s no way to flush the cache manually. However, changing cache_ttl or the history limit will create a new cache.

Dynamic caching (cache_strategy=dynamic)

This is not implemented yet. See #20 for details.

Token authorization

You need to authorize via user and token if you intend to publish from a private repository. You don’t need to authorize if the repository is open.

However, keep in mind that some platforms have stricter API limits for anonymous requests which are greatly extended if you provide your credentials. So even for public repos it could make sense. And unless you use this plugin’s caching capabilities, it’s strongly recommended to register a Github access token regardless of the VCS hosting platform, see the beginning of the chapter.

How to generate the token depends on your platform:

This plugin needs only Read access to your repositories. Keep that in mind when creating an access token.

Examples

We publish our own tutorials with this plugin: https://gis-ops.com/tutorials/.

Publish Markdown from Github

[git-github-markdown url="https://github.com/gis-ops/tutorials/blob/master/qgis/QGIS_SimplePlugin.md"]

Publish Markdown from Github with 1 hour cache

[git-github-markdown url="https://github.com/gis-ops/tutorials/blob/master/qgis/QGIS_SimplePlugin.md" cache_ttl="3600" cache_strategy="static"]

Publish Jupyter notebook from Github

[git-github-jupyter url="https://github.com/GIScience/openrouteservice-examples/blob/master/python/ortools_pubcrawl.ipynb"]

Publish from a private repository

[git-bitbucket-jupyter user=nilsnolde token=3292_2p3a_84-2af url="https://bitbucket.org/nilsnolde/test-wp-plugin/src/master/README.md"]

Display last commit and document URL from Bitbucket

[git-bitbucket-checkout url="https://bitbucket.org/nilsnolde/test-wp-plugin/src/master/README.md"]

Display commit history from Gitlab

git-gitlab-history limit=5 url="https://gitlab.com/nilsnolde/esy-osm-pbf/-/blob/master/README.md"]

Use additional CSS classes to style

The following example will put a dashed box around the whole post:

`

[git-add-css classes=”md-dashedbox”]
[git-github-checkout url=”https://github.com/gis-ops/tutorials/blob/master/qgis/QGIS_SimplePlugin.md”]
[git-github-markdown url=”https://github.com/gis-ops/tutorials/blob/master/qgis/QGIS_SimplePlugin.md”]
[git-github-history url=”https://github.com/gis-ops/tutorials/blob/master/qgis/QGIS_SimplePlugin.md”]
[/git-add-css]
`

With the following CSS file contents enqueued to your theme:

`css

div.md_dashedbox {
position: relative;
font-size: 0.75em;
border: 3px dashed;
padding: 10px;
margin-bottom:15px
}

div.md_dashedbox div.markdown-github {
color:white;
line-height: 20px;
padding: 0px 5px;
position: absolute;
background-color: #345;
top: -3px;
left: -3px;
text-transform:none;
font-size:1em;
font-family: “Helvetica Neue”,Helvetica,Arial,sans-serif;
}
`

DomainExposuresHeadersLast Checked
d*g*t*l*c*u*t*r*u*i.ch (WP 7.0.4) F Aug 16, 2026
d*p*a*a*m*s*r*.com (WP 6.9.7) C Aug 15, 2026
c*e*e*c*f*e*.de (WP 5.8.1) F Aug 7, 2026
o*r*i*f*r*a*i*.de (WP 7.0.3) F Aug 7, 2026
l*k*d*.eu (WP 6.8.6) F Aug 6, 2026
r*n*i*i*-*i*.de (WP 5.8.1) F Aug 5, 2026
p*n*h*l*t*o*m.io (WP 6.9.5) F Aug 2, 2026
s*m*a*e*g*m*s.com (WP 6.9.4) F Jul 31, 2026
t*e*o*o*k*f*a.com (WP 7.0.2) F Jul 30, 2026
m*r*h*n*a*.com (WP 7.0.2) F Jul 30, 2026
0*5*o*u*i*n.com (WP 6.1.10) F Jul 29, 2026
f*y*i*h*.com (WP 7.0.2) F Jul 28, 2026
n*r*v*s*m.com A Jul 26, 2026
d*t*a*h*o*g.org F Jul 25, 2026
p*e*i*n*r*i*i*g.com (WP 6.8.3) F Jul 25, 2026
p*e*i*n*a*a.com (WP 6.8.3) F Jul 25, 2026
d*i*v*n*v.com (WP 7.0.2) F Jul 25, 2026
v*i*e*.com (WP 7.0.2) F Jul 25, 2026
c*c*r*r.com (WP 7.0.2) F Jul 24, 2026
o*e*r*d*t*n*.org (WP 7.0.2) C Jul 24, 2026
r*o*c*c.com (WP 7.0.2) F Jul 23, 2026
p*c.edu F Jul 23, 2026
c*d*w*t*a*h*v*l*e.org F Jul 23, 2026
s*i*i*s*i*u*.de F Jul 22, 2026
s*g*i*t*o*t*a*e.com (WP 6.8.6) F Jul 22, 2026
a*z*a*s.eu F Jul 20, 2026
r*b*n*e*k*.com (WP 6.2.9) F Jul 20, 2026
s*l*r*p*a*i*.de (WP 7.0.2) B Jul 19, 2026
o*e*a*e*t*y.com F Jul 18, 2026
o*e*t*i*g*a*.com (WP 7.0) F Jul 18, 2026
s*l*r*p*a*i*.com (WP 7.0.1) B Jul 16, 2026
k*s*a*i*e*a*k*.com (WP 6.9.4) F Jul 14, 2026
d*n*e*e*a*s*.com (WP 7.0.1) F Jul 12, 2026
j*r*m*b*u*.com (WP 6.9.4) F Jul 9, 2026
l*n*o*n*a*g*d*.com (WP 6.8.5) F Jul 8, 2026
j*v*o.rs F Jul 7, 2026
c*n*.ca (WP 7.0) F Jul 7, 2026
s*s*e*c*a*t*m*n.com (WP 6.9.4) F Jul 7, 2026
p*n*h*l*t*o*m.com (WP 6.9.4) F Jul 7, 2026
x*r*.us C Jul 6, 2026
b*n*f*t*t*.com (WP 6.7.1) F Jul 6, 2026
p*i*a*s.com (WP 6.8.3) F Jul 6, 2026
m*r*s*b*o*.com (WP 7.0) F Jul 6, 2026
c*n*r*l*y*a*.com (WP 6.9.4) F Jul 6, 2026
g*l*e*-*i*q*i*.com F Jul 6, 2026
a*-*a*k*.com F Jul 6, 2026
c*d*w*t*a*h*v*l*e.com F Jul 6, 2026
p*a*o*.com F Jul 5, 2026
b*n*f*t.sg (WP 6.7.1) F Jul 4, 2026
b*r*.rs F Jul 4, 2026
c*a*.de (WP 7.0) F Jul 4, 2026
s*i*u*1*.com (WP 6.9.4) F Jul 4, 2026
s*i*n*m*n*.com (WP 7.0) F Jul 4, 2026
c*o*d*a*i*e*a*k*.com (WP 6.9.4) F Jul 4, 2026
b*h*a*.com (WP 7.0) C Jul 4, 2026
n*c*l*c*a*f*r*n*.ch (WP 5.9.13) F Jul 3, 2026
g*t*o*.com (WP 6.8.3) F Jul 2, 2026
c*n*e*f*r*a*a*u*l*t*.com C Jul 2, 2026
s*d*g*o*e.com (WP 6.9.4) F Jul 1, 2026

Top 50 Plugins

Plugin Count
elementor 1,769,396
contact-form-7 1,749,773
elementor-pro 1,052,360
woocommerce 816,523
revslider 607,520
jetpack 453,644
js_composer 418,743
wp-rocket 341,309
essential-addons-for-elementor-lite 264,228
gravityforms 256,634
complianz-gdpr 256,278
google-site-kit 233,744
cookie-law-info 227,843
instagram-feed 224,048
sitepress-multilingual-cms 210,255
header-footer-elementor 206,197
google-analytics-for-wordpress 204,604
bluehost-wordpress-plugin 192,370
elementskit-lite 179,845
gutenberg 167,763
cookie-notice 148,112
litespeed-cache 145,750
gtranslate 124,381
wpforms-lite 123,164
the-events-calendar 121,976
astra-sites 112,770
popup-maker 109,305
woocommerce-payments 108,997
gutenberg-core 107,135
tablepress 102,355
honeypot 97,786
astra-addon 93,613
wp-smushit 90,577
duracelltomi-google-tag-manager 90,395
layerslider 88,855
all-in-one-seo-pack 88,730
coblocks 87,817
bb-plugin 86,553
akismet 84,720
premium-addons-for-elementor 84,016
ml-slider 82,465
cleantalk-spam-protect 82,240
mailchimp-for-wp 81,339
megamenu 80,150
woocommerce-gateway-stripe 79,185
jet-engine 78,044
ewww-image-optimizer 76,911
fusion-builder 76,781
wp-pagenavi 76,523
smart-slider-3 75,961

Top 50 Themes

Theme Count
hello-elementor 620,565
Divi 494,193
astra 413,207
flatsome 141,406
Avada 120,606
generatepress 114,739
oceanwp 80,169
kadence 78,403
pub 74,996
enfold 68,437
salient 64,873
twentyseventeen 54,245
bb-theme 53,180
twentytwentyfour 52,674
betheme 52,483
blocksy 50,831
cocoon-master 49,263
dt-the7 45,384
twentytwentyfive 45,260
woodmart 44,189
neve 37,980
h4 37,399
Avada-Child-Theme 36,887
gox 36,371
bridge 31,166
twentytwentyone 30,184
lightning 30,087
twentytwenty 28,687
swell 28,193
bricks 26,568
Impreza 26,008
Newspaper 24,199
twentytwentythree 22,094
epik-redesign 19,109
twentytwentytwo 18,747
uncode 18,431
pro 17,605
twentysixteen 17,599
storefront 16,274
sydney 16,206
Total 14,321
hello-theme-child-master 14,051
factory-templates-4 13,716
themify-ultra 12,948
extendable 12,599
hestia 12,549
yootheme 12,456
yith-wonder 12,053
porto 11,955
twentyfifteen 11,867