aboutsummaryrefslogtreecommitdiff
path: root/juick-www/src/main/java/com/juick/www/HelpService.java
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2017-08-18 16:22:05 +0300
committerGravatar Vitaly Takmazov2017-08-18 16:22:05 +0300
commitdf58ac0c9854cc33606e7379f1e87a00b0ef8a2d (patch)
tree569afb88c46c42b4bd633bfcdf55ed43f06e995c /juick-www/src/main/java/com/juick/www/HelpService.java
parent332a6ff3074b5f432108be778e722ab12f3201c4 (diff)
www: render help from markdown
Diffstat (limited to 'juick-www/src/main/java/com/juick/www/HelpService.java')
-rw-r--r--juick-www/src/main/java/com/juick/www/HelpService.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/juick-www/src/main/java/com/juick/www/HelpService.java b/juick-www/src/main/java/com/juick/www/HelpService.java
index e588cd50..8e56916f 100644
--- a/juick-www/src/main/java/com/juick/www/HelpService.java
+++ b/juick-www/src/main/java/com/juick/www/HelpService.java
@@ -44,7 +44,7 @@ public class HelpService {
@Cacheable("help")
public String getHelp(final String page, final String lang) {
if (canBePage(page) && canBeLang(lang)) {
- String path = StringUtils.joinWith("/", helpPath, lang, page);
+ String path = StringUtils.joinWith("/", helpPath, lang, page + ".md");
try (InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(path)) {
if (is != null)
@@ -62,4 +62,8 @@ public class HelpService {
public boolean canBeLang(final String anything) {
return anything != null && LANG_PATTERN.matcher(anything).matches();
}
+
+ public String getHelpPath() {
+ return helpPath;
+ }
}