diff options
| author | 2013-02-13 18:35:39 -0300 | |
|---|---|---|
| committer | 2013-02-13 18:35:39 -0300 | |
| commit | a40930043121a4b60de8526d58417761a54ab718 (patch) | |
| tree | 383c5cf8e320761ee942619282fe51be625179a7 /nikola/plugins/task_render_sources.py | |
| parent | 9c5708cc92af894e414bc76ee35ec2230de5d288 (diff) | |
Imported Upstream version 5.2upstream/5.2
Diffstat (limited to 'nikola/plugins/task_render_sources.py')
| -rw-r--r-- | nikola/plugins/task_render_sources.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/nikola/plugins/task_render_sources.py b/nikola/plugins/task_render_sources.py index 3a05b96..bce8d69 100644 --- a/nikola/plugins/task_render_sources.py +++ b/nikola/plugins/task_render_sources.py @@ -8,11 +8,11 @@ # distribute, sublicense, and/or sell copies of the # Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: -# +# # The above copyright notice and this permission notice # shall be included in all copies or substantial portions of # the Software. -# +# # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR @@ -53,9 +53,13 @@ class Sources(Task): flag = False for lang in kw["translations"]: for post in self.site.timeline: - output_name = os.path.join(kw['output_folder'], - post.destination_path(lang, post.source_ext())) + output_name = os.path.join( + kw['output_folder'], post.destination_path( + lang, post.source_ext())) source = post.source_path + if source.endswith('.html'): + print("Avoiting to render source of .html page") + continue if lang != kw["default_lang"]: source_lang = source + '.' + lang if os.path.exists(source_lang): @@ -68,7 +72,7 @@ class Sources(Task): 'actions': [(utils.copy_file, (source, output_name))], 'clean': True, 'uptodate': [utils.config_changed(kw)], - } + } if flag is False: # No page rendered, yield a dummy task yield { 'basename': 'render_sources', |
