Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        

logo-Blogium
[![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/)