Skip to content

Commit 3c83b3b

Browse files
Copilotjtemporal
andcommitted
Migrate English card 016 to Mermaid format
- Converted card from image-based to Mermaid diagram format - Generated SVG file (016-en.svg) - Added use_static_image flag - Updated config_manager.py to support puppeteer with system chromium - Card now renders with clean Mermaid diagram Co-authored-by: jtemporal <6595551+jtemporal@users.noreply.github.com>
1 parent bcf7142 commit 3c83b3b

File tree

3 files changed

+65
-21
lines changed

3 files changed

+65
-21
lines changed

assets/img/mermaid/016-en.svg

Lines changed: 47 additions & 0 deletions
Loading

en/_posts/2021-09-01-016.md

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,17 @@
11
---
22
layout: post
3-
title: '#016 What is a fork?'
4-
image: "https://res.cloudinary.com/jesstemporal/image/upload/f_auto/v1642878596/gitfichas/en/016/thumbnail_owrn3h.jpg"
3+
pretitle: What is a
4+
title: fork?
5+
subtitle:
6+
concept: true
7+
parts:
8+
- part1: it's nothing more than a\ncopy of a repository
9+
- part2: this copy maintains a link to\nthe original repository
10+
- part3: usually used to\npropose code changes
11+
number: "016"
12+
author: "@jtemporal"
13+
mermaid: true
14+
use_static_image: true
515
permalink: "/en/016"
616
translations:
717
- lang: pt
@@ -17,21 +27,4 @@ nt:
1727
title: "#017 What is a clone?"
1828
---
1929

20-
<img alt="A fork is a copy of the project that keeps a link to its original project. It’s usually used to propose code changes" src="https://res.cloudinary.com/jesstemporal/image/upload/v1642878596/gitfichas/en/016/full_ctyuza.jpg"><br><br>
21-
22-
| Command | Description |
23-
|---------|-------------|
24-
| _fork_ | It’s nothing more than a copy of a repository |
25-
| _original repository_ | This copy maintains a link to the original repository |
26-
| _why it is useful?_ | Usually used to propose code changes |
27-
{: .styled-table}
28-
29-
30-
<!--
31-
<br>
32-
You might also be interested in reading this article:
33-
34-
<a href="https://jtemporal.com/5-dicas-para-fazer-o-seu-pull-request-brilhar/">
35-
<strong>5 Dicas Para Fazer o Seu Pull Request Brilhar ✨</strong>
36-
</a>
37-
-->
30+
{% include mermaid-graphs.html %}

scripts/config_manager.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@ def _setup_paths(self):
3939

4040
# Theme configuration
4141
self.theme_path = self.root_dir / 'gitfichas-mermaid-theme.json'
42+
43+
# Puppeteer configuration
44+
self.puppeteer_config_path = Path('/tmp/puppeteer-config.json')
4245

4346
def _setup_directories(self):
4447
"""Create required directories if they don't exist."""
@@ -101,7 +104,8 @@ def get_mermaid_cli_command(self, temp_file: Path, output_path: Path) -> list:
101104
'--height', '675',
102105
'-e', 'svg',
103106
'--configFile', str(self.theme_path),
104-
'--cssFile', str(self.combined_css_path)
107+
'--cssFile', str(self.combined_css_path),
108+
'-p', str(self.puppeteer_config_path)
105109
]
106110

107111
def get_image_path(self, front_matter: Dict[str, Any], file_path: Path) -> Path:

0 commit comments

Comments
 (0)