mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Remove rsync_excludes.txt.jinja2, just make it a string. (#2659)
No need to have this file be a template. It can just be written out as a string.
This commit is contained in:
parent
2a5b826180
commit
283a8b9c9f
2 changed files with 8 additions and 6 deletions
|
|
@ -86,6 +86,13 @@ class _DEFAULT_PATH_TYPE(str): # noqa: SLOT000
|
|||
_DEFAULT_PATH = _DEFAULT_PATH_TYPE(os.curdir)
|
||||
|
||||
|
||||
RSYNC_EXCLUDES = """\
|
||||
# Files to exclude with rsync(1) during publishing.
|
||||
# See the INCLUDE/EXCLUDE PATTERN RULES section of the rsync man page.
|
||||
|
||||
.DS_Store
|
||||
"""
|
||||
|
||||
def ask(question, answer=str, default=None, length=None):
|
||||
if answer is str:
|
||||
r = ""
|
||||
|
|
@ -411,8 +418,7 @@ needed by Pelican.
|
|||
try:
|
||||
with open(os.path.join(CONF['basedir'], 'rsync_excludes.txt'),
|
||||
'w', 'utf-8') as fd:
|
||||
_template = _jinja_env.get_template('rsync_excludes.txt.jinja2')
|
||||
fd.write(_template.render(**CONF))
|
||||
fd.write(RSYNC_EXCLUDES)
|
||||
fd.close()
|
||||
except OSError as e:
|
||||
print('Error: {0}'.format(e))
|
||||
|
|
|
|||
|
|
@ -1,4 +0,0 @@
|
|||
# Files to exclude with rsync(1) during publishing.
|
||||
# See the INCLUDE/EXCLUDE PATTERN RULES section of the rsync man page.
|
||||
|
||||
.DS_Store
|
||||
Loading…
Add table
Add a link
Reference in a new issue