# gatsby-theme-acmeblog-data

> The parent theme (that defines all the data needed) that will feed the `@gastby-theme-acmeblog` and, in a way, `@gatsby-theme-acme` (basically will be shadow acmeblog) themes with data.

Latest version **2.0.3** (published 2021-01-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install gatsby-theme-acmeblog-data
pnpm add gatsby-theme-acmeblog-data
yarn add gatsby-theme-acmeblog-data
bun add gatsby-theme-acmeblog-data
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.0.3 |
| Published | 2021-01-27 |
| First published | 2020-06-05 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 11 |
| Unpacked size | 19.3 KB |
| Known vulnerabilities | 0 (+3 in 3 direct dependencies) |
| Install scripts | no |
| Author | Tiago Sanchez |
| Maintainers | tiagofsanchez |
| Keywords | gatsby, gatsby-plugin, gatsby-theme |

## Links

- npm: https://www.npmjs.com/package/gatsby-theme-acmeblog-data
- npm.io page: https://npm.io/package/gatsby-theme-acmeblog-data

## Dependencies (11)

- [mkdirp](https://npm.io/package/mkdirp.md) ^1.0.4
- [prop-types](https://npm.io/package/prop-types.md) ^15.7.2
- [@mdx-js/mdx](https://npm.io/package/@mdx-js/mdx.md) ^1.6.1
- [@mdx-js/react](https://npm.io/package/@mdx-js/react.md) ^1.6.1
- [gatsby-plugin-mdx](https://npm.io/package/gatsby-plugin-mdx.md) ^1.2.5
- [gatsby-plugin-sharp](https://npm.io/package/gatsby-plugin-sharp.md) ^2.6.9
- [gatsby-remark-images](https://npm.io/package/gatsby-remark-images.md) ^3.3.8
- [gatsby-source-filesystem](https://npm.io/package/gatsby-source-filesystem.md) ^2.3.5
- [gatsby-transformer-sharp](https://npm.io/package/gatsby-transformer-sharp.md) ^2.5.3
- [gatsby-transformer-remark](https://npm.io/package/gatsby-transformer-remark.md) ^2.8.5
- [gatsby-remark-reading-time](https://npm.io/package/gatsby-remark-reading-time.md) ^1.1.0

## Recent versions

- 2.0.3 (latest) — 2021-01-27
- 2.0.2 — 2021-01-21
- 2.0.1 — 2020-11-03
- 1.0.14 — 2020-10-19
- 1.0.13 — 2020-10-12
- 1.0.12 — 2020-10-12
- 1.0.11 — 2020-10-12
- 1.0.10 — 2020-08-19
- 1.0.9 — 2020-08-19
- 1.0.8 — 2020-08-12
- 1.0.7 — 2020-07-21
- 1.0.6 — 2020-07-14
- 1.0.5 — 2020-07-06
- 1.0.4 — 2020-07-06
- 1.0.3 — 2020-07-02
- … 3 more at https://npm.io/package/gatsby-theme-acmeblog-data/versions

## README

# gatsby-theme-acmeblog-data

The parent theme (that defines all the data needed) that will feed the `@gastby-theme-acmeblog` and, in a way, `@gatsby-theme-acme` (basically will be shadow acmeblog) themes with data. 

## Motivation

First of all I wanted to learn how to build [gatsby themes](https://www.gatsbyjs.org/docs/themes/), and there is not better way to learn than doing, secondly because I loved the idea of being able to separate data concerns with ui concerns and wanted to apply that to my projects. 

This is a very simple theme that takes care of all the data concerns from building a blog with gatsby using Mdx.


## Installation 

with npm

```
npm install gatsby-theme-acmeblog-data
```

with yarn 

```
yarn add gatsby-theme-acmeblog-data
```

## Usage


### Theme options

| key      |  default value|  description |
|----------|-------------|------|
| `blogPath` |  `/blog` | defines the url (slug) for the blog posts overview page |
| `postsContentPath` |    `content/posts`   |   location of all the posts files |
| `postsContentThumbnail` | `content/thumbnail` |    location of all the thumbnails images used in the posts |
|`pagesContentPath`| `content/pages`| location of other pages that you would like to build using `mdx`|
|`otherImagesContentPath`| `content/images` | location for any other images that you would like to post in your |
|`tagsPath`| `/tags`| defines the url (slug) for all existing tags, shown in a overview tags page and used for listing all posts with a certain tag (prepending it to the tag itself, e.g. `/blog/tags/yourtag`) |
|`categoryPath`|`/category` | defines the url (slug) used for listing all posts with a certain category (prepending it to the category itself, e.g. `/blog/category/yourcategory`)  |
|`postTableOfContents`|`false`| If you would like to have a table of contents in your posts page change it to `true`|
|`githubUrl`|``| in case you are using github and want to create an edit link for your posts |


### How to use theme options

In `gatsby-config.js` you will be able to define the options

```js
module.exports = { 
  plugins: [
    {
      resolve: "gatsby-theme-acmeblog-data",
      options: { 
        blogPath: "/anything", // the default will be /blog
        tagsPath: "/mytags", // the default will be /tags
        categoryPath: "/mycategory", // the default will be /category
        postsContentPath: "myblog/posts", // the default will be content/posts
        pagesContentPath: "myblog/pages", // the default will be content/pages
        postsContentThumbnail: "myblog/thumbnails", // the default will be content/thumbnails
        otherImagesContentPath: "mysuperimages", // the default will be images
        postTableOfContents: false //the default is true
        githubUrl: `https://github.com/tiagofsanchez/tiagofsanchez/blob/master/`, // else defaults to '' and doesn't render
        gardenStartYear: 2021 // else it will default to 2019
      }
    },
  ],
};

```

## How to use Mdx for your posts

### Url (slug) of your posts

This will be automatically generated for you and it will be the name of the mdx file created 

The frontmatter will need to have the following structure 

```mdx
---
title: "My firstpost"
date: "2020-05-21"
category: Mdx  
tags: 
    - post
    - mdx
    - gatsby
thumbnail:  ../images/gatsby-icon.png  
---
```

- title - will be the title of the blog post
- date - will be the date that will be shown in the blog post; 
- category - defines the category of this post
- tags - the tags that you want this particular post to have
- thumbnail - in case you want to give the post a thumbnail


## Dev notes

There are a couple of things that I still need to do

- [ ] thumbnail is not totally implemented at `gatsby-theme-acmeblog`
- [ ] reading time for every posts
- [ ] Pagination implementation
- [ ] Next and previous post in the post page
- [ ] attached a PDF in a post

---
_Source: https://npm.io/package/gatsby-theme-acmeblog-data · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
