gatsby-theme-micro-blog

1.1.3 • Public • Published

📝 Micro blog Gatsby theme

code style: prettier CircleCI Slack

In the recent years, we've seen the web, a beautiful idea based on open principles and protocols, turned into a corporate web by investors-backed companies. Twitter, Medium, Facebook have convinced us to fuel their marketing machines making us lose control over our content and our attention.

Microblogging is an initiative inspired by the Indie web and the POSSE principle: publish (on your) own site, syndicate everywhere.

Developers that use Gatsby as a framework to build their static websites, and would like to add a timeline of short updates (micro posts) like Twitter does.

Usage 👩‍💻

  1. Add the dependency yarn add gatsby-theme-micro-blog.
  2. Add the plugin to your gatsby-config.js.
module.exports = {
  plugins: [
    {
      resolve: `gatsby-theme-micro-blog`,
      options: {
        rootDir: __dirname
      }
    }
  ],
}
  1. Add the timeline anywhere in your website:
import { Timeline } from 'gatsby-theme-micro-blog'

const MyPage = () => {
  return <Timeline/>
}
  1. Add some posts under the micro-posts directory in your project's root directory with the following structure:
micro-posts/
  1568192080/ # Unix timestamp
    post.mdx
  1568192095 / # Unix timestamp
    post.mdx

The posts are rendered with this component that uses Theme UI's theme specification for sizes, fonts and colors. You can use your own component by creating a component at src/gatsby-theme-micro-blog/components/post.jsx with the following structure:

import React from 'react'

export default ({ date, body, tags }) => {
  return <div>
    // Your component
  </div>
}

References

Open source

Tuist is a proud supporter of the Software Freedom Conservacy

Become a Conservancy Supporter!

License

FOSSA Status

Readme

Keywords

none

Package Sidebar

Install

npm i gatsby-theme-micro-blog

Weekly Downloads

1

Version

1.1.3

License

MIT

Unpacked Size

8.81 kB

Total Files

18

Last publish

Collaborators

  • pepibumur