williamcanin / typing-jekyll-template

:syringe: Typing, is a template for Jekyll built especially for those who want to have a blog and pages quickly and lightly.

Home Page:https://github.com/williamcanin/typing-jekyll-template

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to prevent a special file in _site directory from being deleted when compiling

rupc opened this issue · comments

I'm customizing my blog using your theme. Recently, I changed the domain name rather using default(xxxx.github.io). To use the custom domain, I have to add CNAME file in the repository. But after compiling the repository, CNAME file in it is removed, which results in redirecting wrong place.

My first attempt is to add CNAME in "exclude" field in _config.yml, and copy CNAME to _site every time I compile, but this solution is cumbersome because it needs to synchronize with the remote repository (fetch CNAME from there, change custom domain name in Github page).

I want to enforce CNAME not to be deleted. What should I do?

Thanks, in advance :)

After learning a bit about jekyll, I found how to do that.
In _config.yml, "keep_files" field keep the files or directories from being deleted.
So if you want to keep CNAME, just add following line in _config.yml.
keep_lines: ['CNAME']