-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjournal.toml
211 lines (172 loc) · 5.77 KB
/
journal.toml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
[settings.pika]
host = "localhost"
timeout = 1
[settings.flask]
port = 9000
debug = true
[environment.variables] # strings??
site_root = "/"
root_mold_id = "nunja.molds/html5"
asset_root = "/assets/"
artifact_root = "/artifact/"
[environment.paths]
document_root = "src/physiome/journal/pages"
generated_root = "/tmp/site/journal"
[metadata.paths]
generated_root = "/tmp/metadata/journal"
# Repodono system variables and objects?
[environment.variables.resource_map]
"abi-hc-rgb.png" = "physiome.journal.molds/original_template/images/abi-hc-rgb.png"
"associated-branding.png" = "physiome.journal.molds/original_template/images/associated-branding.png"
"CurationAndSubmissionFlow.png" = "physiome.journal.molds/original_template/images/CurationAndSubmissionFlow.png"
"ds-logo-bw.png" = "physiome.journal.molds/original_template/images/ds-logo-bw.png"
"Fulltext_button.svg" = "physiome.journal.molds/original_template/images/Fulltext_button.svg"
"Horizonal_Online.png" = "physiome.journal.molds/original_template/images/Horizonal_Online.png"
"iups.svg" = "physiome.journal.molds/original_template/images/iups.svg"
"Physiome-beside-middle.png" = "physiome.journal.molds/original_template/images/Physiome-beside-middle.png"
"Physiome-beside.png" = "physiome.journal.molds/original_template/images/Physiome-beside.png"
"PMR_button.svg" = "physiome.journal.molds/original_template/images/PMR_button.svg"
"Run_button.svg" = "physiome.journal.molds/original_template/images/Run_button.svg"
[environment.variables.styles]
"style.css" = "physiome.journal:styles.min.css"
[environment.variables.scripts]
# "bundle.js" = "physiome.journal:webpack.js"
[environment.variables.css_class]
table = 'pure-table'
[[environment.objects]]
__name__ = "artifact_map"
__init__ = "repodono.model.base:FlatGroupedMapping"
mappings = ["styles", "scripts"]
[[environment.objects]]
__name__ = "jinja_renderer"
__init__ = "repodono.nunja.render:JinjaRenderer"
[[environment.objects]]
__name__ = "nunja_renderer"
__init__ = "repodono.nunja.render:NunjaRenderer"
[[environment.objects]]
__name__ = "mold_data_provider"
__init__ = "repodono.nunja.render:MoldDataProvider"
mapping = "resource_map"
[[environment.objects]]
__name__ = "artifact_provider"
__init__ = "repodono.nunja.render:ArtifactProvider"
mapping = "artifact_map"
[default.variables]
nunja_part_data = {}
# layout of the system (probably does not belong as part of environment)
[bucket._]
__roots__ = ["generated_root"]
accept = ["*/*"]
# assets/artifacts resource and endpoint definitions
[[resource."/assets/{filename}"]]
__name__ = "mold_data_resource"
__call__ = "mold_data_provider"
filename = "filename"
[endpoint._."/assets/{filename}"]
__provider__ = "mold_data_resource"
[[resource."/artifact/{filename}"]]
__name__ = "artifact_resource"
__call__ = "artifact_provider"
filename = "filename"
[endpoint._."/artifact/{filename}"]
__provider__ = "artifact_resource"
# markdown
[[resource."/"]]
# instances of this will be modified, so it must be defined per resource
__name__ = "markdown"
__init__ = "markdown:Markdown"
extensions = ["'meta'"]
[[resource."/"]]
__name__ = "page_loader"
__init__ = "repodono.task.root:FilterFextRoot"
root = "document_root"
fext_filters = [
["'.md'", "markdown.convert"]
]
# nunja stuff
# TODO reorganise these stubs at some point
[[resource."/"]]
__name__ = "nunja_page"
__call__ = "nunja_renderer"
mold_id = "root_mold_id"
data.css = "styles"
data.js = "scripts"
data.title = "nunja_full_title"
data.body = "nunja_part"
data.artifact_root = "artifact_root"
data.asset_root = "asset_root"
[[resource."/"]]
__name__ = "nunja_page_part"
__call__ = "nunja_renderer.render"
mold_id = "nunja_part_mold_id"
data = "nunja_part_data"
[[resource."/"]]
__name__ = "nunja_index_part"
__call__ = "nunja_renderer.render_template"
mold_id_template = "'physiome.journal.molds/original_template/index.nja'"
data = "nunja_part_data"
# jinja via nunja
[[resource."/"]]
__name__ = "std_jinja_template_loader"
__call__ = "jinja_renderer.load_template"
template_id = "template_id"
[[resource."/"]]
__name__ = "std_jinja_template"
__call__ = "std_jinja_template_loader.prerender"
__nunja_base_jinja__ = "'nunja.tmpl/builtin/html5.nja'"
__nunja_js_prefix__ = "'/artifact/'"
__nunja_css_prefix__ = "'/artifact/'"
css_src = "styles"
js_src = "scripts"
# preset pages for the journal
[[resource."/{page}"]]
__name__ = "raw_page"
__call__ = "page_loader.text"
target = "page"
[[resource."/{page}"]]
__name__ = "jinja_page"
__call__ = "std_jinja_template"
content = "raw_page"
asset_root = "asset_root"
title = "page"
[localmap."/"]
nunja_part_data = "data"
nunja_part = "nunja_index_part"
data.site_root = "site_root"
data.asset_root = "asset_root"
# [endpoint._."/"]
# __provider__ = "nunja_page"
# __root__ = "generated_root"
# __filename__ = "index.html"
# nunja_part_mold_id = "physiome.journal.molds/original_template"
# nunja_full_title = "Physiome Journal - Home"
[[resource."/"]]
__name__ = "jinja_page"
__call__ = "std_jinja_template"
asset_root = "asset_root"
title = "title"
[endpoint._."/"]
__provider__ = "jinja_page"
__root__ = "generated_root"
__filename__ = "index.html"
template_id = "physiome.journal.templates/main/index.nja"
title = "Home"
[localmap."/{page}"]
nunja_part_data = "data"
nunja_part = "nunja_page_part"
data.content = "raw_page"
data.site_root = "site_root"
data.asset_root = "asset_root"
# [endpoint._."/{page}"]
# __provider__ = "nunja_page"
# __root__ = "generated_root"
# __filename__ = "index.html"
# nunja_part_mold_id = "physiome.journal.molds/original_template"
# # TODO figure out how to override this from the slugs
# nunja_full_title = "Physiome Journal"
[endpoint._."/{page}"]
__provider__ = "jinja_page"
__root__ = "generated_root"
__filename__ = "index.html"
template_id = "physiome.journal.templates/main/template.nja"
# TODO figure out how to override this from the slugs