2.0.0 • Published 9 months ago

hexo-seo v2.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

hexo-seo

Automated Hexo Seo Optimizer

Installation

Packages Links

Using tarball is useful for git which not installed properly

descriptionlink
full link tarball (recommended)https://github.com/dimaslanjaka/hexo-seo/raw/master/release/hexo-seo.tgz
repository tarballhttps://github.com/dimaslanjaka/hexo-seo/tarball/master
git repositorygit+https://github.com/dimaslanjaka/hexo-seo.git

Using Git Repository (Development)

npm i git+https://github.com/dimaslanjaka/hexo-seo.git

Using NPM Repository (Production)

npm i hexo-seo

Features

  • Auto add anchor title (if not exists)
  • Auto determine anchor external link and nofollow them
  • ~Auto replace broken images~
  • Auto compress CSS JS HTML
  • Auto add alternate and title of images
  • Auto add sitemap (forked from yoast seo wordpress plugin)
  • Tested on hexo instances with 1000 more posts and pages

The reason why some features are removed

Separated due to very high memory usage and risk of HEAP MEMORY errors. so I will merge it to https://github.com/dimaslanjaka/static-blog-generator as a specific task

Usage

Configuration

config full example

# https://github.com/dimaslanjaka/hexo-seo
seo:
  html:
    enable: true
    # fix invalid html
    fix: true
    # exclude from minify
    exclude:
      - "*.min.{htm,html}"
  # minify css
  css:
    enable: true
    # If you want to customize the css minifier settings, you can put below
    # exclude css from minifying, multiple supported
    exclude:
      - "**/*.min.css"
  # minify js
  js:
    enable: true
    # If you want to customize the js minifier settings, you can put below
    # exclude css from minifying, multiple supported
    exclude:
      - "**/*.min.js"
    # this is terser options, you can customize minifier with terser options https://github.com/terser/terser
    # below is config example
    options:
      compress:
        dead_code: true
      mangle:
        toplevel: true
        safari10: true
  # add rich snippets on every posts and pages
  schema:
    article:
      enable: true
    breadcrumb:
      enable: true
    sitelink:
      enable: true
      searchUrl: https://www.webmanajemen.com/search?q=
  # this function still under development because JAVASCRIPT HEAP MEMORY and my device is 8GB RAM
  img:
    enable: true
    # fix broken images
    broken: false
    # default broken images
    default: https://upload.wikimedia.org/wikipedia/commons/6/65/No-Image-Placeholder.svg
    # broken images methods
    # serverside : process broken images from server side (caused javascript heap out of memory, if your post large and your device has insufficient memory)
    # clientside : process broken image from client side browser with webjs
    onerror: serverside
  # external links fix
  links:
    # enable or false
    enable: true
    # allowed following links, otherwise nofollow others
    exclude:
      - webmanajemen.com
      - web-manajemen.blogspot.com
  # auto generate seo friendly sitemap on http://yoursite.com/sitemap.xml
  # forked from yoast seo
  sitemap: true

this plugin will run the functions based on development mode or production mode

development mode

set NODE_ENV=development && hexo server

Preview

Google Rich Snippets Schema Article

Issues

  • hexo.on('exit') not called at end of process

    no more issue Hexo On Exit Event this plugin already have schedule function

Troubleshoot

  • node_libcurl binding not found
sudo apt-get install libcurl4-openssl-dev -y
# run below codes only if above package already installed
rm -rf node_modules/node-libcurl
npm install node-libcurl --build-from-source
  • Fix javascript heap out of memory
# POSIX
export NODE_OPTIONS=--max_old_space_size=8096
# windows
set NODE_OPTIONS=--max_old_space_size=8096
  • important after you update this plugin, you could cleaning the temp folders with:
hexo clean # this will cleaning temporarily folders of this plugin

Status

Available In Progress Review Needed

Critical High Medium Low

Website using Hexo NodeJS Blogging System

Build And Tests GitHub webmanajemen.com

hexo-adsense

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

hexo-seo

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

hexo-blogger-xml

npm version Npm package yearly downloads Minimum node.js version GitHub repo size GitHub last commit

2.0.0

9 months ago

1.4.3

9 months ago

1.4.1

1 year ago

1.4.0

1 year ago

1.3.0

1 year ago

1.2.3

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.2.1

2 years ago

1.1.6

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.1.5

3 years ago

1.1.2

3 years ago

1.0.33

3 years ago

1.0.32

3 years ago

1.0.35

3 years ago

1.0.34

3 years ago

1.0.26

4 years ago

1.0.29

4 years ago

1.0.28

4 years ago

1.0.27

4 years ago

1.0.31

4 years ago

1.0.30

4 years ago

1.0.25

4 years ago

1.0.24

4 years ago

1.0.23

4 years ago

1.0.22

4 years ago

1.0.21

4 years ago

1.0.20

4 years ago

1.0.19

4 years ago

1.0.18

4 years ago

1.0.17

4 years ago

1.0.16

4 years ago

1.0.15

4 years ago

1.0.14

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago