Commit 593481c7 authored by NGPixel's avatar NGPixel

Markdown display fixes + error pages

parent f7ce81e8
...@@ -20,6 +20,7 @@ before_script: ...@@ -20,6 +20,7 @@ before_script:
- npm install -g snyk - npm install -g snyk
- snyk auth $SNYK_TOKEN - snyk auth $SNYK_TOKEN
before_deploy: before_deploy:
- npm install github:requarks/core -f
- npm install -g gulp - npm install -g gulp
- gulp deploy - gulp deploy
- snyk monitor - snyk monitor
......
<a href="https://github.com/Requarks/wiki"> <a href="https://github.com/Requarks/wiki">
<img src="https://raw.githubusercontent.com/Requarks/wiki/master/assets/favicons/favicon-96x96.png" alt="Requarks Wiki" title="Requarks Wiki" align="right" /> <img src="https://raw.githubusercontent.com/Requarks/wiki/master/assets/favicons/favicon-96x96.png" alt="Wiki.js" title="Wiki.js" align="right" />
</a> </a>
# Requarks Wiki # Wiki.js
[![Release](https://img.shields.io/github/release/Requarks/wiki.svg?maxAge=86400)](https://github.com/Requarks/wiki/releases) [![Release](https://img.shields.io/github/release/Requarks/wiki.svg?maxAge=86400)](https://github.com/Requarks/wiki/releases)
[![License](https://img.shields.io/badge/license-AGPLv3-blue.svg)](https://github.com/requarks/wiki/blob/master/LICENSE) [![License](https://img.shields.io/badge/license-AGPLv3-blue.svg)](https://github.com/requarks/wiki/blob/master/LICENSE)
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
### Documentation ### Documentation
- [Installation Guide](https://requarks-wiki.readme.io/docs/prerequisites) - [Installation Guide](https://wiki.requarks.io/install)
##### Milestones ##### Milestones
- [ ] Account Management - [ ] Account Management
......
...@@ -91,7 +91,7 @@ var job = new cron({ ...@@ -91,7 +91,7 @@ var job = new cron({
}); });
fs.walk(repoPath).on('data', function (item) { fs.walk(repoPath).on('data', function (item) {
if(path.extname(item.path) === '.md') { if(path.extname(item.path) === '.md' && path.basename(item.path) !== 'README.md') {
let entryPath = entries.parsePath(entries.getEntryPathFromFullPath(item.path)); let entryPath = entries.parsePath(entries.getEntryPathFromFullPath(item.path));
let cachePath = entries.getCachePath(entryPath); let cachePath = entries.getCachePath(entryPath);
......
This source diff could not be displayed because it is too large. You can view the blob instead.
$primary: 'indigo';
@import 'core-client/scss/core';
@import 'core-client/scss/components/button';
@import 'core-client/scss/components/grid';
@import 'core-client/scss/components/typography';
@import 'core-client/scss/pages/error';
...@@ -35,6 +35,8 @@ paths: ...@@ -35,6 +35,8 @@ paths:
# Site Authentication # Site Authentication
# --------------------------------------------------------------------- # ---------------------------------------------------------------------
public: false
auth: auth:
local: local:
enabled: true enabled: true
......
...@@ -55,7 +55,7 @@ var mkdown = md({ ...@@ -55,7 +55,7 @@ var mkdown = md({
// Rendering rules // Rendering rules
mkdown.renderer.rules.emoji = function(token, idx) { mkdown.renderer.rules.emoji = function(token, idx) {
return '<i class="twa twa-' + token[idx].markup + '"></i>'; return '<i class="twa twa-' + _.replace(token[idx].markup, /_/g, '-') + '"></i>';
}; };
/** /**
...@@ -171,6 +171,19 @@ const parseContent = (content) => { ...@@ -171,6 +171,19 @@ const parseContent = (content) => {
cr(elm).replaceWith(txtLink); cr(elm).replaceWith(txtLink);
}); });
//-> Re-attach blockquote styling classes to their parents
cr.root().children('blockquote').each((i, elm) => {
if(cr(elm).children().length > 0) {
let bqLastChild = cr(elm).children().last()[0];
let bqLastChildClasses = cr(bqLastChild).attr('class');
if(bqLastChildClasses.length > 0) {
cr(bqLastChild).removeAttr('class');
cr(elm).addClass(bqLastChildClasses);
}
}
});
output = cr.html(); output = cr.html();
return output; return output;
......
footer.footer footer.footer
span span
= t('footer.poweredby') + ' ' = t('footer.poweredby') + ' '
a(href='https://github.com/Requarks/wiki') Requarks Wiki a(href='https://github.com/Requarks/wiki') Wiki.js
| . | .
ul ul
li: a(href='/')= t('footer.home') li: a(href='/')= t('footer.home')
......
...@@ -19,13 +19,11 @@ html ...@@ -19,13 +19,11 @@ html
// CSS // CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css') link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/app.css') link(type='text/css', rel='stylesheet', href='/css/error.css')
body(class='server-error') body(class='is-forbidden')
section.hero.is-danger.is-fullheight .container
.hero-body a(href='/'): img(src='/favicons/android-icon-96x96.png')
.container h1.title(style={ 'margin-top': '30px'}) Forbidden
a(href='/'): img(src='/favicons/android-icon-96x96.png') h2.subtitle(style={ 'margin-bottom': '50px'}) Sorry, you don't have the necessary permissions to access this page.
h1.title(style={ 'margin-top': '30px'}) Forbidden a.button.is-amber.is-inverted(href='/') Go Home
h2.subtitle(style={ 'margin-bottom': '50px'}) Sorry, you don't have the necessary permissions to access this page. \ No newline at end of file
a.button.is-dark.is-inverted(href='/') Go Home
\ No newline at end of file
...@@ -19,14 +19,12 @@ html ...@@ -19,14 +19,12 @@ html
// CSS // CSS
link(type='text/css', rel='stylesheet', href='/css/libs.css') link(type='text/css', rel='stylesheet', href='/css/libs.css')
link(type='text/css', rel='stylesheet', href='/css/app.css') link(type='text/css', rel='stylesheet', href='/css/error.css')
body(class='server-error') body(class='is-notexist')
section.hero.is-dark.is-fullheight .container
.hero-body a(href='/'): img(src='/favicons/android-icon-96x96.png')
.container h1= message
a(href='/'): img(src='/favicons/android-icon-96x96.png') h2 Would you like to create this entry?
h1.title(style={ 'margin-top': '30px'})= message a.button.is-amber.is-inverted(href='/create/' + newpath) Create
h2.subtitle(style={ 'margin-bottom': '50px'}) Would you like to create this entry? a.button.is-amber.is-inverted(href='/') Go Home
a.button.is-dark.is-inverted(href='/create/' + newpath, style={'margin-right': '5px'}) Create \ No newline at end of file
a.button.is-dark.is-inverted(href='/') Go Home
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment