1
0
Fork 0
forked from github/pelican

Remove the FILES_TO_COPY setting

We no longer instantiate the Static object in the StaticGenerator, so
we can't set the save_as argument anymore.  If you want to adjust the
output path, use the upcoming EXTRA_PATH_METADATA setting.
This commit is contained in:
W. Trevor King 2013-06-03 15:14:11 -04:00
commit 1ca0e06a27
3 changed files with 0 additions and 17 deletions

View file

@ -68,9 +68,6 @@ Setting name (default value) What doe
generating new files. This can be useful in preventing older,
unnecessary files from persisting in your output. However, **this is
a destructive setting and should be handled with extreme care.**
`FILES_TO_COPY` (``()``) A list of files (or directories) to copy from the source (inside the
content directory) to the destination (inside the output directory).
For example: ``(('extra/robots.txt', 'robots.txt'),)``.
`JINJA_EXTENSIONS` (``[]``) A list of any Jinja2 extensions you want to use.
`JINJA_FILTERS` (``{}``) A list of custom Jinja2 filters you want to use.
The dictionary should map the filtername to the filter function.

View file

@ -559,19 +559,6 @@ class StaticGenerator(Generator):
self.staticfiles.append(static)
self.add_source_path(static)
# same thing for FILES_TO_COPY
for src, dest in self.settings['FILES_TO_COPY']:
static = read_file(
base_path=self.path, path=f, content_class=Static,
fmt='static',
settings=self.settings, context=self.context,
preread_signal=signals.static_generator_preread,
preread_sender=self,
context_signal=signals.static_generator_context,
context_sender=self)
self.staticfiles.append(static)
self.add_source_path(static)
def generate_output(self, writer):
self._copy_paths(self.settings['THEME_STATIC_PATHS'], self.theme,
'theme', self.output_path, os.curdir)

View file

@ -95,7 +95,6 @@ DEFAULT_CONFIG = {
'DEFAULT_METADATA': (),
'FILENAME_METADATA': '(?P<date>\d{4}-\d{2}-\d{2}).*',
'PATH_METADATA': '',
'FILES_TO_COPY': (),
'DEFAULT_STATUS': 'published',
'ARTICLE_PERMALINK_STRUCTURE': '',
'TYPOGRIFY': False,