Change Your Github Repository's Language

Posted on Wed 21 March 2018 in tips

Github uses Linguist library to determine your repository's language. If you find that Github has done something wrong, you may fix by adding a .gitattributes file with the following content:

* linguist-vendored
*.py linguist-vendored=false

The above will let Github detect your repository's language as Python.

Continue reading

Copy Static Files in Pelican

Posted on Tue 20 March 2018 in tips

GitHub Pages provide custom URL feature, which will create a CNAME file in the HTML root.

Using Pelican STATIC_PATHS, we can include this CNAME file. Copy the following to your Pelican configuration. (Supposing your CNAME file is in your content/extra directory.)

STATIC_PATHS = ['images', 'extra/CNAME']
EXTRA_PATH_METADATA = {'extra/CNAME': {'path …

Continue reading