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

hexo-generator-amp

Package Overview
Dependencies
Maintainers
1
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

hexo-generator-amp

amp generator for Hexo.

  • 0.0.6
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
113
increased by334.62%
Maintainers
1
Weekly downloads
 
Created
Source

hexo-generator-amp

Amp generator for Hexo.

DEMO : HTML | AMP HTML

Installation

$ npm install hexo-generator-amp --save

Then add this theme in your themes/(your-theme)/layout/_partial/head.ejs.

  <% if (is_post() && config.generator_amp){ %>
    <link rel="amphtml" href="./index.amp.html">
  <% } %>

.md should contain image file and width height element.

<img src="image.jpg" width="800" height="600">
or
<img src="image.jpg" width="800" data-height="600">

Options

generator_amp:
  logo:
    path: asset/path-to-your-site-logo.jpg
    width: 600
    height: 60
  google_analytics: UA-123456789
  cssFilePath: asset/your-css-file-for-AMP.css
  substituteTitleImage: 
    path: asset/path-to-your-substitute-image.jpg
    width: 800
    height: 600
  
authorDetail:
  authorReading: Your name description
  avatar:
    path: asset/path-to-your-avator.jpg
    width: 150
    height: 150
  description: Self introduction
copyright_notice: The footer copyright notice 

generator_amp settings

  • logo.path: File path of a your logo image.
  • logo.width: Width of a your logo image. (width <= 600px)
  • logo.height: Height of a your logo image. (height <= 60px)
  • google_analytics: Your google analytics tracking ID.
  • cssFilePath: File path of a your css file for AMP. (e.g. sample-amp.css)
  • substituteTitleImage.path: File path of a your substitute title image. (Use this when the image is not in the markdown)
  • substituteTitleImage.width: Width of a your substitute title image. (width <= 600px)
  • substituteTitleImage.height: Height of a your substitute title image. (height <= 60px)

Auther detail settings (optional)

  • authorReading: Your name description.
  • path: File path of a your avator image.
  • width: Width of a your avator image.
  • height: Height of a your avator image.
  • description: Self introduction.
  • copyright_notice: The footer copyright notice.

License

MIT

Keywords

FAQs

Package last updated on 23 Mar 2016

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