All Projects → mlent → gatsby-theme-help-center

mlent / gatsby-theme-help-center

Licence: MIT license
A Gatsby theme for your knowledge base or help center

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to gatsby-theme-help-center

gatsby-attila-theme-ghost
A Gatsby theme plugin for creating blogs from headless Ghost CMS.
Stars: ✭ 16 (-83.16%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-gallery
🏞 A Gatsby Theme for adding a gallery to your site.
Stars: ✭ 40 (-57.89%)
Mutual labels:  gatsby, gatsby-theme
gatsby-themes
A collection of open source, well designed, highly customizable and 100% free Gatsby themes for blazing fast sites. We are working on the next version of the Flex theme. See https://github.com/reflexjs/reflexjs
Stars: ✭ 296 (+211.58%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-portfolio-minimal
A Gatsby Theme to create modern one-page portfolios with a clean yet expressive design.
Stars: ✭ 51 (-46.32%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-deck-n-blog
Create a deck (with mdx-deck) and a blog post from the same MDX
Stars: ✭ 17 (-82.11%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-egghead-blog
This is a theme version of our gatsby-starter-egghead-blog.
Stars: ✭ 18 (-81.05%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-dox
Documentation made easy with Gatsby. 🎉
Stars: ✭ 29 (-69.47%)
Mutual labels:  gatsby, gatsby-theme
guitar-book
Open Source, Gatsby theme, mobile and SEO friendly with PWA for building guitar/song books. 🎸 🎤 🎵
Stars: ✭ 29 (-69.47%)
Mutual labels:  gatsby, gatsby-theme
gatsby-starter-rocketdocs
The documentation starter you were looking for ⚡️
Stars: ✭ 215 (+126.32%)
Mutual labels:  gatsby, gatsby-theme
livestream-gatsby-themes
Source code to demonstrate how to build Gatsby themes, child themes, and sites using themes.
Stars: ✭ 24 (-74.74%)
Mutual labels:  gatsby, gatsby-theme
gatsby-starter-theme-antv
⚛️ Gatsby's starter of 👉
Stars: ✭ 34 (-64.21%)
Mutual labels:  gatsby, gatsby-theme
Mdx Deck
♠️ React MDX-based presentation decks
Stars: ✭ 10,487 (+10938.95%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-amsterdam
A Gatsby theme for artists, photographers and other creative folks 👨‍🎨
Stars: ✭ 133 (+40%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-nehalem
A Gatsby blog theme.
Stars: ✭ 168 (+76.84%)
Mutual labels:  gatsby, gatsby-theme
gatsby-theme-jam-example
An example submission for the Gatsby Theme Jam.
Stars: ✭ 89 (-6.32%)
Mutual labels:  gatsby, gatsby-theme
gatsby-remark-images-anywhere
Handle images with relative, absolute & remote path for gatsby-transformer-remark & gatsby-plugin-mdx
Stars: ✭ 22 (-76.84%)
Mutual labels:  gatsby
DevIQ-gatsby
No description or website provided.
Stars: ✭ 21 (-77.89%)
Mutual labels:  gatsby
gatsby-drupal-kit
A Gatsby V2 starter kit designed to work with a new Drupal 8 site.
Stars: ✭ 23 (-75.79%)
Mutual labels:  gatsby
federalist-uswds-gatsby
A template for Federalist that uses Gatsby and USWDS 2.0
Stars: ✭ 35 (-63.16%)
Mutual labels:  gatsby
blog
[WIP] 基于 Unisite 开发的个人博客。【Unisite 正处于开发阶段,请小心使用。】
Stars: ✭ 26 (-72.63%)
Mutual labels:  gatsby

This Gatsby theme is designed for creating a knowledge base or help center for your product.

Gatsby Help Center theme

You can see a demo here: https://gatbsy-theme-help-center.netlify.app

gatsby-theme-help-center ⚠️ WIP

Features

  • Categories - Incl. images, titles, descriptions
  • SEO and Sharing metadata - Rich previews, social markup, and SEO metadata
  • MDX - For writing the articles
  • Customization - Logo, links, colors, and a few terms
  • Featured articles - Shown on the home page
  • Related articles - Which display at the bottom of other articles

Installation

Using gatsby new

The easiest way to create a new Gatsby site with this theme is to use the gatsby-starter-help-center repo:

gatsby new your-site https://github.com/mlent/gatsby-starter-help-center
cd your-site
npm run develop # or yarn develop

Where your-site is the name of the directory you want to create the new site.

Manually

The most up-to-date docs on installing a Gatsby theme can be found on the Gatsby website, but here's a summary using this theme as an example:

npm install --save @mlent/gatsby-theme-help-center

# or

yarn add @mlent/gatsby-theme-help-center

Then edit your gatsby-config.js file:

module.exports = {
  plugins: [
    {
      resolve: '@mlent/gatsby-theme-help-center',
      options: {
        basePath: '/',
        // Configure a syntax highlighting theme for fenced code blocks
        // Full list here https://github.com/octref/shiki/tree/master/packages/themes
        shikiTheme: 'nord'
      }
    }
  ]
};

Customization

Site Metadata

You will want to customize all the site metadata:

module.exports = {
  plugins: [
    {
      resolve: '@mlent/gatsby-theme-help-center',
      options: {
        basePath: '/'
      }
    }
  ],
  siteMetadata: {
    // Language settings
    htmlLang: 'en',
    contentLang: 'en-us',

    // Fallback title in case a title is not defined for the page
    title: 'Gatsby Help Center Theme',

    // Aside from the home page, this template will be used for all category/article pages
    titleTemplate: '%s · Gatsby Help Center Theme',

    // Meta description
    description: 'A help center theme for Gatsby.',

    // Base URL for your help center
    siteUrl: 'https://gatbsy-theme-helpsy.netlify.app',

    // Use for the og:site_name property
    siteName: 'A Help Center Theme for Gatsby',

    // Logo that appears in the top left corner
    logoUrl: '/images/logo.png',

    // Text that appears next to the logo
    logoLabel: 'Help Center',

    // Placeholder for search input field
    searchText: 'Search',

    // Your favicon
    faviconUrl: '/images/favicon.png',

    // Image to be used when sharing articles on social media
    socialSharingImageUrl: '/images/social-sharing-default.png',

    // Your product's twitter handle
    twitter: '@monicalent',

    // Your product's Facebook page
    facebookUrl: 'https://www.facebook.com/yourpage',

    // Text/url for main call-to-action button
    ctaButtonText: 'Open on GitHub',
    ctaButtonUrl: 'https://github.com/mlent/gatsby-theme-help-center',

    // Text/url for secondary link next to call-to-action button
    linkText: 'See demo',
    linkUrl: 'https://gatbsy-theme-help-center.netlify.app/',

    // Main headline
    headline: 'How can we be helpful?',

    // Footer
    footerText: 'Back to main website',
    footerUrl: 'https://monicalent.com',

    // Google Analytics setup (Optional)
    googleTagManagerId: '',
    googleAnalyticsMeasurementId: ''
  }
};

Add additional meta tags

You can shadow this file in order to add more custom meta tags (for example site verification tags or other external scripts):

import React from 'react';
import { Helmet } from 'react-helmet';

export const CustomHead = () => (
  <Helmet>
    {/* Replace with whatever you want */}
  </Helmet>
);

Your file should be located at: src/@mlent/gatsby-theme-help-center/components/CustomHead.tsx

Content: Categories

Create your own YML file at src/data/categories/data.yml and provide as many categories as you'd like in the following format:

- name: Get Started
  slug: getting-started
  description: Write helpful content about how to start using your product.
  image: /images/getting-started.svg
- name: FAQs
  slug: faqs
  description: Frequently asked questions that your user email you about.
  image: /images/faqs.svg
- name: Tutorials
  slug: tutorials
  description: Step-by-step guides for using various features in your app.
  image: /images/tutorials.svg

The illustrations from the sample site are from Undraw.

Content: Articles

Create new articles by creating mdx files in src/data/pages and providing the following frontmatter:

---
title: Example Article No. 2
description: Example description that will go in the SEO description
author: Monica
categories: ["faqs"]
date: 2019-01-29
featured: true
relatedArticles: ["example-article"]
---

## What's up!

Hello fellow kids, this is another article.

Note: The Author field is currently not used in the layout but may be in the future.

You may associate articles with more than one category and it will appear in both sections.

Look and feel: Colors

Edit or create a file at src/@mlent/gatsby-theme-help-center/themes/colors.ts to customize colors:

export const COLORS = {
  // This is used for the header stripe
  primary: {
    light: '#63ccff',
    main: '#4285f4',
    dark: '#006db3',
    contrastText: 'white',
  },
  secondary: {
    light: '#ff8cb3',
    dark: '#c51162',
    main: '#f50057',
    contrastText: 'white',
  },
  success: {
    light: '#ADE488',
    dark: '#237804',
    main: '#52c41a',
    contrastText: 'white',
  },
  pending: {
    light: '#F5E18C',
    dark: '#F6CC1B',
    main: '#F6CC1B',
    contrastText: 'white',
  },
  error: {
    light: '#F7CACA',
    dark: '#DB4D4D',
    main: '#DB4D4D',
    contrastText: 'white',
  },
};

COLORS.primary is used for the hero stripe and the colors of links. Just be sure to edit the contrastText so your text has enough contrast to be legible depending on the primary colors you choose.

NOTE: The other colors aren't used as part of the theme, but you're encouraged to use them for any custom components you end up developing.

If you like these colors and want some alternatives, you can find them on https://ant.design/docs/spec/colors

Development

If you want to run this repo locally after cloning:

yarn
yarn workspace site develop # To run the demo site
yarn workspace @mlent/gatsby-theme-help-center # To run the theme itself

Troubleshooting

Failed to compile

Failed to compile
There was an error in your GraphQL query:

Cannot query field "contentLang" on type "SiteSiteMetadata".

This error can happen if you edit your gatsby-config.js file, for instance adjusting the basePath option or switching from string to object representation of listing the plugin.

Solution: Restart the development server.

Index page is missing

Check whether you've set the basePath option to something besides /.

Solution: If, e.g. your basePath is /test you'll need to work locally at https://localhost:8000/test.

Plugin has generated no Gatsby nodes

warn The @mlent/gatsby-theme-help-center plugin has generated no Gatsby nodes. Do you need it?

Yeah, I googled a bit about this but I'm not sure how to get rid of this warning. If you're a Gatsby wizz, help a sister out.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].