Giter Site home page Giter Site logo

gatsby-starter-mdx-square1's Introduction

Gatsby Starter Square1

live site here: https://gatsby-square1.netlify.app/

Dev setup

Using ESLint with Prettier plugin and Airbnb config

Install:

  • eslint
  • eslint-config-airbnb
  • eslint-config-prettier
  • eslint-plugin-import
  • eslint-plugin-jsx-a11y
  • eslint-plugin-prettier
  • eslint-plugin-react
  • prettier

Styling

Global styles

Styling uses gatsby-plugin-global-styles for creating independent global CSS styles, and automatically placing them at the top of the element.

Install:

  • gatsby-plugin-global-styles
  • @nfront/global-styles

Components are styled with Emotion styled

Install:

  • @emotion/cache
  • @emotion/core
  • @emotion/styled
  • @emotion/styled-base
  • emotion-theming

Typography

  • gatsby-plugin-prefetch-google-fonts

Content

Content is written in MDX, pages are located in the content/pages directory. Generally, page content is accessed via the page context in the page template.

Content for components is stored in json files and located in the content/data directory. Generally, component content is accessed with hooks (using static graphql queries).

Shortcodes may be inserted in MDX content

Syntax Highlighting is available

Install:

  • gatsby-plugin-mdx
  • @mdx-js/mdx
  • @mdx-js/react
  • prism-react-renderer

Titles in title case

Install:

  • ap-style-title-case

Use:

import titleCase from "ap-style-title-case";
...
<h2>{titleCase(item.title)}</h2>
...

Content in Frontmatter fields

Install:

  • remark
  • remark-preset-lint-recommended
  • remark-html

Use:

import mdStringToHTML from "../utilities/md-to-html";
...
<div dangerouslySetInnerHTML={{ __html: mdStringToHTML(fields.pageIntro) }} />
...

Page Transitions

Using implementation from https://github.com/ryanwiemer/gatsby-using-page-transitions

Install:

  • framer-motion

Smooth scroll to anchor links

source: https://medium.com/@chrisfitkin/how-to-smooth-scroll-links-in-gatsby-3dc445299558

Install:

  • smooth-scroll

Components

Section Wrapper

Renders a page section with a background color, in a container, both or full page width depending on two booleans hasBackgroundandinContainer.

Media Component

Renders a combination of an image and text in a page section

  • order of representation is determined by the boolean imageLeft
  • the text may consist of a title, sub title, body text and a CTA
  • the CTA may be internal or external, which is determined by the boolean isExternal

Media Component with Video

Renders a combination of a video thumbnail and text in a page section. Upon clicking the thumbnail the video is played either in situ or in a modal.

  • video playback type is determined by the boolean isModal
  • otherwise same as media component

Video Component

Renders a video in a page section. Upon clicking the thumbnail the video is played either in situ or in a modal.

  • video playback type is determined by the boolean isModal

CTA Banner

Renders a full width banner with a single Call-to-Action. Includes a header, sub title and a link button

gatsby-starter-mdx-square1's People

Contributors

wernerglinka avatar wernerglinka-pr avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.