1.1 --- a/moinformat/input/directory.py Tue Apr 16 23:35:21 2019 +0200
1.2 +++ b/moinformat/input/directory.py Tue Apr 16 23:36:14 2019 +0200
1.3 @@ -51,7 +51,7 @@
1.4
1.5 # Support attachments directories.
1.6
1.7 - self.attachments_dir = metadata.get("attachments", "attachments")
1.8 + self.attachments_dir = metadata.get("attachments")
1.9
1.10 def all(self):
1.11
2.1 --- a/moinformat/links/common.py Tue Apr 16 23:35:21 2019 +0200
2.2 +++ b/moinformat/links/common.py Tue Apr 16 23:36:14 2019 +0200
2.3 @@ -67,8 +67,8 @@
2.4 # Obtain essential metadata.
2.5
2.6 self.mapping = metadata.get("mapping", {})
2.7 - self.root_pagename = metadata.get("root_pagename", "FrontPage")
2.8 - self.attachments_dir = metadata.get("attachments", "attachments")
2.9 + self.root_pagename = metadata.get("root_pagename")
2.10 + self.attachments_dir = metadata.get("attachments")
2.11
2.12 def resolve(path, pagename, root_pagename):
2.13
3.1 --- a/moinformat/metadata.py Tue Apr 16 23:35:21 2019 +0200
3.2 +++ b/moinformat/metadata.py Tue Apr 16 23:36:14 2019 +0200
3.3 @@ -3,7 +3,7 @@
3.4 """
3.5 Metadata for document conversion.
3.6
3.7 -Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk>
3.8 +Copyright (C) 2018, 2019 Paul Boddie <paul@boddie.org.uk>
3.9
3.10 This program is free software; you can redistribute it and/or modify it under
3.11 the terms of the GNU General Public License as published by the Free Software
3.12 @@ -31,9 +31,11 @@
3.13 "Metadata employed in the document conversion process."
3.14
3.15 defaults = {
3.16 + "attachments" : "attachments",
3.17 "input_format" : "moin",
3.18 "output_context" : "standalone",
3.19 "output_format" : "moin",
3.20 + "root_pagename" : "FrontPage",
3.21 }
3.22
3.23 default_effects = {
4.1 --- a/moinformat/output/directory.py Tue Apr 16 23:35:21 2019 +0200
4.2 +++ b/moinformat/output/directory.py Tue Apr 16 23:36:14 2019 +0200
4.3 @@ -40,10 +40,14 @@
4.4 self.dir = Directory(metadata.get("output_filename"))
4.5 self.dir.ensure()
4.6
4.7 - self.index_name = metadata.get("index_name", "index.html")
4.8 + # Use any document index setting as the default for the index filename.
4.9 +
4.10 + document_index = metadata.get("document_index", "index.html")
4.11 +
4.12 + self.index_name = metadata.get("index_name", document_index)
4.13 self.page_suffix = metadata.get("page_suffix", "%shtml" % extsep)
4.14 - self.root_pagename = metadata.get("root_pagename", "FrontPage")
4.15 - self.attachments_dir = metadata.get("attachments", "attachments")
4.16 + self.root_pagename = metadata.get("root_pagename")
4.17 + self.attachments_dir = metadata.get("attachments")
4.18
4.19 # Convenience methods.
4.20