akanshgulati / gatsby-theme-ghost

Minimalistic Gatsby theme, mobile and SEO friendly and supports author, tag and static pages.
https://gatsby-theme-ghost.netlify.com
MIT License
44 stars 24 forks source link
blog-template blog-theme gatsby ghost hacktoberfest minimalistic template theme

Ghost Gatsby Theme

gatsby-theme-ghost is released under the MIT license. Current npm package version. PRs welcome! Follow @akanshgulati Netlify Status


Minimalistic Gatsby theme, mobile and SEO friendly and supports author, tag and static pages

Ghost Chrome mockup

Live Preview

📦 Installation

Gatsby

gatsby new gatsby-blog akanshgulati/gatsby-theme-ghost

This will generate a new site (with the folder name "gatsby-blog") that pre-configures use of the theme including example content.


💥 Features


👨‍💻 Development

yarn dev


⚙️ Configuration

Change the website configuration at utils/siteConfig.js file.

  1. Add Disqus short name for enabling comments on posts
  2. Update the navigation links shown in header of website
  3. Update username of the Twitter and Facebook for icons shown in header of website
module.exports = {  
  siteUrl: `https://gatsby-theme-ghost.netlify.com`, // Site domain. Do not include a trailing slash!  

  postsPerPage: 12, // Number of posts shown on paginated pages (changes this requires sometimes to delete the cache)  

  siteTitleMeta: `Gatsby Theme Ghost`, // This allows an alternative site title for meta data for pages.  
  siteDescriptionMeta: `Minimalistic Gatsby theme for blogs`, // This allows an alternative site description for meta data for pages.  
  siteTwitterHandle: `@akanshgulati`,  
  siteFacebookHandle: `akanshgulati`,  
  language: `en`
  // ...


📝 Adding Content

New Post

  1. Create a directory for every post under src/posts directory, having a markdown file (.md extension)
  2. Add following meta information:
    • title*: The title of the post
    • date*: The creation date of the markdown file
    • slug*: Url of the post
    • draft*: Accepts true/false as value for visibility of the post
    • tags*: Add tag_id of different tags in yaml format
    • author*: Add author_id of author
    • comment*: To show comment on the page bottom
    • feature_image*: The URL of the image shown at the top of the article
    • created_at*: Date of the creation of the post (same as date above)
    • published_at*: The date of the publishing of the post
    • updated_at*: The date of the updating of the post
      1. Add all images and other media content in the same directory as markdown file.

Note: Create all tags and authors markdown files before adding it in post.

New Tag

  1. Create a markdown file by the new tag name under src/tags directory.
  2. Add following meta information:
    • tag_id*: The id which is mapped with post's tags
    • name*: Name as shown on posts if added
    • slug*: Url of the tag page
    • description: Description shown on the tag pages before the list of posts

New Author

  1. Create a markdown file by the new tag name under src/authors directory.
  2. Add following meta information:
    • author_id*: The id which is mapped with post's author name
    • name*: Name as shown on posts if added
    • slug*: Url of the author page
    • profile_image*: Url of the author image for each post on home page and author page.
    • description: Description shown on the author pages before the list of posts
    • twitter: Username of the Twitter for author page
    • facebook: Username of the Facebook for author page
    • website: URL of the personal website of the author

New Page

  1. Create a markdown file by the new tag name under src/pages directory.
  2. Add following meta information:
    • title*: The title shown at the top of the page
    • date*: Date of creation of the page
    • draft*: Decides if the page is to be shown to public, can have true/false value
    • slug*: URL of the page
    • created_at*: Date of the creation of the page (same as date above)
    • published_at*: The date of the publishing of the page
    • updated_at*: The date of the updating of the page
  3. Add body content of the page after the meta information

*Required**


🔭 Directory Structure

.    
├── plugins    
│   └── gatsby-plugin-ghost-manifest    
├── public    
├── src  
│   ├── authors  
│   │   ├── akansh.md  
│   ├── pages    
│   │   └── about    
│   ├── posts    
│   │   ├── best-practises-to-select-cdn  
│   │   ├── ...    
│   │   └── ...   
│   ├── tags  
│   │   ├── javascript.md  
│   ├── components    
│   │   └── common    
│   │       └── meta  
│   ├── styles   
│   ├── templates    
│   └── utils    
│       └── rss    
└── static    


☑️ Todo

💪 Maintainer

Akansh Gulati