Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atilafassina/blogium
📚 Medium as your CMS
https://github.com/atilafassina/blogium
cms medium writing
Last synced: 3 months ago
JSON representation
📚 Medium as your CMS
- Host: GitHub
- URL: https://github.com/atilafassina/blogium
- Owner: atilafassina
- License: mit
- Created: 2016-09-11T21:46:04.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-10-06T21:38:57.000Z (over 7 years ago)
- Last Synced: 2024-10-12T23:44:35.965Z (3 months ago)
- Topics: cms, medium, writing
- Language: JavaScript
- Homepage: https://medium.com/@atilafassina/introducing-blogium-d6ee1a343919
- Size: 133 KB
- Stars: 22
- Watchers: 5
- Forks: 5
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
[![Build Status](https://img.shields.io/travis/atilafassina/blogium/master.svg?style=flat)](https://travis-ci.org/atilafassina/blogium)> DEPRECATED: to use this, please refer to [Blogium-Service/examples/vanilla](https://github.com/atilafassina/blogium-service/tree/master/examples/vanilla)
## Install
- as a script inclusion
```html
```
- as an npm package
```
yarn add blogium
```
or
```
npm i --save blogium
```- as a bower package
```
bower i --save blogium
```Alternatively, you can always download a [.zip file](https://github.com/atilafassina/blogium/archive/master.zip)
---
## Get started
After including the script anyway suited you best, just instantiate `Blogium` with the desired set of options
```js
const blog = new Blogium(options);
```## Basic Usage
**Blogium** fires `success` and `error` event for the post request, you can listen to them:
```js
blog.on('blogium.success', response => { console.info('I have posts!', response) });
blog.on('blogium.error', response => { console.error('Oops, something has gone wrong', response) });
```## Options
### host (string)
You can pass a string to what will be considered by **Blogium** your root host.**Default**: `document.location.host`
### targetBlank (boolean)
If you want to set all outbound links (not directed to your host) as `_blank`.**Default**: `true`
### username (string)
The [Medium](https://medium.com/) handler to fetch the RSS Feed from.**Default**: **@Medium**
### moreBtn (string)
`id` to the more vouchers button.**Default**: `#moreBtn`
### Wrapper (class)
`class` to the element(s) posts will be appended in.**Default**: `.mediumWrap`
### defaultTemplate (boolean)
Weather to use the default template to list the posts or handle the data by yourself**Default**: `true`
### postLimit (number)
Number of posts to be listed on each view. (infinite scroll is always on, posts are all cached on first request)**Default**: `5`
### showCategories (boolean)
Show Medium categories for each post.**Default**: `true`
---
[MIT License - Atila Fassina](https://atilafassina.mit-license.org/)