Attention ! Gitlab fournissant maintenant nativement des certificats Let’s Encrypt aux domaines personnalisés des Gitlab Pages, nous avons coupé notre service qui le faisait automatiquement pour vous.

Il est impératif, pour que votre domaine personnalisé continue à avoir un certificat Let’s Encrypt à jour, d’activer la fonctionnalité native dans les paramètres de votre projet. Cette activation remplacera votre certificat actuel par un nouveau certificat Let’s Encrypt géré par Gitlab.

Voir les détails sur https://docs.framasoft.org/fr/gitlab/gitlab-pages-le.html

Commit ca5dc33f authored by ALO's avatar ALO

Fix issue #1

dirname command is useless when using source to get project code.
Instead, create 2 scripts
parent cfbbab5a
......@@ -18,10 +18,11 @@ sudo gem install gimli
### Configuration
You need to source markdown-utils.sh in your `~/.bash_aliases` :
You can add aliases to the scripts in your ~/.bash_aliases:
```bash
source <path to markdown-utils>/markdown-utils.sh
alias mdtest='<path to markdown-utils>/mdtest.sh'
alias md2pdf='<path to markdown-utils>/md2pdf.sh'
```
### Convert a file
......
#! /bin/bash
# markdown-utils.sh
# utilities to convert markdown files
SCRIPT_PATH=$(dirname $0)
function md2pdf() {
USAGE="usage: $0 mdFilePath [outDirectory]"
[[ -z ${1} ]] && echo ${USAGE} >&2 && exit 1
MD_FILE=${1}
OUT_DIR_OPTION=""
[[ -n ${2} ]] && OUT_DIR_OPTION="-o ${2}"
gimli -f ${MD_FILE} -s ${SCRIPT_PATH}/style.css -w '-t ' ${OUT_DIR_OPTION}
}
function mdtest() {
USAGE="usage: $0 mdFilePath"
[[ -z ${1} ]] && echo ${USAGE} >&2 && exit 1
MD_FILE=${1}
OUT_DIR=$(mktemp -d)
OUT_FILENAME=${MD_FILE/%.md/.pdf}
md2pdf ${MD_FILE} ${OUT_DIR}
evince ${OUT_DIR}/${OUT_FILENAME}
# Clean temp files
rm ${OUT_DIR}/${OUT_FILENAME}
rmdir ${OUT_DIR}
}
#! /bin/bash
# md2pdf.sh
# Convert Markdown file to PDF
MARKDOWN_PROJECT_PATH=$(dirname $0)
USAGE="usage: $0 mdFilePath [outDirectory]"
[[ -z ${1} ]] && echo ${USAGE} >&2 && exit 1
MD_FILE=${1}
OUT_DIR_OPTION=""
[[ -n ${2} ]] && OUT_DIR_OPTION="-o ${2}"
gimli -f ${MD_FILE} -s ${MARKDOWN_PROJECT_PATH}/style.css -w '-t ' ${OUT_DIR_OPTION}
exit 0
#! /bin/bash
# mdtest.sh
# Convert Markdown file to PDF and remove it immediately after
MARKDOWN_PROJECT_PATH=$(dirname $0)
USAGE="usage: $0 mdFilePath"
[[ -z ${1} ]] && echo ${USAGE} >&2 && exit 1
MD_FILE=${1}
OUT_DIR=$(mktemp -d)
OUT_FILENAME=${MD_FILE/%.md/.pdf}
${MARKDOWN_PROJECT_PATH}/md2pdf.sh ${MD_FILE} ${OUT_DIR}
evince ${OUT_DIR}/${OUT_FILENAME}
# Clean temp files
rm ${OUT_DIR}/${OUT_FILENAME}
rmdir ${OUT_DIR}
exit 0
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