feat: twemoji + headers fix
This commit is contained in:
parent
86c6aabebd
commit
1771289188
@ -69,6 +69,7 @@
|
||||
padding: 8px 0 0 0;
|
||||
color: mc('grey', '800');
|
||||
position: relative;
|
||||
margin-top: 1rem;
|
||||
|
||||
@at-root .theme--dark & {
|
||||
color: mc('grey', '500');
|
||||
@ -134,6 +135,11 @@
|
||||
}
|
||||
}
|
||||
|
||||
.emoji {
|
||||
height: 1.25em;
|
||||
margin: 0 1px -4px;
|
||||
}
|
||||
|
||||
blockquote {
|
||||
padding: 0 0 1rem 0;
|
||||
border: 1px solid mc('blue', '500');
|
||||
@ -214,6 +220,30 @@
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------
|
||||
// LISTS
|
||||
// ---------------------------------
|
||||
|
||||
ol, ul {
|
||||
padding: 1rem 24px 0 24px;
|
||||
list-style-position: inside;
|
||||
|
||||
li + li {
|
||||
margin-top: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style: none;
|
||||
|
||||
> li::before {
|
||||
content: '\25b8';
|
||||
color: mc('grey', '600');
|
||||
display: inline-block;
|
||||
width: 1.35rem;
|
||||
}
|
||||
}
|
||||
|
||||
// ---------------------------------
|
||||
// CODE
|
||||
// ---------------------------------
|
||||
@ -232,15 +262,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
ol, ul {
|
||||
padding: 1rem 24px 0 24px;
|
||||
list-style-position: inside;
|
||||
|
||||
li + li {
|
||||
margin-top: .5rem;
|
||||
}
|
||||
}
|
||||
|
||||
.prismjs{
|
||||
border: none;
|
||||
border-radius: 5px;
|
||||
|
@ -1,14 +1,14 @@
|
||||
# ====================
|
||||
# --- Build Assets ---
|
||||
# ====================
|
||||
FROM node:10.14-alpine AS assets
|
||||
FROM node:10.15-alpine AS assets
|
||||
|
||||
RUN apk update && \
|
||||
apk add yarn g++ make python --no-cache && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
mkdir -p /var/wiki
|
||||
mkdir -p /wiki
|
||||
|
||||
WORKDIR /var/wiki
|
||||
WORKDIR /wiki
|
||||
|
||||
COPY ./client ./client
|
||||
COPY ./dev ./dev
|
||||
@ -19,28 +19,28 @@ COPY ./.eslintrc.yml ./.eslintrc.yml
|
||||
|
||||
RUN yarn --cache-folder /codefresh/volume/yarn
|
||||
RUN yarn build
|
||||
RUN rm -rf /var/wiki/node_modules
|
||||
RUN rm -rf /wiki/node_modules
|
||||
RUN yarn --production
|
||||
|
||||
# ===============
|
||||
# --- Release ---
|
||||
# ===============
|
||||
FROM node:10.14-alpine
|
||||
FROM node:10.15-alpine
|
||||
LABEL maintainer="requarks.io"
|
||||
|
||||
RUN apk update && \
|
||||
apk add bash curl git openssh supervisor --no-cache && \
|
||||
rm -rf /var/cache/apk/* && \
|
||||
mkdir -p /var/wiki && \
|
||||
mkdir -p /wiki && \
|
||||
mkdir -p /logs
|
||||
|
||||
WORKDIR /var/wiki
|
||||
WORKDIR /wiki
|
||||
|
||||
COPY ./dev/build/supervisord.conf /etc/supervisord.conf
|
||||
COPY --from=assets /var/wiki/assets ./assets
|
||||
COPY --from=assets /var/wiki/node_modules ./node_modules
|
||||
COPY --from=assets /wiki/assets ./assets
|
||||
COPY --from=assets /wiki/node_modules ./node_modules
|
||||
COPY ./server ./server
|
||||
COPY --from=assets /var/wiki/server/views ./server/views
|
||||
COPY --from=assets /wiki/server/views ./server/views
|
||||
COPY ./dev/build/config.yml ./config.yml
|
||||
COPY ./dev/docker/wait.sh ./wait.sh
|
||||
COPY ./package.json ./package.json
|
||||
@ -48,4 +48,4 @@ COPY ./LICENSE ./LICENSE
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD ["supervisord", "--nodaemon", "-c", "/etc/supervisord.conf"]
|
||||
CMD ["node", "server"]
|
||||
|
@ -1,23 +0,0 @@
|
||||
[unix_http_server]
|
||||
file=/var/run/supervisor.sock
|
||||
chmod=0700
|
||||
|
||||
[supervisord]
|
||||
logfile=/logs/supervisord.log
|
||||
pidfile=/var/run/supervisord.pid
|
||||
childlogdir=/logs
|
||||
|
||||
[rpcinterface:supervisor]
|
||||
supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface
|
||||
|
||||
[supervisorctl]
|
||||
serverurl=unix:///var/run/supervisor.sock
|
||||
|
||||
[program:wikijs]
|
||||
command = node server
|
||||
autostart=true
|
||||
autorestart=true
|
||||
priority=5
|
||||
directory=/var/wiki
|
||||
stdout_logfile=/logs/wiki-stdout.log
|
||||
stderr_logfile=/logs/wiki-stderr.log
|
@ -155,6 +155,7 @@
|
||||
"serve-favicon": "2.5.0",
|
||||
"sqlite3": "4.0.4",
|
||||
"subscriptions-transport-ws": "0.9.15",
|
||||
"twemoji": "11.2.0",
|
||||
"uslug": "1.0.4",
|
||||
"uuid": "3.3.2",
|
||||
"validate.js": "0.12.0",
|
||||
|
@ -14,6 +14,6 @@ module.exports = {
|
||||
renderer.init($, child.config)
|
||||
}
|
||||
|
||||
return $.html()
|
||||
return $.html('body').replace('<body>', '').replace('</body>', '')
|
||||
}
|
||||
}
|
||||
|
8
server/modules/rendering/html-twemoji/definition.yml
Normal file
8
server/modules/rendering/html-twemoji/definition.yml
Normal file
@ -0,0 +1,8 @@
|
||||
key: htmlTwemoji
|
||||
title: Twemoji
|
||||
description: Apply Twitter Emojis to all Unicode emojis
|
||||
author: requarks.io
|
||||
icon: whatshot
|
||||
enabledDefault: true
|
||||
dependsOn: htmlCore
|
||||
props: {}
|
9
server/modules/rendering/html-twemoji/renderer.js
Normal file
9
server/modules/rendering/html-twemoji/renderer.js
Normal file
@ -0,0 +1,9 @@
|
||||
// ------------------------------------
|
||||
// HTML - Twemoji
|
||||
// ------------------------------------
|
||||
|
||||
module.exports = {
|
||||
init ($, conf) {
|
||||
|
||||
}
|
||||
}
|
@ -1,4 +1,5 @@
|
||||
const mdEmoji = require('markdown-it-emoji')
|
||||
const twemoji = require('twemoji')
|
||||
|
||||
// ------------------------------------
|
||||
// Markdown - Emoji
|
||||
@ -7,5 +8,9 @@ const mdEmoji = require('markdown-it-emoji')
|
||||
module.exports = {
|
||||
init (md, conf) {
|
||||
md.use(mdEmoji)
|
||||
|
||||
md.renderer.rules.emoji = (token, idx) => {
|
||||
return twemoji.parse(token[idx].content)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user