aschmelyun / use-the-keyboard

A collection of keyboard shortcuts for Mac apps, Windows programs, and websites.
https://usethekeyboard.com
165 stars 19 forks source link

Use The Keyboard

The source behind usethekeyboard.com

Prerequisites

If you'd like to clone this repo and use the underlying static site generator, you'll need to have the following installed on your environment:

After cloning the repo, you'll want to get all the vendor packages installed. Run the following command from the project root:

composer install && npm install

Adding/modifying a page

All content for the site is stored in the content directory as JSON files. The actual names of the files don't correlate to anything, but for organization purposes are named the same as the page slug.

During the site build process, each key in the content file is converted to a PHP variable and passed through to a Blade template engine for processing.

For Use The Keyboard, these are the following required attributes and their purpose on rendered pages:

The following are optional attributes:

Building the site

Once you've completed any changes, additions, or modifications to the site content or assets, you'll need to run the build process. From the project root, run the following command:

npm run production

This will compile the assets for production use (minify, version, etc) and then run the php taro build command to compile the HTML once that's been successfully finished.

If you're in the middle of development and want a faster alternative, npm run dev skips minification and returns the compiled assets at a quicker pace.

Everything that's built is then added to the dist folder at the project root.

Questions?

If you run into any issues regarding shortcuts on the site or the static build process, feel free to open and issue or submit a PR.

I'm also on Twitter if you'd like to follow me or get in more direct contact.