Skip to content

Commit f1b609a

Browse files
committed
Add custom cdn option
1 parent 6797fc3 commit f1b609a

File tree

6 files changed

+18
-7
lines changed

6 files changed

+18
-7
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
# dukuwiki-codeprism
1+
# dukuwiki-codeprism
2+
3+
The manual about the `codeprism` can be found at
4+
https://www.dokuwiki.org/plugin:codeprism.

action.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@ private function getTheme()
1515

1616
private function getCdn()
1717
{
18-
return $this->getConf('cdn');
18+
if ($this->getConf('custom-cdn')) {
19+
return $this->getConf('custom-cdn');
20+
}
21+
else {
22+
return $this->getConf('cdn');
23+
}
1924
}
2025

2126
public function register(Doku_Event_Handler $controller)

codeprism.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
pre.dokuwiki-plugin-codeprism-dft {
2-
max-height: 30em;
3-
overflow-y: scroll;
2+
max-height: 30rem;
3+
overflow: auto;
44
}
55

66
pre.dokuwiki-plugin-codeprism-full {
7-
overflow: scroll;
7+
overflow: auto;
88
}
99

1010
div.code-toolbar {

conf/metadata.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
'https://cdn.bootcdn.net/ajax/libs/prism/1.29.0/',
2424
]
2525
];
26-
26+
$meta['custom-cdn'] = array('string');
2727
$meta['override-code'] = array('onoff');
2828
$meta['show-invis'] = array('onoff');
2929
$meta['hl-brace'] = array('onoff');

lang/en/settings.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
$lang['theme'] = 'Theme';
44
$lang['override-code'] = "True to override ''code'' syntax";
55
$lang['cdn'] = 'CDNs which provide PrismJS';
6+
$lang['custom-cdn'] = 'Specify the CDN yourself if the above CDNs does not meet your needs';
67
$lang['show-invis'] = 'True to show hidden characters such as tabs and line breaks';
78
$lang['hl-brace'] = 'True to highlight brace pairs when the cursor hovers over one of the braces';
89
$lang['previewer'] = 'True to enable preview angle, color, gradient, easing, and time';
10+
$lang['user'] = 'Specify the default user name at the command shell prompt when using command line style';
11+
$lang['host'] = 'Specify the default host name at the command shell prompt when using command line style';

plugin.info.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
base codeprism
22
author Siyuan Liu
33
4-
date 2023-07-16
4+
date 2023-12-03
55
name CodePrism Plugin
66
desc Using Prism to provide nice syntax highlighting.
77
url https://www.dokuwiki.org/plugin:codeprism

0 commit comments

Comments
 (0)