This should deliver updates for plugins provided by https://magiiic.com.
However this project just started. So this plugin does nothing yet, or worst, does random things.
Currently, the plugin simply provides booking id and user-defined amount fields to WooCommerce products, to allow keeping track of payments related to externally managed bookings.
The final goal will be to use this booking id to fetch booking data from Lodgify and display a comprehensive detail of the reservation in WooCommerce order (accommodation, name of guest, booking dates, deposit and total amount…)
Simple plugin to disable admin notifications when users change their password. No configuration, activate the plugin and voilà.
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:
masterThe following document types are currently supported:
The following platforms are currently supported:
Note, this plugin uses Github’s wonderful /markdown API to render to HTML. This comes with 2 caveats:
In the main menu Settings > Documents from Git you can set all important global settings.
Note: previous config.json is deprecated now due to security concerns.
The features of the plugin are provided through shortcodes. You can use them in your posts, pages or custom post types.
[git-<platform>-<action>] The document-specific shortcode
<platform> can be one of
github: if you use Github as your VCS platformbitbucket: if you use Bitbucket as your VCS platformgitlab: if you use Gitlab as your VCS platform<action> can be one of
markdown: Render your Markdown files hosted on your VCS platform in Github’s rendering stylejupyter: Render your Jupyter notebook hosted on your VCS platform (only for public repositories)checkout: Renders a small badge-like box with a link to the document and the date of the last commithistory: Renders a <h2> section with the last commit dates, messages and authors[git-add-css] adds a <div id="git-add-css" class="<classes_attribute>" to wrap content. That way you can manipulate the style freely with additional CSS classes. Follow these steps:
class1, class2, class3wp_enqueue_style('my-style', get_template_directory_uri().'/my-style.css'); to the theme’s functions.phpgit-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]
Each shortcode takes a few attributes, indicating if it’s required for public or private repositories:
url: The URL of the document in the repository
git-add-cssuser: The user name (not email) of an authorized user
git-add-csstoken: The access token/app password for the authorized user
git-add-csscache_ttl: The time in seconds that the plugin will cache, only for cache_strategy=static.
git-add-csscache_strategy: Only static caching is implemented so far. dynamic caching is on the way!
git-add-csslimit: Limits the history of commits to this number. Default 5.
historyclasses: The additional CSS classes to render the content with
git-add-cssOften 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.
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.
cache_strategy=dynamic)This is not implemented yet. See #20 for details.
Token authorizationYou 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.
We publish our own tutorials with this plugin: https://gis-ops.com/tutorials/.
[git-github-markdown 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" cache_ttl="3600" cache_strategy="static"]
[git-github-jupyter url="https://github.com/GIScience/openrouteservice-examples/blob/master/python/ortools_pubcrawl.ipynb"]
[git-bitbucket-jupyter user=nilsnolde token=3292_2p3a_84-2af url="https://bitbucket.org/nilsnolde/test-wp-plugin/src/master/README.md"]
[git-bitbucket-checkout url="https://bitbucket.org/nilsnolde/test-wp-plugin/src/master/README.md"]
git-gitlab-history limit=5 url="https://gitlab.com/nilsnolde/esy-osm-pbf/-/blob/master/README.md"]
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:
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; }
The latest version is on Oli’s GitHub repository
https://github.com/magicoli/documents-from-git
There is no automatic update process from GitHub. You need to download the latest release and upload it to your WordPress installation, or, for advanced users, clone the repository into your wp-content/plugins folder and use git features.
Note: The release from the original author on WordPress plugin store is deprecated and does not receive updates Documents from Git.
For troubleshooting and frequently asked questions, please refer to the FAQ page.
Contributions from other projects
The file structure has been reorganised from the original version to make it more maintainable and to follow WordPress best practices, mainly bringing the wordpress file structure to the root folder, so applying this repo modifications to an original clone might need some extra preparation, but is not impossible.
github-markdown-css: CSS project for the Github flavored Markdown style, License MIT
nbconvert: WordPress plugin to convert Jupyter notebooks into blog posts, License MIT
nbconvert and borrows some of the HTML and the CSS for Jupyter notebooks