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 0.1.9 to 0.1.10

11

lib/eyeCatchVars.js

@@ -21,2 +21,3 @@

data.eyeCatchImage = "";
data.titleImageForAmp = "";

@@ -34,2 +35,3 @@ if( excludeTest.test( data.source ) ){

data.eyeCatchImage = titleImagePath;
data.titleImageForAmp = titleImagePath;
imgWidth = data.ampSettings.titleImage.width;

@@ -53,3 +55,4 @@ imgHeight = data.ampSettings.titleImage.height;

if(gsSizeInfo){
data.eyeCatchImage = pathFn.join(config.url , config.root, titleImagePath);
data.eyeCatchImage = pathFn.join(config.root, titleImagePath);
data.titleImageForAmp = pathFn.join(config.url , config.root, titleImagePath);
imgWidth = gsSizeInfo.w;

@@ -75,2 +78,3 @@ imgHeight = gsSizeInfo.h;

data.eyeCatchImage = imgsrc;
data.titleImageForAmp = imgsrc;

@@ -87,3 +91,4 @@ if( $(this).attr("width") ){

//Local image files
data.eyeCatchImage = pathFn.join(config.url , config.root , imgsrc);
data.eyeCatchImage = pathFn.join(config.root , imgsrc);
data.titleImageForAmp = pathFn.join(config.url , config.root , imgsrc);

@@ -133,4 +138,6 @@ if( $(this).attr("width") ){

data.eyeCatchImage = config.generator_amp.substituteTitleImage.path;
data.titleImageForAmp = config.generator_amp.substituteTitleImage.path;
}else{
data.eyeCatchImage = pathFn.join(config.url , config.root , config.generator_amp.assetDistDir ,config.generator_amp.substituteTitleImage.path);
data.titleImageForAmp = pathFn.join(config.root , config.generator_amp.assetDistDir ,config.generator_amp.substituteTitleImage.path);
}

@@ -137,0 +144,0 @@ data.eyeCatchImageProperty = { "width": config.generator_amp.substituteTitleImage.width , "height": config.generator_amp.substituteTitleImage.height };

46

lib/generator.js

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

}else{
avatarPath_template = pathFn.join("/"+config.generator_amp.assetDistDir ,config.authorDetail.avatar.path);
avatarPath_template = pathFn.join(config.root + config.generator_amp.assetDistDir ,config.authorDetail.avatar.path);
}

@@ -73,6 +73,9 @@ }

var logoPath_template;
var logoPath_for_amp;
if(absolutePathReg.test(config.generator_amp.logo.path)){
logoPath_template = config.generator_amp.logo.path;
logoPath_for_amp = config.generator_amp.logo.path;
}else{
logoPath_template = pathFn.join("/"+config.generator_amp.assetDistDir ,config.generator_amp.logo.path);
logoPath_template = pathFn.join(config.root + config.generator_amp.assetDistDir ,config.generator_amp.logo.path);
logoPath_for_amp = pathFn.join(config.url, config.root, config.generator_amp.assetDistDir ,config.generator_amp.logo.path);
}

@@ -82,2 +85,4 @@

return locals.posts.map(function(post){

@@ -301,3 +306,4 @@

avatorPath : avatarPath_template,
logoPath : logoPath_template
logoPath : logoPath_template,
logoPathForAmp : logoPath_for_amp

@@ -341,36 +347,2 @@ });

/*
{
"caseSensitive" : false,
"collapseBooleanAttributes" : true ,
"collapseInlineTagWhitespace" : false,
"collapseWhitespace" : true ,
"conservativeCollapse" : false ,
"decodeEntities" : true,
"html5" : true,
"includeAutoGeneratedTags" : false,
"keepClosingSlash" : false,
"minifyCSS" : true,
"minifyJS" : true,
"preserveLineBreaks" : false,
"preventAttributesEscaping" : false,
"processConditionalComments" : true,
"processScripts": ["text/html" ,"application/ld+json" ,"application/json"],
"removeAttributeQuotes" : true,
"removeComments" : true,
"removeEmptyAttributes" : true,
"removeEmptyElements" : false,
"removeOptionalTags" : true,
"removeRedundantAttributes" : true,
"removeScriptTypeAttributes" : true,
"removeStyleLinkTypeAttributes" : true,
"removeTagWhitespace" : true,
"sortAttributes" : true,
"sortClassName" : true,
"useShortDoctype" : true
};
*/
// orverride html_minifier option

@@ -377,0 +349,0 @@ if( config.generator_amp.html_minifier && typeof config.generator_amp.html_minifier === "object"){

{
"name": "hexo-generator-amp",
"version": "0.1.9",
"version": "0.1.10",
"main": "index",

@@ -13,3 +13,3 @@ "dependencies": {

},
"description": "amp generator for Hexo.",
"description": "AMP ⚡ HTML (Accelerated Mobile Pages) generator for Hexo.",
"devDependencies": {

@@ -16,0 +16,0 @@ "chai": "^1.9.1",

# hexo-generator-amp
Accelerated Mobile Pages (AMP) generator for [Hexo](https://github.com/hexojs/hexo).
AMP ⚡ HTML (Accelerated Mobile Pages) generator for [Hexo](https://github.com/hexojs/hexo).

@@ -5,0 +5,0 @@ ## Orverview

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