feat: ajout de la compilation des textes au format pdf/epub

A l'aide de l'outil crowbook, ajouté d'un moyen de télécharger les 
textes
This commit is contained in:
Kazhnuz 2020-05-16 19:46:16 +02:00
parent b0864810a4
commit 7660cdbcbf
9 changed files with 57 additions and 16 deletions

View file

@ -13,3 +13,7 @@ cd ../../
echo "STEP 4 - Generation de l'espace littéraire"
cd src/textes
hexo generate
echo "STEP 5 - Générations des livres à télécharger"
cd ../crowbook
source generate-text.sh

17
src/crowbook/common.book Normal file
View file

@ -0,0 +1,17 @@
author: Kazhnuz
lang: fr
epub.version: 3
tex.template.add: '
\makeatletter
\@ifclassloaded{book}
{\usepackage{quotchap}}
{}
\makeatother
'
tex.links_as_footnotes: false
proofread.languagetool: true
proofread.grammalecte: true

View file

@ -0,0 +1,9 @@
mkdir ../../dist/download
crowbook -s "../textes/source/_posts/contes/lenfant-et-le-dragon.md"
crowbook -s "../textes/source/_posts/contes/elegie-commencement.md"
crowbook -s "../textes/source/_posts/contes/remedes-mathematicien.md"
crowbook -s "../textes/source/_posts/contes/lenfant-qui-marcha.md"
#crowbook -s "src/textes/source/_posts/nouvelles/zoomorphes.md"
#crowbook -s "src/textes/source/_posts/nouvelles/prisonnier.md"

View file

@ -31,6 +31,11 @@
}
}
strong.btn-fake {
@include button($button_large);
@include button-fullcontrol(transparent, transparent, rgba(0,0,0,1));
}
a.article-nav-link-wrap {
@include button($button_large);
padding-left: $button_large;

View file

@ -1,7 +1,7 @@
---
import: ../../../../crowbook/common.book
title: L'enfant qui marcha
date: '2017/10/02 09:45:00'
title: "L'élégie du commencement"
date: '2017/07/06 10:23:00'
lang: fr
version: 0.1.0
license: CC-BY-SA 4.0
@ -10,8 +10,8 @@ output:
- pdf
- epub
- proofread.html
output.pdf: ../../../../dist/contes/elegie-commencement/index.pdf
output.epub: ../../../../dist/contes/elegie-commencement/index.epub
output.pdf: ../../../../../dist/download/elegie-commencement.pdf
output.epub: ../../../../../dist/download/elegie-commencement.epub
download: elegie-commencement
categories:
- Contes

View file

@ -1,17 +1,17 @@
---
import: ../../../../crowbook/common.book
title: L'enfant et le dragon
title: "L'enfant et le dragon"
lang: fr
version: 0.1.0
license: CC-BY-SA 4.0
date: '2017/10/02 09:45:00'
date: '2018/06/12 23:38:00'
proofread.grammalecte: true
output:
- pdf
- epub
- proofread.html
output.pdf: ../../../../dist/dl/lenfant-et-le-dragon.pdf
output.epub: ../../../../dist/dl/lenfant-et-le-dragon.epub
output.pdf: ../../../../../dist/download/lenfant-et-le-dragon.pdf
output.epub: ../../../../../dist/download/lenfant-et-le-dragon.epub
download: lenfant-et-le-dragon
categories:
- Contes

View file

@ -1,7 +1,7 @@
---
import: ../../../../crowbook/common.book
title: L'enfant qui marcha
date: '2017/10/02 09:45:00'
title: "L'enfant qui marcha"
date: '2017/07/06 10:13:00'
lang: fr
version: 0.1.0
license: CC-BY-SA 4.0
@ -10,8 +10,8 @@ output:
- pdf
- epub
- proofread.html
output.pdf: ../../../../dist/contes/lenfant-qui-marcha/index.pdf
output.epub: ../../../../dist/contes/lenfant-qui-marcha/index.epub
output.pdf: ../../../../../dist/download/lenfant-qui-marcha.pdf
output.epub: ../../../../../dist/download/lenfant-qui-marcha.epub
download: lenfant-qui-marcha
categories:
- Contes

View file

@ -1,7 +1,7 @@
---
import: ../../../../crowbook/common.book
title: Les remèdes du mathématicien
date: '2017/10/02 09:45:00'
title: "Les remèdes du mathématicien"
date: '2016/12/16 17:23:00'
lang: fr
version: 0.1.0
license: CC-BY-SA 4.0
@ -10,8 +10,8 @@ output:
- pdf
- epub
- proofread.html
output.pdf: ../../../../dist/contes/remedes-mathematicien/index.pdf
output.epub: ../../../../dist/contes/remedes-mathematicien/index.epub
output.pdf: ../../../../../dist/download/remedes-mathematicien.pdf
output.epub: ../../../../../dist/download/remedes-mathematicien.epub
download: remedes-mathematicien
categories:
- Contes

View file

@ -36,6 +36,12 @@
<%- partial('post/category') %>
</section>
<div>
<strong class="btn btn-fake">Télécharger : </strong>
<a href="/download/<%- post.download %>.pdf" class="btn btn-primary">.PDF</a>
<a href="/download/<%- post.download %>.epub" class="btn btn-info">.EPUB</a>
</div>
<footer class="article-footer">
<% if (post.comments && config.disqus_shortname){ %>
<a href="<%- post.permalink %>#disqus_thread" class="article-comment-link"><%= __('comment') %></a>