Example project directory, the root folders are pretty consistent, the sub directories (on lib
, etc) are just examples of what might be in there.
.
├── lib
│ ├── db
│ ├── handlers
│ └── routes
#!/bin/bash | |
directory=_site | |
branch=gh-pages | |
build_command() { | |
jekyll build | |
} | |
echo -e "\033[0;32mDeleting existing $branch...\033[0m" | |
git push origin --delete $branch | |
git branch -D $branch |
#!/bin/bash | |
directory=_site | |
branch=gh-pages | |
build_command() { | |
jekyll build | |
} | |
echo -e "\033[0;32mDeleting old content...\033[0m" | |
rm -rf $directory |
$base-font-size: 16px; | |
$base-line-height: 1.5; | |
// this value may vary for each font | |
// unitless value relative to 1em | |
$cap-height: 0.68; | |
@mixin baseline($font-size, $scale: 2) { |
function mamp() { | |
# | |
# Default location of the apache conf file for MAMP | |
CONF_FILE="/Applications/MAMP/conf/apache/httpd.conf" | |
# | |
# Fish existing doc root out of conf file | |
LINE=$(cat $CONF_FILE | grep ^DocumentRoot) | |
QUOTED_STRING=${LINE/DocumentRoot /} | |
OLD_DOC_ROOT=${QUOTED_STRING//\"/} | |
# |
Sometimes you want to have a subdirectory on the master
branch be the root directory of a repository’s gh-pages
branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master
branch alongside the rest of your code.
For the sake of this example, let’s pretend the subfolder containing your site is named dist
.
Remove the dist
directory from the project’s .gitignore
file (it’s ignored by default by Yeoman).
I'm having trouble understanding the benefit of require.js. Can you help me out? I imagine other developers have a similar interest.
From Require.js - Why AMD:
The AMD format comes from wanting a module format that was better than today's "write a bunch of script tags with implicit dependencies that you have to manually order"
I don't quite understand why this methodology is so bad. The difficult part is that you have to manually order dependencies. But the benefit is that you don't have an additional layer of abstraction.
@media only screen and (min-width: 320px) { | |
/* Small screen, non-retina */ | |
} | |
@media | |
only screen and (-webkit-min-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( min--moz-device-pixel-ratio: 2) and (min-width: 320px), | |
only screen and ( -o-min-device-pixel-ratio: 2/1) and (min-width: 320px), |
This quick little middleware grabs all HTML pages going across the wire, peeks inside and replaces the content with some nice features: curly quotes instead of straight quotes (prime marks), conversion of -- to proper emdashes, insertion of to prevent text widows, wrapper HTML classes for caps and ampersands for fancier styling, and other fun things. | |
It's really a middleware wrapper for Typogruby (http://avdgaag.github.com/typogruby/), so check it out if you want the gory details. | |
It requires: | |
typogruby: http://avdgaag.github.com/typogruby/ | |
nokogiri: http://nokogiri.org/ | |
Have fun! |