Coder Social home page Coder Social logo

blog's Introduction

Liri Blog

This Liri Blog is based on Jekyll.

You can see it online at blog.liri.io.

Layout and style are inspired by Medium, Google Blog and Google Design.

The code was initially based upon @elementary/blog-template.

Editing workflow

Fork this repository and send a pull request.

How to handle images

Put images in the images/ directory with a folder name that matches the post slug. Image sizes should be:

  • Up to 800px wide for normal-width loDPI
  • Up to 1600px wide for normal-width HiDPI
  • Up to 800px for half- or third-width images on loDPI
  • Up to 1600px wide for half- or third-width images on HiDPI
  • 2560px wide for full-bleed

When scaling down, use a high quality interpolator like Sinc (Lanczos3) or NoHalo in GIMP to avoid too much blur/fuzziness.

Name your sized images something sane like image-name_800.jpg for the loDPI version, and image-name_1600.jpg for the HiDPI version. When writing the markdown, use this format:

![Alt Text]({{ site.baseurl }}/images/post-name/image-name_800.jpg){: srcset="{{ site.baseurl }}/images/post-name/image-name_1600.jpg 2x"}

Optimize images with the lowest JPG percent that looks good (i.e. manually in GIMP), and use something like Image Optimizer for PNGs.

Also consider JPGs instead of PNGs when the majority of the image is photographic or a gradient (i.e. not solid colors), as that will compress way better than a PNG.

Building and running locally

The blog is a simple Jekyll-powered site hosted by GitHub Pages. To run it locally, see the GitHub docs.

Initial setup

First make sure Ruby is installed.

On Fedora systems you can install it this way:

sudo dnf install -y ruby-devel rubygems

We want to manually install gems in our home directory.

Add these to your ~/.bashrc:

export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH

Now create the directory:

mkdir $HOME/.gem

Reload the environment:

source ~/.bashrc

Install the following stuff:

gem install bundler
cd blog
bundle install

Serve

Serve the pages locally with:

cd blog
bundle exec jekyll serve --host 0.0.0.0

The site should now be available at http://0.0.0.0:4000/ on your local machine, and your local machine's IP address on your network—great for testing on mobile OSes.

Drafts and future posts

Append --drafts to the serve command, and drafts in the _drafts folder will show up based on their last-edited time. Similarly, append --future to the serve command to show future posts.

blog's People

Contributors

plfiorini avatar

Watchers

James Cloos avatar

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.