You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+6-8
Original file line number
Diff line number
Diff line change
@@ -26,6 +26,12 @@ The following platforms are currently supported:
26
26
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](#caching). 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](#global-attributes) for details on how to do that.
27
27
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.
28
28
29
+
### Configuration
30
+
31
+
In the main menu _Settings_ ► _Documents from Git_ you can set all important global settings.
32
+
33
+
**Note**, previous versions used to include a `config.json`. This is **deprecated** now due to security concerns.
34
+
29
35
### Shortcodes
30
36
31
37
The plugin features a variety of shortcodes.
@@ -74,14 +80,6 @@ Each shortcode takes a few attributes, indicating if it's required for public or
74
80
|`limit`|`history`|:negative_squared_cross_mark:|:negative_squared_cross_mark:| integer | Limits the history of commits to this number. Default 5. |
75
81
|`classes`|`git-add-css`|:ballot_box_with_check:|:ballot_box_with_check:| string | The additional CSS classes to render the content with |
76
82
77
-
#### Global attributes
78
-
79
-
Since most attributes will be the same across the entire system, this plugin offers the possibility to set all attributes globally except for `url`:
80
-
81
-
In the menu *Plugins* ► *Plugin Editor*, choose "Documents from Git" and enter your preferences in the `includes/config.json`.
82
-
83
-
**Note**, setting the attributes manually in the shortcode has always precedence over any settings in `includes/config.json`.
84
-
85
83
#### Caching
86
84
87
85
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.
* Description: Render and cache various document formats in any post/page directly from a remote Git repository of your favorite platform via shortcodes. Currently supported: Markdown, Jupyter Notebooks.
6
-
* Version: 1.1.0
5
+
* Description: Render and cache various document formats in any post or page directly from a remote Git repository of your favorite platform via shortcodes. Currently supported: Markdown, Jupyter Notebooks.
'text' => __( 'Find the official documentation on <a href="https://github.com/gis-ops/wordpress-markdown-git" target="_blank">Github</a>. Contact us on <a href="mailto:enquiry@gis-ops.com">enquiry@gis-ops.com</a>.', 'documents-from-git' ),
'text' => __( 'Set (optional) CSS class names which can be wrapped with the <code>git-add-css</code> shortcode, see the <a href="https://github.com/gis-ops/wordpress-markdown-git#use-additional-css-classes-to-style" target="_blank">documentation</a> for usage examples.', 'documents-from-git' ),
'text' => __( 'The Time To Live (TTL) for cached documents, <b>in seconds</b>. Defaults to 1 week. To manually flush the case, see the <a href="https://github.com/gis-ops/wordpress-markdown-git#static-caching-cache_strategystatic" target="_blank">documentation</a>.', 'documents-from-git' ),
91
+
'value' => 604800,
92
+
'attributes' => array(
93
+
'required' => true
94
+
)
95
+
),
96
+
)
97
+
),
98
+
'git_github' => array(
99
+
'title' => __( 'Github', 'documents-from-git' ),
100
+
'text' => __( 'Regardless if you host any documents on Github, it\'s wise to provide the credentials. The plugin will render Markdown documents via Github\'s <code>/markdown</code> endpoint.', 'documents-from-git' ),
0 commit comments