Skip to content

Instantly share code, notes, and snippets.


Ray Luo rayluo

View GitHub Profile
cobyism /
Last active Nov 30, 2022
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](

Deploying a subfolder to GitHub Pages

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.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

dupuy / README.rst
Last active Oct 1, 2022
Common markup for Markdown and reStructuredText
View README.rst

Markdown and reStructuredText

GitHub supports several lightweight markup languages for documentation; the most popular ones (generally, not just at GitHub) are Markdown and reStructuredText. Markdown is sometimes considered easier to use, and is often preferred when the purpose is simply to generate HTML. On the other hand, reStructuredText is more extensible and powerful, with native support (not just embedded HTML) for tables, as well as things like automatic generation of tables of contents.

brianhsu /
Created Nov 30, 2011
[Python] reStructuredText GitHub Gist directive.
class GitHubGist(Directive):
""" Embed GitHub Gist.
.. gist:: GIST_ID
required_arguments = 1
optional_arguments = 1