sphinx-notes/pages

Breaks custom domain setups (removes CNAME file)

peircej opened this issue · 5 comments

If a GH repo is set to serve its pages from a custom domain, GH inserts a file into the repo (CNAME) but sphinx-notes then consistently deletes that file because of the line here

pages/main.sh

Line 85 in 5452140

rm -vrf *

which means that it constantly breaks custom domains.

I think we need rm -vrf * !("CNAME") here

Previously I kept the CNAME file existing by the sphinx.ext.githubpages extension. Preventing it from removing is a good idea.

Pattern !("xxx") seems not work:

bash-3.2$ ls
1  2  3  4
bash-3.2$ rm -vrf * !("1")
bash: !: event not found
bash-3.2$ ls
1  2  3  4

rm -vrf * !("1")

I should enable shell ext: shopt -s extglob.

This is done in #13

This fix lands on v3.