Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gatsby-plugin-html2amp

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-html2amp

Gatsby plugin to generate AMP(Accelerated Mobile Pages) from HTMl

  • 1.4.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

gatsby-plugin-html2amp

Create AMP(Accelerated Mobile Pages) for your Gatsby site by using html2amp

Install

$ npm install --save gatsby-plugin-html2amp

How to use

In gatsby-config.js

{
  resolve: 'gatsby-plugin-html2amp',
  options: {
    files: ['post/**/index.html', 'index.html'],
    publicPath: 'public',
    gaConfigPath: 'gaConfig.json',
    dist: 'public/dist',
    optimize: true,
    htmlPlugins: [],
    cssPlugins: []
  }
}

Options

  • files
    • List of generated html path patterns from publicPath
    • Default is [**/*.html]
  • publicPath
    • Directory for building by gatsby
    • Default is public
  • gaConfigPath
    • amp-analytics config json for google analytics
    • The path is from publicPath
    • Optional
  • dist
    • Path to output
    • If the options is not set files are override by AMP result
  • optimize
  • htmlPlugins
    • you can add custom converter for html
  • cssPlugins
    • you can add custom converter for css

More Detail

Please check my article out for detail. ⚡

https://blog.tomoyukikashiro.me/post/amp-using-gatsby

Keywords

FAQs

Package last updated on 01 May 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc