项目作者: PaulieScanlon

项目描述 :
A Gatsby remark plugin for responsive grid systems in markdown 🍱
高级语言: JavaScript
项目地址: git://github.com/PaulieScanlon/gatsby-remark-grid-system.git
创建时间: 2019-12-10T15:30:31Z
项目社区:https://github.com/PaulieScanlon/gatsby-remark-grid-system

开源协议:

下载


gatsby-remark-grid-system

gatsby-remark-grid-system is a plugin that creates responsive layouts from markdown files

Motivation
As much as i like blogs, do they all have to be single coloum? Arguably if you’re using gatsby-pugin-mdx this is not problem but… if your blog / site / app uses .md this might be worth a look.

👁️ Preview

🚀 Getting started

Install

  1. npm install @pauliescanlon/gatsby-remark-grid-system

Setup

Add gatsby-transformer-remark to your gatsby-config.js then add @pauliescanlon/gatsby-remark-grid-system as a plugin of that 😅

  1. module.exports = {
  2. ...
  3. plugins: [
  4. {
  5. resolve: `gatsby-transformer-remark`,
  6. options: {
  7. plugins: [`@pauliescanlon/gatsby-remark-grid-system`],
  8. },
  9. },
  10. ],
  11. }

Options

Option Type Reqiured Default Description
breakpoints array no [576, 768, 992, 1200] bootstrap inspired breakpoints
padding number no 16 padding applied to each col
debug boolean no false adds an outline to each col
  1. ...
  2. plugins: [
  3. {
  4. resolve: `@pauliescanlon/gatsby-remark-grid-system`,
  5. options: {
  6. ...
  7. }
  8. },
  9. ]

📝 Markdown

TODO explain markdown a bit more :::rowcol

  1. ::: div row
  2. ::: div col 12|6|7|9
  3. left content 1
  4. :::
  5. ::: div col 12|6|5|3
  6. right content 1
  7. :::
  8. :::