Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
hexo-generator-amp
Advanced tools
Accelerated Mobile Pages (AMP) generator for Hexo.
hexo-generator-amp
helps you hexo's projects that automatically generates AMP.
Output file path is the ./amp/index.html
. Also, You can freely choose the template(.ejs) and style(.css).
Documents : read me
DEMO : HTML page | generated AMP HTML page
$ 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="./amp/index.html">
<% } %>
Please set the following options . Please edit your config file (_config.yml
).
# Quick start Settings of hexo-amp-generator
generator_amp:
templateDir: amp-template
assetDistDir: amp-dist
logo:
path: sample-logo.png
width: 600
height: 60
substituteTitleImage:
path: sample-substituteTitleImage.png
width: 1024
height: 800
google_analytics: UA-123456789-1
warningLog: false
Output file path is the ./amp/index.html
. Validate your AMP pages. Please see below
Accelerated Mobile Pages Project - Validate AMP Pages
How to validate AMP - my blog
hexo-generator-amp
can set the following options.
# Advanced Settings of hexo-amp-generator
generator_amp:
substituteGoogle_adsense:
data_ad_client: ca-pub-123456789876543
data_ad_slot: 0123456789
width: 336
height: 280
templateDir: amp-template
assetDistDir: amp-dist
logo:
path: sample-logo.png
width: 600
height: 60
substituteTitleImage:
path: sample-substituteTitleImage.png
width: 1024
height: 800
cssFilePath: sample-amp.css #(optional)
templateFilePath: sample-amp.ejs #(optional)
google_analytics: UA-123456789-1
html_minifier: #(optional)
warningLog: true
authorDetail:
authorReading: Your name description #(optional)
avatar:
path: sample-avator.png #(optional)
width: 150 #(optional)
height: 150 #(optional)
description: Self introduction #(optional)
copyright_notice: The footer copyright notice #(optional)
You can choose path of schema.org image on a per post. If your post is not contain this option , this plugin search image from content.
For example : hello-world.md
, Please set the following options.
---
title: Hello World
ampSettings:
titleImage:
path: titleImage-on-the-local-folder.png
---
Welcome to [Hexo](https://hexo.io/)! This is your very first post.
...
If image on the external , Please set the width and height options.
---
title: Hello World
ampSettings:
titleImage:
path: http://titleImage-on-the-external.png
width: 1024
height: 800
---
Welcome to [Hexo](https://hexo.io/)! This is your very first post.
...
MIT
FAQs
AMP ⚡ HTML (Accelerated Mobile Pages) generator for Hexo.
The npm package hexo-generator-amp receives a total of 30 weekly downloads. As such, hexo-generator-amp popularity was classified as not popular.
We found that hexo-generator-amp demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.