Giter VIP home page Giter VIP logo

apiaryio.github.com's Introduction

Apiary Blog

What not to do

  • Do not rename the repo as apiaryio.github.io

Steps to create a blog post

  • Clone the repo: https://github.com/apiaryio/apiaryio.github.com
  • Create a new branch and add file under the _posts folder using the naming convention: yyyy-mm-dd-name-of-blog.md (you can use the rake command below)
  • Add images under the images folder and make them either .png or .jpeg format. The width of the image should be 640px. If you have images you can use the rake command below for creating an image directory.
  • Add your details in the _config.yml file to be configured as an author.
  • Run jekyll to see the file locally on localhost:4000 with rake serve
  • Commit your file and get it reviewed by other team members by sending pull requests
  • After reviewing, oncall person will merge the pull request

Running server using Docker

If you don't want to set up Ruby ecosystem, you can preview all posts using Docker:

  • run ./docker/build.sh to build the apiaryio/blog image
  • run ./docker/serve.sh

The docker image only needs to be rebuilt if the dependencies change.

Installing Dependencies

(if you don't have bundler yet, start by running sudo gem install bundler)

$ bundle install

Development

To start a local server that shows all posts including drafts:

$ rake serve

The server will automatically recompile all the changes you make to text files, except for _config.yml. In order to see changes to _config.yml, you need to restart the server manually.

Rake Usage

There are some rake commands that can be used for creating post files and image directories.

Post

Create Post

rake post['Hello World']

Create Post with Image Directory

If your post has images, you can specify :with_images in the rake command and it will create an empty directory inside the images directory.

rake post['Hello World',:with_images]

Image Directory

rake image_dir['Hello World']

Stylesheet Development

The server directly references Apiary website production stylesheet. In order to change this to https://static.apiary.dev:9000 for development purposes, edit the static variable in _config.yml. Make sure not to commit this to Github. Also, make sure your CSS changes are deployed on Apiary before pushing blog changes to Github.

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.