Markdown display fixes + error pages

pull/33/head
NGPixel 8 years ago
parent f7ce81e8c9
commit 593481c7e1

@ -20,6 +20,7 @@ before_script:
- npm install -g snyk
- snyk auth $SNYK_TOKEN
before_deploy:
- npm install github:requarks/core -f
- npm install -g gulp
- gulp deploy
- snyk monitor

@ -1,8 +1,8 @@
<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>
# Requarks Wiki
# Wiki.js
[![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)
@ -16,7 +16,7 @@
### Documentation
- [Installation Guide](https://requarks-wiki.readme.io/docs/prerequisites)
- [Installation Guide](https://wiki.requarks.io/install)
##### Milestones
- [ ] Account Management

@ -91,7 +91,7 @@ var job = new cron({
});
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 cachePath = entries.getCachePath(entryPath);

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -0,0 +1,9 @@
$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:
# Site Authentication
# ---------------------------------------------------------------------
public: false
auth:
local:
enabled: true

@ -55,7 +55,7 @@ var mkdown = md({
// Rendering rules
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) => {
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();
return output;

@ -1,7 +1,7 @@
footer.footer
span
= t('footer.poweredby') + ' '
a(href='https://github.com/Requarks/wiki') Requarks Wiki
a(href='https://github.com/Requarks/wiki') Wiki.js
| .
ul
li: a(href='/')= t('footer.home')

@ -19,13 +19,11 @@ html
// 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')
section.hero.is-danger.is-fullheight
.hero-body
.container
a(href='/'): img(src='/favicons/android-icon-96x96.png')
h1.title(style={ 'margin-top': '30px'}) Forbidden
h2.subtitle(style={ 'margin-bottom': '50px'}) Sorry, you don't have the necessary permissions to access this page.
a.button.is-dark.is-inverted(href='/') Go Home
body(class='is-forbidden')
.container
a(href='/'): img(src='/favicons/android-icon-96x96.png')
h1.title(style={ 'margin-top': '30px'}) Forbidden
h2.subtitle(style={ 'margin-bottom': '50px'}) Sorry, you don't have the necessary permissions to access this page.
a.button.is-amber.is-inverted(href='/') Go Home

@ -19,14 +19,12 @@ html
// 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')
section.hero.is-dark.is-fullheight
.hero-body
.container
a(href='/'): img(src='/favicons/android-icon-96x96.png')
h1.title(style={ 'margin-top': '30px'})= message
h2.subtitle(style={ 'margin-bottom': '50px'}) Would you like to create this entry?
a.button.is-dark.is-inverted(href='/create/' + newpath, style={'margin-right': '5px'}) Create
a.button.is-dark.is-inverted(href='/') Go Home
body(class='is-notexist')
.container
a(href='/'): img(src='/favicons/android-icon-96x96.png')
h1= message
h2 Would you like to create this entry?
a.button.is-amber.is-inverted(href='/create/' + newpath) Create
a.button.is-amber.is-inverted(href='/') Go Home
Loading…
Cancel
Save