up templating
This commit is contained in:
parent
c17b922673
commit
d9b0606a74
@ -66,8 +66,11 @@ Pandoc, PandocGmi
|
||||
|
||||
# Roadmap
|
||||
|
||||
- TODO config par site web de son nom de domaine
|
||||
- TODO réécriture des liens internes
|
||||
- config par site web de son nom de domaine
|
||||
- réécriture des liens internes
|
||||
- navigation sur les pages d'article
|
||||
- réécriture des url des images vers le dossier courant
|
||||
- réparer la génération de fichiers gmi
|
||||
- template footer article: gestion article suivant et précédent
|
||||
# Fait
|
||||
- gestion des langues dans la source et la destination
|
||||
|
File diff suppressed because it is too large
Load Diff
399
html-websites/dragonfeu_blog/index_dragonfeu_blog.html
Normal file
399
html-websites/dragonfeu_blog/index_dragonfeu_blog.html
Normal file
@ -0,0 +1,399 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>yaya_blog</title>
|
||||
<style type='text/css'>* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
font-size: 1rem;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "Open Sans", "Noto Sans", Times, serif;
|
||||
}
|
||||
|
||||
/* 1. Use a more-intuitive box-sizing model */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 2. Remove default margin */
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
/* 3. Add accessible line-height */
|
||||
line-height: 1.5;
|
||||
/* 4. Improve text rendering */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* 5. Improve media defaults */
|
||||
img, picture, video, canvas, svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 6. Inherit fonts for form controls */
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* 7. Avoid text overflows */
|
||||
p, h1, h2, h3, h4, h5, h6 {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* 8. Improve line wrapping */
|
||||
p {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/*
|
||||
9. Create a root stacking context
|
||||
*/
|
||||
#root, #__next {
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
</style></head>
|
||||
<body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>cil_gometz</title>
|
||||
<style type='text/css'>* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
font-size: 1rem;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "Open Sans", "Noto Sans", Times, serif;
|
||||
}
|
||||
|
||||
/* 1. Use a more-intuitive box-sizing model */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 2. Remove default margin */
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
/* 3. Add accessible line-height */
|
||||
line-height: 1.5;
|
||||
/* 4. Improve text rendering */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* 5. Improve media defaults */
|
||||
img, picture, video, canvas, svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 6. Inherit fonts for form controls */
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* 7. Avoid text overflows */
|
||||
p, h1, h2, h3, h4, h5, h6 {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* 8. Improve line wrapping */
|
||||
p {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/*
|
||||
9. Create a root stacking context
|
||||
*/
|
||||
#root, #__next {
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
</style></head>
|
||||
<body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>qzine_blog</title>
|
||||
<style type='text/css'>* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
font-size: 1rem;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "Open Sans", "Noto Sans", Times, serif;
|
||||
}
|
||||
|
||||
/* 1. Use a more-intuitive box-sizing model */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 2. Remove default margin */
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
/* 3. Add accessible line-height */
|
||||
line-height: 1.5;
|
||||
/* 4. Improve text rendering */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* 5. Improve media defaults */
|
||||
img, picture, video, canvas, svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 6. Inherit fonts for form controls */
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* 7. Avoid text overflows */
|
||||
p, h1, h2, h3, h4, h5, h6 {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* 8. Improve line wrapping */
|
||||
p {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/*
|
||||
9. Create a root stacking context
|
||||
*/
|
||||
#root, #__next {
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
</style></head>
|
||||
<body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>tykayn_blog</title>
|
||||
<style type='text/css'>* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
font-size: 1rem;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "Open Sans", "Noto Sans", Times, serif;
|
||||
}
|
||||
|
||||
/* 1. Use a more-intuitive box-sizing model */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 2. Remove default margin */
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
/* 3. Add accessible line-height */
|
||||
line-height: 1.5;
|
||||
/* 4. Improve text rendering */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* 5. Improve media defaults */
|
||||
img, picture, video, canvas, svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 6. Inherit fonts for form controls */
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* 7. Avoid text overflows */
|
||||
p, h1, h2, h3, h4, h5, h6 {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* 8. Improve line wrapping */
|
||||
p {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/*
|
||||
9. Create a root stacking context
|
||||
*/
|
||||
#root, #__next {
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
</style></head>
|
||||
<body>
|
||||
<!DOCTYPE html>
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>cipherbliss_blog</title>
|
||||
<style type='text/css'>* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: Helvetica, "Ubuntu Sans", "Noto Sans", Arial, sans-serif;
|
||||
text-align: left;
|
||||
margin: 0 auto;
|
||||
font-size: 1rem;
|
||||
max-width: 600px;
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
font-family: "Open Sans", "Noto Sans", Times, serif;
|
||||
}
|
||||
|
||||
/* 1. Use a more-intuitive box-sizing model */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* 2. Remove default margin */
|
||||
* {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
/* 3. Add accessible line-height */
|
||||
line-height: 1.5;
|
||||
/* 4. Improve text rendering */
|
||||
-webkit-font-smoothing: antialiased;
|
||||
}
|
||||
|
||||
/* 5. Improve media defaults */
|
||||
img, picture, video, canvas, svg {
|
||||
display: block;
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* 6. Inherit fonts for form controls */
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
/* 7. Avoid text overflows */
|
||||
p, h1, h2, h3, h4, h5, h6 {
|
||||
overflow-wrap: break-word;
|
||||
}
|
||||
|
||||
/* 8. Improve line wrapping */
|
||||
p {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
text-wrap: balance;
|
||||
}
|
||||
|
||||
/*
|
||||
9. Create a root stacking context
|
||||
*/
|
||||
#root, #__next {
|
||||
isolation: isolate;
|
||||
}
|
||||
|
||||
input, button, textarea, select {
|
||||
font: inherit;
|
||||
}
|
||||
|
||||
</style></head>
|
||||
<body>
|
||||
<html><head><title>Dragonfeu blog</title></head><body> # DragonFeu - Articles
|
||||
- - - - - - - - - - - - - - - - - - - - - - -
|
||||
|
||||
<br><a href=/index.html>index.html</a><br><a href=/2024-11-02-coucou-gemini.html>2024-11-02-coucou-gemini.html</a><br><a href=/2024-09-08-strategie-mitigation-accident-fusion-coeur-epr2.html>2024-09-08-strategie-mitigation-accident-fusion-coeur-epr2.html</a><br><a href=/2024-05-15-l-aventure-superphenix.html>2024-05-15-l-aventure-superphenix.html</a><br><a href=/2023-06-10-recap-centrale-zaporijia.html>2023-06-10-recap-centrale-zaporijia.html</a><br><a href=/2023-06-09-recapitulatif-contenu-threads.html>2023-06-09-recapitulatif-contenu-threads.html</a><br><a href=/2024-11-02-coucou-gemini.html>2024-11-02-coucou-gemini.html</a></article></body></html>
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
||||
</body>
|
||||
</html>
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,31 @@
|
||||
import argparse
|
||||
from website_config import configs_sites
|
||||
|
||||
def assemble_article_template(article_file, template_file, output_file):
|
||||
# Ouvrir le fichier de template en mode lecture
|
||||
with open(template_file, "r") as f:
|
||||
template = f.read()
|
||||
|
||||
# Ouvrir le fichier d'article en mode lecture
|
||||
with open(article_file, "r") as f:
|
||||
article = f.read()
|
||||
|
||||
# Remplacer $$ARTICLE$$ dans le template par le contenu de l'article
|
||||
html = template.replace("$$ARTICLE$$", article)
|
||||
|
||||
# Écrire le contenu HTML dans le fichier de sortie
|
||||
with open(output_file, "w") as f:
|
||||
f.write(html)
|
||||
|
||||
if __name__ == "__main__":
|
||||
# Définir les arguments de la ligne de commande
|
||||
parser = argparse.ArgumentParser(description="Assembler un article et un template pour créer un fichier HTML.")
|
||||
parser.add_argument("article_file", help="Le fichier d'article à inclure dans le template.")
|
||||
parser.add_argument("template_file", help="Le fichier de template à utiliser.")
|
||||
parser.add_argument("output_file", help="Le fichier de sortie HTML.")
|
||||
|
||||
# Récupérer les arguments de la ligne de commande
|
||||
args = parser.parse_args()
|
||||
|
||||
# Assembler l'article et le template
|
||||
assemble_article_template(args.article_file, args.template_file, args.output_file)
|
Loading…
Reference in New Issue
Block a user