Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/markbattistella/docsify-sidebar-footer
Add some info at the bottom of your sidebar. Link to your personal website, a Privacy Policy, Terms of Service
https://github.com/markbattistella/docsify-sidebar-footer
cookie docsify docsify-plugin footer plugin privacy tos
Last synced: 20 days ago
JSON representation
Add some info at the bottom of your sidebar. Link to your personal website, a Privacy Policy, Terms of Service
- Host: GitHub
- URL: https://github.com/markbattistella/docsify-sidebar-footer
- Owner: markbattistella
- License: mit
- Created: 2020-08-17T11:37:34.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2023-05-22T04:31:58.000Z (over 1 year ago)
- Last Synced: 2024-05-19T19:23:38.710Z (8 months ago)
- Topics: cookie, docsify, docsify-plugin, footer, plugin, privacy, tos
- Homepage: https://footer.docsify.markbattistella.com
- Size: 189 KB
- Stars: 9
- Watchers: 1
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# docsify.js sidebar footer
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.
## Installation
!> **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**
### Update `index.html` file
Assuming you have a working [docsify](https://docsify.js.org/) framework set up, it is easy to use the plugin.
1. Add one of the following script tags to your `index.html` via either CDN or downloading it and using it locally:
```html
```1. In docsify setup configure the plugin:
```js
window.$docsify = {
autoFooter: {// the name you wish to display as the copyright holder
name: String,// the URL (personal or company) which clicking the `name` goes to
url: String,// the start year of copyright
copyYear: String,// show the privacy policy link
policy: Bool | String,// show the terms of service link
terms: Bool | String,// show the cookies policy link
cookies: Bool | String,// use your own css styles or the built in ones
customStyle: Bool | String
}
};
```### Additional files
#### Default
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:
```js
// ... other config
policy: true,
terms: true,
cookies: true,
// ... other config
``````md
- index.html --> https://your-awesome-site.com/#/
- _policy.md --> https://your-awesome-site.com/#/_policy
- _terms.md --> https://your-awesome-site.com/#/_terms
- _cookies.md --> https://your-awesome-site.com/#/_cookies
```#### Sub-folder
However, if you enter a string it will append that to the base URL of your website:
```js
// ... other config
policy: 'site/policy',
terms: 'site/terms',
cookies: 'site/cookies',
// ... other config
``````md
- index.html --> https://your-awesome-site.com/#/
- site/
\__ policy.md --> https://your-awesome-site.com/#/site/policy
\__ terms.md --> https://your-awesome-site.com/#/site/terms
\__ cookies.md --> https://your-awesome-site.com/#/site/cookies
```#### External links
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:
```js
// ... other config
policy: "https://my-other-website.com/policy",
terms: "https://my-other-website.com/terms",
cookies: "https://my-other-website.com/cookies",
// ... other config
```These will open those pages in a new tab directly.
## Configuration
There are some options available for the `docsify-sidebarfooter`:
| Setting | Type | Options |
|---------------|----------------|------------------------------------|
| `name` | String | your name or company |
| `url` | String | url you want the `name` to link to |
| `copyYear` | String | first year of copyright |
| `policy` | Bool or String | - `false` hides it from the site
- `true` defaults to `_policy.md`
- a custom string will direct to that |
| `terms` | Bool or String | - `false` hides it from the site
- `true` defaults to `_terms.md`
- a custom string will direct to that |
| `cookies` | Bool or String | - `false` hides it from the site
- `true` defaults to `_cookies.md`
- a custom string will direct to that |
| `customStyle` | Bool or String | - `false` uses in-built css (sidebar styled)
- `true` applies no styles, you can create your own
- `sidebar` uses the in-built css designed for the sidebar
- `body` uses the in-built css designed for the body |## Usage
### Sidebar
At the bottom of your `_sidebar.md` file add the following code:
```html
```
### Body
Under the `
` in your `index.html` file, add the following code:```html
```
## Styling
The links container is sectioned into different classes for you to customise as much (or little) as you wish.
```html
```
## Contributing
1. Clone the repo:
`git clone https://github.com/markbattistella/docsify-sidebarFooter.git`
2. Create your feature branch:
`git checkout -b my-feature`
3. Commit your changes:
`git commit -am 'Add some feature'`
4. `Push` to the branch:
`git push origin my-new-feature`
5. Submit the `pull` request