Skip to content

Instantly share code, notes, and snippets.

Ian Young iangreenleaf

Block or report user

Report or block iangreenleaf

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
nobuoka / commit-built-files-to-gh-pages-branch.markdown
Last active Nov 22, 2019
The way to commit built files in subdirectory to gh-pages branch from an arbitrary branch
View commit-built-files-to-gh-pages-branch.markdown

Committing a subfolder to the gh-pages branch from the other branch

Sometimes you want to commit a subfolder on an arbitrary branch (rather than gh-pages branch) as the root directory to the gh-pages branch. You will want to do so when, for example, the files to be published on GitHub Pages are generated by a build system.

This document shows the way to commit a build/gh-pages directory to the gh-pages branch by using Git plumbing commands. In the following example, Windows PowerShell is used as a shell environment.

Step 1 : Create a tree object

View statham_sanitizer.rb
module HTML
class StathamSanitizer < WhiteListSanitizer
def tokenize(text, options) do |token|
if token.is_a?(HTML::Tag) && options[:parent].include?(
token.to_s.gsub(/</, "&lt;")
You can’t perform that action at this time.