gatsby-theme-nano-blog v1.1.1
📝 Nano blog
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.
Nano blog 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 (nano posts) like Twitter does.
Usage 👩💻
Gatsby theme 🎨
- Add the dependency
yarn add gatsby-theme-nano-blog
. - Add the plugin to your
gatsby-config.js
.
module.exports = {
plugins: [
{
resolve: 'gatsby-theme-nano-blog',
},
],
}
- Add the timeline anywhere in your website:
import { Timeline } from 'gatsby-theme-nano-blog'
const MyPage = () => {
return <Timeline/>
}
- Add some posts under the
nano-posts
directory in your project's root directory with the following structure:
nano-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-nano-blog/nano-post.jsx
with the following structure:
import React from 'react'
export default ({ date, body, tags }) => {
return <div>
// Your component
</div>
}
macOS app 💻
The macOS app is a client to publish nano posts on your Gatsby website.
- Clone the repository
git@github.com:tuist/nano-blog.git
. - Install Tuist
- Run
tuist focus
in theApp
directory. - Compile and lunch the app on your device.
References
Open source
Tuist is a proud supporter of the Software Freedom Conservacy