Ok, here is the thing. By default, doing what you did should work. I can
confirm it works because I just tried it (see long block of text at the end
of mail).
However, it does look like you edited your FILES setting. The default is
FILES = {'files': ''}
That means "take the content of the files folder and copy it to the
output". Seems you have changed it to
FILES = {'files': 'files'}
That means "take the content of the files folder and copy it to the output
in the files subfolder"
So, put it back as it was and all good.
Here is how it works by default:
nikola ~/P/nikola master ± nikola init -q foo2
[2018-03-20T15:14:15Z] INFO: init: Created empty site at foo2.
nikola ~/P/nikola master ± cd foo2
nikola ~/P/n/foo2 master ± touch files/CNAME
nikola ~/P/n/foo2 master ± nikola build
Scanning posts........done!
. copy_files:output/CNAME
. copy_assets:output/assets/css/bootstrap.min.css.map
. copy_assets:output/assets/css/docs.css
. copy_assets:output/assets/css/bootstrap-theme.min.css.map
. copy_assets:output/assets/css/bootstrap-theme.min.css
. copy_assets:output/assets/css/bootstrap.min.css
. copy_assets:output/assets/css/theme.css
. copy_assets:output/assets/css/images/ie6/borderTopLeft.png
. copy_assets:output/assets/css/images/ie6/borderTopCenter.png
. copy_assets:output/assets/css/images/ie6/borderMiddleRight.png
. copy_assets:output/assets/css/images/ie6/borderBottomRight.png
. copy_assets:output/assets/css/images/ie6/borderBottomLeft.png
. copy_assets:output/assets/css/images/ie6/borderBottomCenter.png
. copy_assets:output/assets/css/images/ie6/borderTopRight.png
. copy_assets:output/assets/css/images/ie6/borderMiddleLeft.png
. copy_assets:output/assets/js/jquery.min.map
. copy_assets:output/assets/js/jquery.min.js
. copy_assets:output/assets/js/flowr.plugin.js
. copy_assets:output/assets/js/bootstrap.min.js
. copy_assets:output/assets/fonts/glyphicons-halflings-regular.woff
. copy_assets:output/assets/fonts/glyphicons-halflings-regular.woff2
. copy_assets:output/assets/fonts/glyphicons-halflings-regular.svg
. copy_assets:output/assets/fonts/glyphicons-halflings-regular.ttf
. copy_assets:output/assets/fonts/glyphicons-halflings-regular.eot
. copy_assets:output/assets/css/rst_base.css
. copy_assets:output/assets/css/baguetteBox.min.css
. copy_assets:output/assets/css/ipython.min.css
. copy_assets:output/assets/css/nikola_ipython.css
. copy_assets:output/assets/css/nikola_rst.css
. copy_assets:output/assets/css/rst.css
. copy_assets:output/assets/css/html4css1.css
. copy_assets:output/assets/xml/atom.xsl
. copy_assets:output/assets/xml/rss.xsl
. copy_assets:output/assets/js/flowr.js
. copy_assets:output/assets/js/baguetteBox.min.js
. copy_assets:output/assets/js/fancydates.js
. copy_assets:output/assets/js/html5.js
. copy_assets:output/assets/js/moment-with-locales.min.js
. copy_assets:output/assets/js/html5shiv-printshiv.min.js
. copy_assets:output/assets/css/code.css
. render_posts:timeline_changes
. render_galleries:output/galleries
. render_galleries:output/galleries/index.html
. render_galleries:output/galleries/rss.xml
. render_listings:output/listings/index.html
. render_taxonomies:output/archive.html
. render_taxonomies:output/index.html
. render_taxonomies:output/categories/index.html
. render_taxonomies:output/rss.xml
. create_bundles:output/assets/css/all-nocdn.css
. create_bundles:output/assets/js/all.js
. create_bundles:output/assets/css/all.css
. create_bundles:output/assets/js/all-nocdn.js
. sitemap:output/sitemap.xml
. sitemap:output/sitemapindex.xml
. robots_file:output/robots.txt
nikola ~/P/n/foo2 master ± ls -l output/
total 40
-rw-r--r-- 1 ralsina domain^users 3085 mar 20 12:14 archive.html
drwxr-xr-x 6 ralsina domain^users 4096 mar 20 12:14 assets/
drwxr-xr-x 2 ralsina domain^users 4096 mar 20 12:14 categories/
-rw-r--r-- 1 ralsina domain^users 0 mar 20 12:14 CNAME
drwxr-xr-x 2 ralsina domain^users 4096 mar 20 12:14 galleries/
-rw-r--r-- 1 ralsina domain^users 3263 mar 20 12:14 index.html
drwxr-xr-x 2 ralsina domain^users 4096 mar 20 12:14 listings/
-rw-r--r-- 1 ralsina domain^users 79 mar 20 12:14 robots.txt
-rw-r--r-- 1 ralsina domain^users 726 mar 20 12:14 rss.xml
-rw-r--r-- 1 ralsina domain^users 711 mar 20 12:14 sitemapindex.xml
-rw-r--r-- 1 ralsina domain^users 864 mar 20 12:14 sitemap.xml
On Tue, Mar 20, 2018 at 8:58 AM Roberto Alsina <[email protected]> wrote:
> I cant give you the details because I am on a train but check the manual.
> You need to change where the files are copied to.
>
> El mar., 20 de mar. de 2018 8:57 AM, <[email protected]> escribió:
>
>> The file is correctly copied the files/ folder of the output directory.
>> Github pages requires the CNAME file to be in the root directory instead,
>> so I was expecting Nikola would handle the file in a special way. I'm
>> wondering if there is a workaround. Pushing the file to master does not
>> work as running github_deploy will remove the pushed file.
>>
>>
>> On Sunday, March 18, 2018 at 7:58:12 PM UTC+1, Chris Warrick wrote:
>>
>>> On 18 March 2018 at 19:55, <[email protected]> wrote:
>>> > As per the handbook, I added a CNAME file in the files/ directory in
>>> the src
>>> > branch, but this is not copied to the root directory of the master
>>> branch
>>> > (as is required by Github pages) when running github_deploy. I also
>>> cannot
>>> > find anything referring to "CNAME" in the nikola source. I'm wondering
>>> if
>>> > CNAME files are still being handled in Nikola. I currently use Nikola
>>> > 7.8.11.
>>>
>>> Those files are not handled in any special way. If you put a file in
>>> the `files` directory, it will be copied as-is to the output. Are you
>>> sure that:
>>>
>>> 1) you ran `nikola build` after adding that file?
>>> 2) FILES_FOLDERS was not changed in your conf.py?
>>>
>>> --
>>> Chris Warrick <https://chriswarrick.com/>
>>> PGP: 5EAAEA16
>>>
>> --
>> You received this message because you are subscribed to the Google Groups
>> "nikola-discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to [email protected].
>> For more options, visit https://groups.google.com/d/optout.
>>
>
--
You received this message because you are subscribed to the Google Groups
"nikola-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.