How to copy subdirectories as is on Jekyll website

I have a website; some pages that I maintain manually, some others that I generate using tools (mainly Shinx ). For manually maintained pages, I want to switch to Jekyll.

So my idea was to copy my entire site into a jekyll project and gradually move the pages from static HTML files to jekyll-managed markup files, which is much easier to maintain. On the other hand, the generated pages will be copied intact.

This works very well ... except that Jekyll does not copy files starting with underscores, which I have quite a lot: Sphinx names some special directories with leading underscores ( _static, _modules...), and I publish some python code in which top underscores are also used (e.g. __init__.py).

I know that I can use the directive includein _config.ymland add one by one all the known files / directories that I want to save. But I still risk skipping some files (especially when my generators evolve).

I would rather say to Jekyll, for each generated subdirectory, "this directory should be copied as-is." This would prevent each file in it from being viewed to see if it should be processed, and therefore any file, whether underlined or not, would be blindly copied.

Is there any way to do this? I could not find...

+4
source share
3 answers

The strategy I use (and, I guess, the strategy developed by jekyll developers) is to have the generation tool (sphinx, yard, ...) generate directly in the output directory (e.g. _site / api) and add the resulting folder to the keep_files configuration parameter in _config.yml

+7
source

Jekyll , , . , Jekyll _sites .

Jekyll, , Jekyll , _sites.

0

This is odd. A folder named hippo_menus was not included in my output. It used to be, but then it suddenly stopped. I changed it to hippomenus, and now it is included in the output.

0
source

Source: https://habr.com/ru/post/1540586/


All Articles