Giter VIP home page Giter VIP logo

playsthis's Introduction

Plays This

Hosted at playsthis.com.

I generate international Amazon links for products using a little Chrome Extension I wrote called Amazing Linkalizer.

Set-up related stuff

Set up for local development (God help you)!

Extra helpful setup stuff

Tagging

The tagging system is appreciatively stolen from MindDust.

When adding a new tag:

  • Add it to _data/tags.yml:

      - slug: drums
        name: Drums
    
  • Add a new empty template tag/drums.md with the front matter:

      ---
      layout: tag-page
      tag: drums
      permalink: /tag/drums/
      ---
    

Images

The repo contains a little node script to generate different sized images to be used in different places and at different screen sizes. When adding new images, do this:

  • Add the original image to images/
    • Follow the naming convention <firstname><surnameInital><number>, e.g. timb1. Where 1 is used as the lead image for thumbnails etc and other numbers are used throughout the post
  • Make sure you've installed the node dependencies by running npm install
  • Run npm run resize

In the post, add the name of the lead image (without extension) to the front matter, e.g. image: timb1. There's an html partial for showing images that sorts out the sizing etc. To insert an image use:

{% include articleImage.html image="timb1" alt="Tim Barclay" %}

In a few cases, for example if the original image is very small or very tall and thin, it's better to just use the original, in which case just use standard markdown image syntax.

Case sensitive paths

Paths in Github pages are case sensitive and I, slightly short-sightedly, started off using title case for the paths of posts. This is bad as any number of blogs are more than willing to shout about, so I decided to switch to using all lower case from mid January 2016 onwards.

Github pages doesn't support server config files, like .htaccess so to handle the existing posts, I added JekyllRedirectFrom to redirect lower case paths to the existing mixed case paths. In some ways it might have been better to change the existing paths to lower case and add redirects from the old mixed case versions but then anyone following an existing link would see an ugly redirect page for a second and I'd rather minimise how much that happens. Not to mention it would be a hassle to rename them all.

Related posts

A basic related posts script appreciatively stolen from Andrea Fortuna.

playsthis's People

Contributors

barryclark avatar timbarclay avatar javiercejudo avatar eringrand avatar dependabot[bot] avatar peteretelej avatar bkiers avatar daattali avatar esteinborn avatar vermluh avatar henryaj avatar hunjaelee avatar junefrench avatar rnicholus avatar coltonfitzgerald avatar sunnankar avatar

Stargazers

Jeremy Wong avatar

Watchers

James Cloos avatar  avatar

playsthis's Issues

Pagination doesn't work properly

Pagination logic was copied wholesale from the docs but it seems to have issues when you're on the last page.

Currently there are 3 pages of posts. If you navigate to page three, all the links (prev, 1 and 2) all navigate to page 2.

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.