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
This plugin enhances your website's sidebar or page by creating a footer area where you can display important information. It automatically updates the copyright year or range, allows you to include your name or company with a URL, and provides links to a privacy policy, terms of service, and cookies policy pages. By utilising this plugin, you can easily showcase relevant legal information, personalise your website, and promote transparency and compliance.
8
+
9
+
## Installation
10
+
11
+
!> **Note: There are breaking changes in the configuration from `v4.x` to `v5.x`. Please take the time to read all the documentation before upgrading**
12
+
13
+
### Update `index.html` file
14
+
15
+
Assuming you have a working [docsify](https://docsify.js.org/) framework set up, it is easy to use the plugin.
16
+
17
+
1. Add one of the following script tags to your `index.html` via either CDN or downloading it and using it locally:
// the name you wish to display as the copyright holder
38
+
name:String,
39
+
40
+
// the URL (personal or company) which clicking the `name` goes to
41
+
url:String,
42
+
43
+
// the start year of copyright
44
+
copyYear:String,
45
+
46
+
// show the privacy policy link
47
+
policy: Bool |String,
48
+
49
+
// show the terms of service link
50
+
terms: Bool |String,
51
+
52
+
// show the cookies policy link
53
+
cookies: Bool |String,
54
+
55
+
// use your own css styles or the built in ones
56
+
customStyle: Bool |String
57
+
}
58
+
};
59
+
</script>
60
+
```
61
+
62
+
### Additional files
63
+
64
+
#### Default
65
+
66
+
If you set the `policy`, `terms`, or `cookies` options to `true` the URL links for those pages will look for the markdown files directly next to the `index.html` file:
If you host your policy, terms, or cookies messages on an external website (or need to link to a parent company policy) you can add them in as the full URL:
106
+
107
+
```js
108
+
// ... other config
109
+
policy:"https://my-other-website.com/policy",
110
+
terms:"https://my-other-website.com/terms",
111
+
cookies:"https://my-other-website.com/cookies",
112
+
// ... other config
113
+
```
114
+
115
+
These will open those pages in a new tab directly.
116
+
117
+
## Configuration
118
+
119
+
There are some options available for the `docsify-sidebarfooter`:
|`url`| String | url you want the `name` to link to |
125
+
|`copyYear`| String | first year of copyright |
126
+
|`policy`| Bool or String | - `false` hides it from the site<br/>- `true` defaults to `_policy.md`<br/>- a custom string will direct to that |
127
+
|`terms`| Bool or String | - `false` hides it from the site<br/>- `true` defaults to `_terms.md`<br/>- a custom string will direct to that |
128
+
|`cookies`| Bool or String | - `false` hides it from the site<br/>- `true` defaults to `_cookies.md`<br/>- a custom string will direct to that |
129
+
|`customStyle`| Bool or String | - `false` uses in-built css (sidebar styled)<br/>- `true` applies no styles, you can create your own<br/>- `sidebar` uses the in-built css designed for the sidebar<br/>- `body` uses the in-built css designed for the body |
130
+
131
+
## Usage
132
+
133
+
### Sidebar
134
+
135
+
At the bottom of your `_sidebar.md` file add the following code:
136
+
137
+
```html
138
+
<footerid="mb-footer"></footer>
139
+
```
140
+
141
+
### Body
142
+
143
+
Under the `<div id="app"></div>` in your `index.html` file, add the following code:
144
+
145
+
```html
146
+
<footerid="mb-footer"></footer>
147
+
```
148
+
149
+
## Styling
150
+
151
+
The links container is sectioned into different classes for you to customise as much (or little) as you wish.
Copy file name to clipboardExpand all lines: docs/README.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@ This plugin enhances your website's sidebar or page by creating a footer area wh
8
8
9
9
## Installation
10
10
11
+
!> **Note: There are breaking changes in the configuration from `v4.x` to `v5.x`. Please take the time to read all the documentation before upgrading**
12
+
11
13
### Update `index.html` file
12
14
13
15
Assuming you have a working [docsify](https://docsify.js.org/) framework set up, it is easy to use the plugin.
0 commit comments