Code Monkey home page Code Monkey logo

hexo-deployer-metaweblog's Introduction

hexo-deployer-metaweblog

metaweblog deployer plugin for Hexo.

Installation

$ npm install hexo-deployer-metaweblog --save

Options

You can configure this plugin in _config.yml.

# You can use this:
deploy:
  type: metaweblog
  blogtype: <cnblog>
  checkdays: 15  # recently days that your posts will be chekck and publish
  username: <username>
  password: <password>
  apiurl: <apiurl>

Known Issues

  • only support hexo theme next
  • public directory must match "yyyy/mm/dd/blogname/index.html"

已知博客

To Do

  • Handle deleting posts
  • ~~ cnblog [] oschina

设计思路

  1. 将hexo generate 后的 public 目录中 年份文件夹里的博客内容发送到 支持metaweblog api的博客 如 cnblog
  2. 限定只发布最近多少天的博文,省得 几年前的博文也在天天重新发送,通过参数 checkdays 控制 1天 就代表发布昨天和今天的博文,
  • 博客园限定每天只允许调用接口发布100篇
  1. cnblog 的postid 不能自己定义,无法确定同一篇博文是去更新还是新建,需要一个对比机制
  • 想到的是弄个文件,里面存放一个json对象,key为博文的名称取md5摘要,value为调用cnblog后返回的postid,可以通过这个文件确定是去创建还是更新博文
  • 这个文件放在 git 插件的发布目录,这样git上还有个备份
  1. metaweblog api 有现成的就直接用现成的不去造轮子 npm i metaweblog-api

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.