Documentation for STATIC_PATHS #3192
Replies: 1 comment
-
Mostly correct, maybe a bit on the verbose side. I'd combine first and third paragraphs and structure it a bit like the original. Second paragraph with the examples can come afterwards. I'd generally advise against explicitly writing defaults for other settings (i.e.
|
Beta Was this translation helpful? Give feedback.
-
I think the documentation for STATIC_PATHS should be expanded a bit. I had questions similar to one Justin Meyer answer here.
Before I submit a pull request, I want to ask if the change I am considering is correct. Here is how I would put it:
STATIC_PATHS
A list of paths that will be copied to the output directory without modification. Paths can be directories or files. Directories must be subdirectories of PATH ('content' by default). Files must be in subdirectories of PATH. In either case, they are specified relative to PATH.
For example, if you you want to keep icon files in "/icons" on your site, create content/icons/, and include "icons" in STATIC_PATHS. Pelican will copy the "icons" directory and its contents (including subdirectories, recursively) to output/icons. You can also copy individual files by including them in the list; globbing is not supported. If files are in subdirectories of PATH, they will be in subdirectories of the root of your site: if you have content/text/choc.txt, you can include it in your site by adding "text/choc.txt" to STATIC_PATHS. Pelican will copy it to output/text/choc.txt, and in your site, it will be at text/choc.txt.
Articles, pages, and other content source files will normally be skipped, so it is safe for a directory to appear both here and in PAGE_PATHS or ARTICLE_PATHS. Pelican’s default settings include the “images” directory here.
Currently it reads:
A list of directories (relative to PATH) in which to look for static files. Such files will be copied to the output directory without modification. Articles, pages, and other content source files will normally be skipped, so it is safe for a directory to appear both here and in PAGE_PATHS or ARTICLE_PATHS. Pelican’s default settings include the “images” directory here.
Beta Was this translation helpful? Give feedback.
All reactions