GithubHelp home page GithubHelp logo

scf-cos-hexo-blog's Introduction

利用腾讯云cos搭建的静态博客,顺便用下SCF更新

前置条件

  1. 申请腾讯云账号,开通一个免费cos 对象存储 COS_云存储服务_安全存储服务 - 腾讯云
  2. 新建一个存储桶
  3. 安装配置好SCF CLI 教程

用法

  1. fork仓库,然后npm i
  2. 根目录新建cos_config.json,内容参照cos_config_sample.js 信息能在访问密钥 - 控制台找到
  3. cd blog && hexo new "new post title"
  4. 找到blog/public/source/_posts下的post,用MD语法写post
  5. npm run remotePublish
  6. 首次部署后,到SCF控制台,找到publishCosBlog函数,找到“触发方式”-“API网关触发器”,把访问路径复制到/blog/_config.yml 下的url字段处
  7. 再跑npm run remotePublish
  8. 以后每次修改后再重复remotePublish就ok了

scf-cos-hexo-blog's People

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.