npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gatsby-theme-simple-blog

v1.0.2

Published

Blog theme starter

Downloads

13

Readme

Simple blog - Gatsby Theme

Blog theme starter

✨ Features

  • Theme UI for styling
  • PrismJS highlighting
  • Gatsby Image
  • Posts in MDX
  • Tags
  • Static pages for non post types
  • SEO friendly
  • Fully customizable through gatsby-config.js, gatsby-plugin-theme-ui and shadow components
  • Linting with ESLint and Stylelint
  • Code formatting with Prettier

🚀 Installation

To use this theme in your Gatsby sites, follow these instructions:

  1. Install the theme

    # npm
    npm install --save gatsby-theme-simple-blog
    # yarn
    yarn add gatsby-theme-simple-blog
  2. Add the theme to your gatsby-config.js:

    module.exports = {
    	plugins: ["gatsby-theme-simple-blog"]
    };
  3. Start your site

    gatsby develop

⚙ Configuration

module.exports = {
	plugins: [
		{
			resolve: "gatsby-theme-simple-blog",
			options: {
				basePath: "", // base url "/"
				tagsPath: "", // tags url "/tags"
				contentPath: "", // content url for posts"/content/posts"
				assetPath: "" //  assets url "/content/assets"
			}
		}
	],
	siteMetadata: {
		url: "https://abdessalam.dev",
		title: "Simple blog",
		author: "Abdessalam",
		description: "Simple blog theme starter",
		locale: "en",
		socialLinks: [
			// links displayed in footer
			{
				text: "Twitter",
				link: "https://twitter.com/gatsbyjs"
			},
			{
				text: "GitHub",
				link: "https://github.com/gatsbyjs"
			}
		],
		navLinks: [
			// links display in navbar
			{
				text: "Home",
				link: "/"
			},
			{
				text: "About",
				link: "/about"
			},
			{
				text: "Contact",
				link: "/contact"
			}
		],
		themeConfig: {
			themeSwitcher: true, // enable theme switcher
			showNavLinks: true, // show links from navLinks array in navbar
			loadMorePosts: false, // enable load more posts
			postsPerPage: 10, // posts to display per page
			postsIncrementBy: 5 // posts increment value
		}
	}
};

💅 Customization

You can override theme components using Component Shadowing

  1. Create a folder with theme name gatsby-theme-simple-blog

  2. Override any component you want by creating a new one and its css file, for example Nav.js and Nav.css

src/gatsby-theme-simple-blog/components/Nav.js
  1. You can also override theme-ui theme style by creating gatsby-plugin-theme-ui folder and new object style or components or merge with theme file in index.js
src/gatsby-plugin-theme-ui
import baseTheme from "gatsby-theme-simple-blog/src/gatsby-plugin-theme-ui";
import merge from "lodash.merge";
export default merge({}, baseTheme, {
	colors: {},
	styles: {}
});
  1. You can also override or add new global css styles in assets as they are imported in globalStyle.js which has an importAll helper
import { importAll } from "./helpers";
importAll(require.context("../assets/", true, /\.css$/));

✍ Writing content

Example of release post in content/posts/[POST_TITLE]/index.mdx

You can create pages by passing type to page

---
type: post
title: Another post
date: 2019-07-23
draft: false
media: ./img1.jpeg
author: Abdessalam
tags:
  - Hello
  - Post
  - Welcome
---

Content goes here

🧐 What's inside?

.
├── node_modules
├── src
|   ├── assets
|   ├── components
|   |   ├── Layout.js
|   |   ├── Layout.css
|   |   ├── ...
|   |   └── SEO.js
|   ├── gatsby-plugin-theme-ui
|   ├──templates
|   |   ├── page.js
|   |   ├── posts.js
|   |   ├── post.js
|   |   └── tag.js
|   └── utils
|        ├── globalStyle.js
|        └── helpers.js
├── .gitignore
├── .prettierrc.js
├── .eslintrc.js
├── .stylelintrc.config.js
├── package.json
├── README.md
└── LICENSE

👨🏻‍💻👩‍💻 Contributing

Contributions, issues and feature requests are welcome !

Demo

Live demo

Author

Abdessalam BENHARIRA