-
-
Notifications
You must be signed in to change notification settings - Fork 718
Expand file tree
/
Copy pathsettings.php
More file actions
59 lines (43 loc) · 1.77 KB
/
settings.php
File metadata and controls
59 lines (43 loc) · 1.77 KB
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
<?php
//// General Settings
// How should MDR capitalize things?
// - 'Words'
// - 'Sentences'
// - 'First'
// - 'All'
// - 'None'
$Settings['Capitalize']['Titles'] = 'Words';
$Settings['Capitalize']['Breadcrumbs'] = 'All';
// Language
// - 'en'
// - 'tech'
$Settings['Language'] = 'tech';
// Show Source
// - true
// - false
$Settings['Show Source'] = true;
//// Automatic and Advanced Settings
// Figure out what file they're after.
$MDR['Core'] = __DIR__;
$MDR['Root'] = str_replace('/docs/_mdr', '', $MDR['Core']);
$MDR['Templates'] = $MDR['Root'].'/_templates/';
$Request['Raw'] = filter_input(INPUT_SERVER, 'REQUEST_URI') ?? $_SERVER['REQUEST_URI'];
$Request['Exploded'] = explode('?', $Request['Raw'])[0];
$Request['Trimmed'] = trim(rtrim(str_replace('.md', '', $Request['Exploded']), '/'));
// Made dynamic per-branch
// $Request['Directory'] = str_replace('/branch/docs-by-mdr', '', $MDR['Root']).$Request['Trimmed'];
$Request['Directory'] = rtrim($MDR['Root'].'/docs/'.(explode('/docs/', $Request['Trimmed'])[1] ?: ''), '/');
$Request['Markdown'] = $Request['Directory'].'.md';
$Request['Source'] = false;
$Templates['Header'] = $MDR['Templates'].'header.php';
$Templates['Alert'] = $MDR['Templates'].'alert.php';
$Templates['Footer'] = $MDR['Templates'].'footer.php';
//// Special
require_once $MDR['Root'].'/_backend/preload.php';
//// Strings and Translations
$Lang['tech']['FILE_NOT_FOUND'] = 'File Not Found.';
$Lang['tech']['NO_FILES_IN_DIRECTORY'] = 'No Files in Directory.';
$Lang['tech']['SOURCE'] = 'Source';
$Lang['en']['FILE_NOT_FOUND'] = 'Sorry, we couldn\'t find that.';
$Lang['en']['NO_FILES_IN_DIRECTORY'] = 'Sorry, we couldn\'t find any files in this folder.';
$Lang['en']['SOURCE'] = 'Source';