Use this file to set up default responsive typography rules for a WordPress site.
Includes out-of-the-box support for WordPress alignment classes (.aligncenter
, .alignleft
, .alignright
).
This snippet filters oEmbed output in WordPress (the_content()
) to force responsive embeds.
To use, add the contents of responseive_embeds.less
to your site's stylesheet (if you're not using LESS, don't forget to move the iframe,object,embed
rule outside of .embed-container
and change it to .embed-container iframe,.embed-container object,.embed-container embed
).
Then add the responsive_embed()
function to your theme's functions.php
and insert the add_filter()
call in your theme's setup function.
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
# Force SSL | |
RewriteCond %{SERVER_PORT} !443$ | |
RewriteRule ^(.*)$ https://www.example.org/$1 [L] |
/* | |
* Default WP Alignment Classes | |
*****************************************************************************/ | |
.aligncenter,.alignleft,.alignright { | |
display: block; | |
padding: 0; | |
} | |
.aligncenter { |
# Removes all deleted files | |
git rm $(git ls-files -d) | |
# Removes deleted files in a given directory | |
git rm $(git ls-files -d path/to/subdir/.) |
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).