blob: d11857c324929d70048f6fea7b82e5f55c2b497a [file] [log] [blame]
Akronc71176d2022-03-14 11:15:07 +01001use Mojo::ByteStream 'b';
Akron85559f02023-09-04 11:42:45 +02002
Marc Kupietza1675022026-01-19 18:52:47 +01003# $main::ENV{MOJO_MAX_LINE_SIZE} = 65536;
Akron85559f02023-09-04 11:42:45 +02004
Akronc71176d2022-03-14 11:15:07 +01005{
Akronc71176d2022-03-14 11:15:07 +01006 'Kalamar-Auth' => {
Marc Kupietza1675022026-01-19 18:52:47 +01007 # client_id => b($app->home->child('.client_id')->slurp)->trim,
8 # client_secret => b($app->home->child('.client_secret')->slurp)->trim,
9 # Optimized for docker usage:
10 client_file => '/kalamar/super_client_info',
Akronc71176d2022-03-14 11:15:07 +010011 oauth2 => 1,
12 experimental_client_registration => 1
13 },
14 Kalamar => {
Marc Kupietza1675022026-01-19 18:52:47 +010015 # Removed for docker compliance
16 # api_path => 'http://10.0.10.51:9000/api/',
Marc Kupietz4f28dc42026-07-21 19:39:29 +020017 # Render Markdown doc pages (*.html.md) with headings at their literal
18 # level, so "##" in the corpus release log is an <h2> (matches the rest
19 # of the doc pages) rather than being pushed down by the default offset.
20 Markdown => { heading_offset => 0 },
Akron4a118742023-09-04 11:41:46 +020021 log_path => $app->home . '/log',
Akronc71176d2022-03-14 11:15:07 +010022 secure_cookie => 1,
23 https_only => 1,
24 plugins => ['Auth', 'Piwik','Plugins'],
25 experimental_proxy => 1,
26 proxy_inactivity_timeout => 120,
27 proxy_connect_timeout => 120,
Akron8ceba022024-04-18 09:18:53 +020028 openapi => 'openapi',
Akronc71176d2022-03-14 11:15:07 +010029 Piwik => {
30 ping_requests => 1,
31 ping_site_id => 13
32 },
33 navi_ext => [
34 {
Marc Kupietz2bd89b32026-08-03 17:39:34 +020035 # Replaces Kalamar's default corpus section (same id) in place,
36 # extending it with the release-log sub-item.
Akron56644052026-01-19 15:27:48 +010037 "title" => "corpus",
38 "id" => "corpus",
39 "class" => "folded",
40 "items" => [
41 {
Marc Kupietz4f28dc42026-07-21 19:39:29 +020042 "title" => "releases",
43 "id" => "releases"
44 },
45 {
Akron56644052026-01-19 15:27:48 +010046 "title" => "composition",
47 "id" => "composition"
48 },
49 {
50 "title" => "useful_subcorpora",
51 "id" => "useful_subcorpora"
52 },
53 {
54 "title" => "named_vc",
55 "id" => "named_vc"
56 }
57 ]
Akronc71176d2022-03-14 11:15:07 +010058 },
59 {
60 "title" => "Privacy",
61 "id" => "privacy"
62 },
Akron8dbf9c62024-03-20 17:24:15 +010063 {
64 "title" => "News",
65 "id" => "news"
66 },
Marc Kupietz442e0bd2026-08-04 12:51:39 +020067 {
68 "title" => "citation",
69 "id" => "citation"
70 },
Akronc71176d2022-03-14 11:15:07 +010071 ],
Marc Kupietza1675022026-01-19 18:52:47 +010072 defaults => {
73 alignment => 'center' # or 'right' or 'center'
74 },
Akronc71176d2022-03-14 11:15:07 +010075 },
76 CSP => {
77 'frame-src' => 'self',
78 'frame-ancestors' => ['self','http://*.ids-mannheim.de/','https://*.ids-mannheim.de/','http://klinux10/']
79 },
80 'Kalamar-Plugins' => {
Marc Kupietza1675022026-01-19 18:52:47 +010081 # Optimized for docker usage:
82 default_plugins => '/kalamar/default.plugins.json'
Akronc71176d2022-03-14 11:15:07 +010083 },
84 Piwik => {
85 url => 'https://stats.ids-mannheim.de',
86 token_auth => '8515ea786127a63a2974de25a0808b00',
87 site_id => 8,
88 embed => 1
89 },
90 hypnotoad => {
91 listen => ['http://*:4348'],
92 workers => 5,
93 inactivity_timeout => 120,
94 proxy => 1
95 },
Akronc71176d2022-03-14 11:15:07 +010096 Localize => {
Marc Kupietza1675022026-01-19 18:52:47 +010097 override => 1,
Akronc71176d2022-03-14 11:15:07 +010098 dict => {
99 de_loginExplanation => 'Anmeldung mit einem registrierten <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %>-Konto',
100 en_loginExplanation => 'Login with a registered <%= link_to "Cosmas-II" => "https://perso.ids-mannheim.de/registration/", style => "white-space: nowrap" %> account',
101 en_Nav_privacy => 'Privacy',
102 de_Nav_privacy => 'Datenschutz',
103 de_Nav_corpora => 'Korpora',
104 en_Nav_corpora => 'Corpora',
105 en_howToCite => 'Citation Help',
106 de_howToCite => 'Zitierhilfe',
Marc Kupietz442e0bd2026-08-04 12:51:39 +0200107 en_Nav_citation => 'References / Citation Help',
108 de_Nav_citation => 'Referenzen / Zitierhilfe',
109 en_corpusPub => 'DeReKo',
110 de_corpusPub => 'DeReKo',
Marc Kupietz152dfc92025-04-11 10:02:27 +0200111 de_usefulvcs => 'Nützliche virtuelle Sub-Korpora',
112 en_usefulvcs => 'Useful virtual sub-corpora',
113 de_currentdb => 'Aktuelle Datengrundlage: virtuelles Korpus <%= t code => stash("vc") %>',
114 en_currentdb => 'Current data set: Virtual corpus <%= t code => stash("vc") %>',
115 de_compositionbysource => 'Zusammensetzung nach Quelle',
116 en_compositionbysource => 'Composition by source',
Marc Kupietza1675022026-01-19 18:52:47 +0100117 #de_Title_composition => 'Korpus-Zusammensetzung',
118 #en_Title_composition => 'Corpus Composition',
Marc Kupietz4f28dc42026-07-21 19:39:29 +0200119 en_Nav_releases => 'Release Log',
Marc Kupietz2bd89b32026-08-03 17:39:34 +0200120 de_Nav_releases => 'Korpus-Releases',
Akronc71176d2022-03-14 11:15:07 +0100121 }
122 },
123 'TagHelpers-ContentBlock' => {
124 footer => [
125 {
126 inline => '<%= link_to loc("about") => "https://www.ids-mannheim.de/digspra/kl/projekte/korap/" %>',
127 position => 70
128 },
129 {
Marc Kupietza1675022026-01-19 18:52:47 +0100130 inline => '<%= link_to loc("news") => url_for(doc => {page => "news" }) %>',
131 position => 72
132 },
133 {
Marc Kupietz442e0bd2026-08-04 12:51:39 +0200134 inline => '<%= link_to loc("howToCite") => url_for(doc => { page => "citation", scope => undef }) %>',
Akronc71176d2022-03-14 11:15:07 +0100135 position => 75
136 },
137 {
Akrondc1b9bb2025-07-21 14:34:05 +0200138 inline => '<%= link_to loc("privacy") => url_for(doc => { page => "privacy", scope => undef }) %>',
Akronc71176d2022-03-14 11:15:07 +0100139 position => 90
140 },
141 {
142 inline => '<%= link_to loc("imprint") => "https://www.ids-mannheim.de/allgemein/impressum/" %>',
143 position => 80
144 },
145 ],
146 faq => [
147 {
148 position => 50,
149 inline => <<'HOWTOCITE'
150<section>
151 <h3 id="howToCite"><%= loc 'howToCite' %></h3>
Marc Kupietz442e0bd2026-08-04 12:51:39 +0200152 <p><%= link_to loc('howToCite') => url_for(doc => { page => "citation", scope => undef })->query({ embedded => "true" }) %></p>
Akronc71176d2022-03-14 11:15:07 +0100153</section>
154HOWTOCITE
155 }
156 ],
157 loginInfo => [
158 {
159 inline => '<p><%== loc "loginExplanation" %></p>',
160 position => 50
161 }#,
162# {
163# inline => '<p class="announcement"><time datetime="2018-05-24">24.05.2018</time> Um weitere Anwendungen für die Nutzung von DeReKo anbieten zu können, haben wir die <%= link_to "Nutzungsvereinbarung", "https://www.ids-mannheim.de/cosmas2/projekt/registrierung/Nutzungsvereinbarung.html" %> angepasst!</p>',
164# position => 100
165# }
Akron743c2d62025-03-05 14:37:59 +0100166 ],
167 headerButtonGroup => [
168 {
Akrondc1b9bb2025-07-21 14:34:05 +0200169 inline => '<h3 class="nav-link"><%= link_to loc("news") => url_for(doc => {page => "news", scope => undef }) %></h3>',
Akron743c2d62025-03-05 14:37:59 +0100170 position => 30
171 }
Akronc71176d2022-03-14 11:15:07 +0100172 ]
173 },
Akronc71176d2022-03-14 11:15:07 +0100174 # See Mojolicious::Plugin::CHI
Marc Kupietza1675022026-01-19 18:52:47 +0100175 # Could be optimized to use the data folder in docker scenarios:
176# CHI => {
177# default => {
178# driver => 'FastMmap',
179# root_dir => app->home . '/cache/data',
180# cache_size => '500m',
181# max_size => '500m'
182# },
183# user => {
184# l1_cache => {
185# driver => 'FastMmap',
186# root_dir => app->home . '/cache/usermap',
187# cache_size => '50m',
188# max_size => '50m'
189# },
190# driver => 'File',
191# root_dir => app->home . '/cache/userfile',
192# max_key_length => 64,
193# max_size => '500m'
194# }
195# }
Akronc71176d2022-03-14 11:15:07 +0100196};