GithubHelp home page GithubHelp logo

jekyll-deploy-oss's Introduction

Jekyll Deploy OSS

The Jekyll command to deploy your Jekyll site to Aliyun OSS.

部署你的博客到阿里云的Jekyll命令。

Installation

Add this line to your Jekyll site's Gemfile:

gem "jekyll-deploy-oss"

Add jekyll-deploy-oss to your Jekyll site's _config.yml:

plugins:
  - jekyll-deploy-oss

And then execute:

$ bundle

Or install it yourself as:

$ gem install jekyll-books

Config

在部署之前,你需要在你博客的 _config.yml中新增一些配置:

deploy:
  # The endpoint of your Aliyun oss bucket
  endpoint: ""
  # The name of your Aliyun oss bucket
  bucket_name: ""
  # 如果遇到同名文件是否跳过,默认为覆盖;如果想要覆盖,需要设置为true
  skip_exist: false
  # 设置缓存过期时间,单位为天,默认为向365天
  expired_in: 3650
  # 指定(部署后目录下的)某些目录或文件上传
  paths:
    - test1
    - test.html

endpointbucket_name 为必填,其他选填。

此外上传到阿里云的OSS_IDOSS_SECRET也是必要的,最好将他们加在环境变量中(这样最安全)。其次也可以作命令行的参数传入。

bundle exec jekyll deploy --id YOUR_OSS_ID --secret YOUR_OSS_SECRET

最不推荐的做法就是把他们加入配置中(当然如果你的配置文件不公开也没什么)。

deploy:
  OSS_ID: ""
  OSS_SECRET: ""

Usage

在Jekyll构建成功后,执行以下命令,此插件会将_site(或其他你配置在_confg.yml中的destination构建目录)下的文件上传到你阿里云OSS的指定bucket。

bundle exec jekyll deploy

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/erlzhang/jekyll-deploy-oss. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

License

The theme is available as open source under the terms of the MIT License.

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.