New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.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 - npm Package Compare versions

Comparing version 1.0.7 to 2.0.0

26

index.js

@@ -26,3 +26,3 @@ 'use strict';

var sitelogoPath= '../template/sample-yoursite-logo.png';
var avatorPath = '../template/sample-avator.png';
var avatarPath = '../template/sample-avator.png';
var substituteTitleImagePath = '../template/sample-substituteTitleImage.png';

@@ -34,3 +34,3 @@

if(hexo.config.generator_amp && hexo.config.generator_amp.templateDir && hexo.config.generator_amp.assetDistDir && hexo.config.generator_amp.logo && hexo.config.generator_amp.logo.path && hexo.config.generator_amp.substituteTitleImage && hexo.config.generator_amp.substituteTitleImage.path){
ic.initCopy( pathFn.join(hexo.config.generator_amp.templateDir) , [ejsPath, cssPath, logoPath, sitelogoPath, substituteTitleImagePath, avatorPath]);
ic.initCopy( pathFn.join(hexo.config.generator_amp.templateDir) , [ejsPath, cssPath, logoPath, sitelogoPath, substituteTitleImagePath, avatarPath]);
}else{

@@ -41,3 +41,3 @@ lg.log("error", "Please set the generator_amp option." , "_config.yml");

var avatorDefaultPath = "sample/" + pathFn.basename( avatorPath );
var avatorDefaultPath = "sample/" + pathFn.basename( avatarPath );
if(hexo.config.authorDetail && hexo.config.authorDetail.avatar && hexo.config.authorDetail.avatar.path){

@@ -59,13 +59,13 @@ avatorDefaultPath = hexo.config.authorDetail.avatar.path;

hexo.config.generator_amp = assign({},
hexo.config.generator_amp, {
"defaultAssetsPath" : {
"ejs" : ejsPath ,
"css" : cssPath ,
"logo": logoPath ,
"avator" : avatorPath ,
"substituteTitleImage" : substituteTitleImagePath
}
hexo.config.generator_amp = assign({
}, hexo.config.generator_amp, {
"defaultAssetsPath" : {
"ejs" : ejsPath ,
"css" : cssPath ,
"logo": logoPath ,
"avator" : avatarPath ,
"substituteTitleImage" : substituteTitleImagePath
}
);
});

@@ -72,0 +72,0 @@ var shush = su.chkUpdate(hexo.config);

@@ -9,2 +9,3 @@ 'use strict';

var cheerio = require('cheerio');
var moment = require('moment');
var tp = require('./templatePath.js');

@@ -325,8 +326,11 @@ var gs = require('./imageSize.js');

// get year
var nowD = new Date();
var yy = nowD.getFullYear();
var yy = moment().format("YYYY");
//datePublished
var pd = new Date(post.date);
var pdStr = pd.getFullYear() + "-"+ (pd.getMonth() + 1) + "-" + pd.getDate()
//datePublished - Formatting using formats in Hexo config
var dateFormat = "YYYY-MM-DD";
if(config.date_format) {
dateFormat = config.date_format;
}
var pdStr = moment(post.date).format(dateFormat);
var xml = template({

@@ -342,3 +346,3 @@ config : config ,

isInstagramContain: isInstagramContain ,
avatorPath : avatarPath_template,
avatarPath : avatarPath_template,
logoPath : logoPath_template,

@@ -345,0 +349,0 @@ logoPath_width : logoPath_template_width,

{
"name": "hexo-generator-amp",
"version": "1.0.7",
"version": "2.0.0",
"main": "index",
"dependencies": {
"cheerio": "^0.22.0",
"ejs": "^2.4.1",
"ejs": "^2.5.5",
"hasha": "^2.2.0",
"hexo-env": "^0.0.1",
"hexo-fs": "^0.1.6",
"hexo-pagination": "^0.0.2",
"html-minifier": "^2.1.2",
"hexo-pagination": "^0.1.0",
"html-minifier": "^3.2.3",
"image-size": "^0.5.0",
"log-util": "^1.1.2",
"mkdirp": "^0.5.1",
"object-assign": "^2.0.0"
"object-assign": "^4.1.0"
},

@@ -18,0 +18,0 @@ "description": "AMP ⚡ HTML (Accelerated Mobile Pages) generator for Hexo.",

Sorry, the diff of this file is not supported yet

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