Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 64ac26c8 authored by Hugues's avatar Hugues
Browse files

WIP

parent e6cfaf0d
No related branches found
No related tags found
1 merge request!29Draft: Resolve "create blog page"
Pipeline #2263 passed
Showing
with 13 additions and 908 deletions
---
title: NewBlog
slug: newBlog
cover: ./gatsby-cover.png
---
# Lorem Ipsum
......@@ -4,12 +4,12 @@ slug: invisible-post
date: 2020-01-01
# optional fields
published: false
unlisted: true
published: true
unlisted: false
generate-card: false
language: fr
cover: ./cover.jpeg
imageShare: ./cover.jpeg
tags: ['fake']
translations:
- link: 'https://www.maxpou.fr/about'
......@@ -18,4 +18,6 @@ translations:
---
This exists to populate GraphQL fields and avoid null errors. It should contain
all of the available frontmatter.
\ No newline at end of file
all of the available frontmatter.
link: 'http://lydra.test/category/podcast/feed'
content/posts/2017-01-01-bold-mage/cover.jpg

81.7 KiB

---
title: Bold Mage (fake post)
slug: bold-mage
date: 2017-01-01
cover: ./cover.jpg
generate-card: false
language: en
tags:
- programming
- stuff
- fake
---
## Sedisti civiliter
Lorem **markdownum** Ixione palus **semper peritura barbaque** in aureus
obliquum erigitur gemmae utque cur natus, aera supplice de nudae. Manus
ambrosiam tendens, saecula tenet, conponere et ense et cucurri. Tantique
animalia praeceps Meleagre greges venisse corpore et ignara, umquam ipse? Quam
*Talibus ausis*.
## Vultusque subsequitur Pallas regis datis inde animaque
At securim cautum capitis, creatos sanguinis turbant iam concita videor, edere.
Alis genas rudis felix quas **longum** suorum manu ante prima **usque**. Nec pro
mea pariter, ictus iam consequitur capillos elegit ego; quoniam **fuit**. Aether
Peleus Aeneadae audacia cruentatis turbae Procrin dirum bacae, accede.
```rust
fn main() {
let strings = vec!["tofu", "93", "18"];
let numbers: Vec<_> = strings
.into_iter()
.map(|s| s.parse::<i32>())
.filter_map(Result::ok)
.collect();
println!("Results: {:?}", numbers);
}
```
## Fortis dextrae humo limina Tempus singultibus illa
Nate muros orbe [patris](http://debebuntilla.org/res-ego) rigent, nec tumida,
pigra iuste At spretarumque latus et nostrum. Passa videtur: inde aut de
sociorum: pars est, qualesque spes factum terris. Custodia sum animumque; iubet
in pulvere carus, relinquunt incitat. Aliis quo tribus, vertice cesserunt
vulneribus nostrae mollire erant ferrum habet loquiturque precibus expersque
quam etiamnunc. Puraque [repetitque](http://mihi-aiax.io/suaferunt.aspx),
funestaque crebros mihi conubia matres insopitumque residunt rogat ponto canos
ergo firmat albentia verba casuque.
```jsx
const Hero = props => {
const { siteCover } = useSiteMetadata()
const { fluid } = useSiteImages(siteCover)
const heroImg = props.heroImg || fluid.src
return (
<HeroContainer style={{ backgroundImage: `url("${heroImg}")` }}>
<TitleContainer>
<HeroTitle>{props.title}</HeroTitle>
{props.subTitle && <HeroSubTitle>{props.subTitle}</HeroSubTitle>}
</TitleContainer>
</HeroContainer>
)
}
export default Hero
```
## Nati expugnacior nympha milia nascuntur amico
Multis timidus hic si auctor hausit. Suos taedasque, malis est nitente sceleri
sunt florem.
Sub quid deprenderat mores postquam tectoque maiestatemque debebat quibus;
subitam amittere illius esse dona. Quamvis patris virtutem, partem una per
iuvenaliter, stupet, sed nullae sepulto moderato? Nec phaedimus aequoris dixit.
Hic bis parenti: e petunt satis.
\ No newline at end of file
content/posts/2017-01-02-the-fallen-time/cover.jpg

102 KiB

---
title: "The Fallen Time (fake post)"
slug: the-fallen-time
cover: ./cover.jpg
generate-card: false
date: 2017-01-02
language: en
tags:
- test
- something
- fake
---
## Hoc domum solitos veteremque nostrum
Lorem markdownum huc suo ara, dubites celeri mihi bicolor. Secuti non? Suo opus
quales dant, puppim hanc!
```js
const ThemeContext = React.createContext('light');
class ThemeProvider extends React.Component {
state = {theme: 'light'};
render() {
return (
<ThemeContext.Provider value={this.state.theme}>
{this.props.children}
</ThemeContext.Provider>
);
}
}
class ThemedButton extends React.Component {
render() {
return (
<ThemeContext.Consumer>
{theme => <Button theme={theme} />}
</ThemeContext.Consumer>
);
}
}
```
## In nunc
Superinposita dira me Iove, lanigeris tendunt! Illis gladii, in pignusque dixit
trisulcis latices. Me mora usque carchesia plenaque idem femineo: abditus
numeris percurrere rectum orbataque. Lucibus nocuisse et nova attactu et secura,
enim poterentur.
Infelix ait eadem. Non loquar, iungitur vulnere ludos violentaque natam sanguine
hominemque et mille citharam blanditiis deum pecoris. Vibrabant et crimina
iterum: et nisi victa quietis litore? Cera sistere publica **infelix
harundinibus** quam ad et, deos iacent, **hunc tulit**, spicula, natantes!
Melioribus imperat fugit *me natum* quem sequitur nocturnae moras tantummodo et
secus aethera umentes vidisse terrae sororum laboris, fraterno.
## Perpetiar lacrimas Non dare
Tibi ducit incursu nomina terrae, feratur satis Telethusa corpore Eurynome in
semina adiecit! Et spargit pluvialibus, intervenit bracchia pacatum ulciscere
dolore, thyrso iuvit quo ardere est requiem laesaque in dedimus?
## Est in sit suos fessa
Est illo Osiris aevo, et **dextrae** quoque et, illa. Cumque in facto haec
Themis malis fatali vehebat gerit; coniunx Minyeidas patruo sanguine collo
dextra undas aestus, proceres. Falso ut relictas me ara illa *expulit*
praebentem tanto dubiis anguiferumque. Fata vidit [suam caede
mirere](http://nare.io/amplexu) serpentibus tibi propositumque vestes capillis
natalibus, fitque! Verba Siphnon, arcanaque vicina, Cycnum mox suos coniunx
ebrius.
```java
// code in java
if (hsf(-3) > artMetalMeme.yottabytePrimary(circuit, 1)) {
saas.backbone += netmaskUtf;
} else {
engineNybble.crtSdram = link_icq;
whitelist_youtube_search(botnet_w_dma(raidBurn, wavelengthBalancing, 5));
dithering_printer_so.file(toggle_right);
}
modifierDaemonOpen *= video(touchscreen_speed(692730), sound_lion_finder,
nanometer_variable + of(ldap, recursion_pop_zebibyte, c));
if (popCrossplatformVdsl) {
thunderboltMnemonic -= 2 - lte(648733);
ddr_spoofing *= metal_commercial + http;
} else {
leafPowerBar = spoolPower;
file_itunes += dataLifo;
}
binary *= 2;
```
Unumque extemplo melius in unda claudit artem clausum quos amare; damnum formae,
fragor erubuere Vesta; pietas. Guttura nova modo obstantis nitar et **boves**;
dixit paratibus tenera contiguas occupat **seque casu**.
\ No newline at end of file
content/posts/2017-01-03-code-highlighting-post/cover.png

269 KiB

---
title: "Syntax Highlighting Post"
slug: code-highlighting-post
cover: ./cover.png
generate-card: false
date: 2017-01-03
language: en
tags:
- gatsby
---
## Vue.js
Vue (pronounced /vjuː/, like **view**) is a **progressive framework** for building user interfaces. Unlike other monolithic frameworks, Vue is designed from the ground up to be incrementally adoptable. The core library is focused on the view layer only, and is easy to pick up and integrate with other libraries or existing projects. On the other hand, Vue is also perfectly capable of powering sophisticated Single-Page Applications when used in combination with [modern tooling](single-file-components.html) and [supporting libraries](https://github.com/vuejs/awesome-vue#components--libraries).
```html
<template>
<div id="app">
<router-view></router-view>
</div>
</template>
<script>
export default {
created () {
this.$store.dispatch('loadLoggedInUser')
}
}
</script>
<style scoped>
#app {
text-align: center;
height: 100%;
}
</style>
```
## JavaScript, JSX and highlighted lines
```js{7}
class ShoppingList extends React.Component {
render() {
const { user } = this.props
return (
<div className="shopping-list">
<h1>Shopping List for {user}</h1>
<ul>
<li>Gatsby</li>
<li>React</li>
<li>GraphQL</li>
</ul>
</div>
);
}
}
```
To highlight a line: ` ```js{lineNumber}`.
## TypeScript
```typescript
class Greeter {
greeting: string;
constructor(message: string) {
this.greeting = message;
}
greet() {
return "Hello, " + this.greeting;
}
}
let greeter = new Greeter("world");
```
## SCSS
```scss
@import 'reset';
body {
font: 100% Helvetica, sans-serif;
background-color: #efefef;
}
%message-shared {
border: 1px solid #ccc;
padding: 10px;
color: #333;
}
.message {
@extend %message-shared;
}
```
\ No newline at end of file
content/posts/2018-01-02-post-en-francais/cover.jpg

35.3 KiB

---
title: "Le Corbeau et le Renard (fake French post)"
slug: post-en-francais
cover: ./cover.jpg
generate-card: false
date: 2018-01-02
language: fr
tags:
- cheese
- baguette
- cliche
- fake
---
Maître Corbeau, sur un arbre perché,
Tenait en son bec un fromage.
Maître Renard, par l’odeur alléché,
Lui tint à peu près ce langage :
« Hé ! bonjour, Monsieur du Corbeau.
Que vous êtes joli ! Que vous me semblez beau !
Sans mentir, si votre ramage
Se rapporte à votre plumage,
Vous êtes le Phénix des hôtes de ces bois. »
A ces mots le Corbeau ne se sent pas de joie ;
Et pour montrer sa belle voix,
Il ouvre un large bec, laisse tomber sa proie.
Le Renard s’en saisit, et dit : « Mon bon Monsieur,
Apprenez que tout flatteur
Vit aux dépens de celui qui l’écoute :
Cette leçon vaut bien un fromage, sans doute. »
Le Corbeau, honteux et confus,
Jura, mais un peu tard, qu’on ne l’y prendrait plus.
\ No newline at end of file
---
title: "Big Test"
slug: big-test
date: 2018-01-03
language: en
generate-card: false
tags:
- test
- huge
- no-cover
- fake
---
NOTE: This "post" is based on [Markdown Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet) and is meant to test styling of Markdown generated documents.
This is intended as a quick reference and showcase. For more complete info, see [John Gruber's original spec](http://daringfireball.net/projects/markdown/) and the [Github-flavored Markdown info page](http://github.github.com/github-flavored-markdown/).
This cheatsheet is specifically *Markdown Here's* version of Github-flavored Markdown. This differs slightly in styling and syntax from what Github uses, so what you see below might vary a little from what you get in a *Markdown Here* email, but it should be pretty close.
You can play around with Markdown on our [live demo page](http://www.markdown-here.com/livedemo.html).
(If you're not a Markdown Here user, check out the [Markdown Cheatsheet](./Markdown-Cheatsheet) that is not specific to MDH. But, really, you should also use Markdown Here, because it's awesome. http://markdown-here.com)
##### Table of Contents
- [H1](#H1)
- [H2](#H2)
- [H3](#H3)
- [H4](#H4)
- [H5](#H5)
- [H6](#H6)
- [Alt-H1](#Alt-H1)
- [Alt-H2](#Alt-H2)
- [Emphasis](#Emphasis)
- [Lists](#Lists)
- [Links](#Links)
- [Images](#Images)
- [Code and Syntax Highlighting](#Code-and-Syntax-Highlighting)
- [Tables](#Tables)
- [Blockquotes](#Blockquotes)
- [Inline HTML](#Inline-HTML)
- [Horizontal Rule](#Horizontal-Rule)
- [Line Breaks](#Line-Breaks)
- [YouTube Videos](#YouTube-Videos)
## Headers
```no-highlight
# H1
## H2
### H3
#### H4
##### H5
###### H6
Alternatively, for H1 and H2, an underline-ish style:
Alt-H1
======
Alt-H2
------
```
# H1
## H2
### H3
#### H4
##### H5
###### H6
Alternatively, for H1 and H2, an underline-ish style:
Alt-H1
======
Alt-H2
------
<a name="emphasis"/>
## Emphasis
```no-highlight
Emphasis, aka italics, with *asterisks* or _underscores_.
Strong emphasis, aka bold, with **asterisks** or __underscores__.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough uses two tildes. ~~Scratch this.~~
```
Emphasis, aka italics, with *asterisks* or _underscores_.
Strong emphasis, aka bold, with **asterisks** or __underscores__.
Combined emphasis with **asterisks and _underscores_**.
Strikethrough uses two tildes. ~~Scratch this.~~
<a name="lists"/>
## Lists
```no-highlight
1. First ordered list item
2. Another item
* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list
4. And another item.
Some text that should be aligned with the above item.
* Unordered list can use asterisks
- Or minuses
+ Or pluses
```
1. First ordered list item
2. Another item
* Unordered sub-list.
1. Actual numbers don't matter, just that it's a number
1. Ordered sub-list
4. And another item.
Some text that should be aligned with the above item.
* Unordered list can use asterisks
- Or minuses
+ Or pluses
<a name="links"/>
## Links
There are two ways to create links.
```no-highlight
[I'm an inline-style link](https://www.google.com)
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself]
URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or <http://www.example.com> and sometimes
example.com (but not on Github, for example).
Some text to show that the reference links can follow later.
[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com
```
[I'm an inline-style link](https://www.google.com)
[I'm a reference-style link][Arbitrary case-insensitive reference text]
[You can use numbers for reference-style link definitions][1]
Or leave it empty and use the [link text itself]
URLs and URLs in angle brackets will automatically get turned into links.
http://www.example.com or <http://www.example.com> and sometimes
example.com (but not on Github, for example).
Some text to show that the reference links can follow later.
[arbitrary case-insensitive reference text]: https://www.mozilla.org
[1]: http://slashdot.org
[link text itself]: http://www.reddit.com
<a name="images"/>
## Images
```no-highlight
Here's our logo (hover to see the title text):
Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
Reference-style:
![alt text][logo]
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
```
Here's our logo (hover to see the title text):
Inline-style:
![alt text](https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 1")
Reference-style:
![alt text][logo]
[logo]: https://github.com/adam-p/markdown-here/raw/master/src/common/images/icon48.png "Logo Title Text 2"
<a name="code"/>
## Code and Syntax Highlighting
Code blocks are part of the Markdown spec, but syntax highlighting isn't. However, many renderers -- like Github's and *Markdown Here* -- support syntax highlighting. *Markdown Here* supports highlighting for dozens of languages (and not-really-languages, like diffs and HTTP headers); to see the complete list, and how to write the language names, see the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html).
```no-highlight
Inline `code` has `back-ticks around` it.
```
Inline `code` has `back-ticks around` it.
Blocks of code are either fenced by lines with three back-ticks <code>```</code>, or are indented with four spaces. I recommend only using the fenced code blocks -- they're easier and only they support syntax highlighting.
<pre lang="no-highlight"><code>
```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```
```python
s = "Python syntax highlighting"
print s
```
```
No language indicated, so no syntax highlighting.
But let's throw in a &lt;b&gt;tag&lt;/b&gt;.
```
</code></pre>
```javascript
var s = "JavaScript syntax highlighting";
alert(s);
```
```python
s = "Python syntax highlighting"
print s
```
```
No language indicated, so no syntax highlighting in Markdown Here (varies on Github).
But let's throw in a <b>tag</b>.
```
Again, to see what languages are available for highlighting, and how to write those language names, see the [highlight.js demo page](http://softwaremaniacs.org/media/soft/highlight/test.html).
<a name="tables"/>
## Tables
Tables aren't part of the core Markdown spec, but they are part of GFM and *Markdown Here* supports them. They are an easy way of adding tables to your email -- a task that would otherwise require copy-pasting from another application.
```no-highlight
Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
```
Colons can be used to align columns.
| Tables | Are | Cool |
| ------------- |:-------------:| -----:|
| col 3 is | right-aligned | $1600 |
| col 2 is | centered | $12 |
| zebra stripes | are neat | $1 |
The outer pipes (|) are optional, and you don't need to make the raw Markdown line up prettily. You can also use inline Markdown.
Markdown | Less | Pretty
--- | --- | ---
*Still* | `renders` | **nicely**
1 | 2 | 3
<a name="blockquotes"/>
## Blockquotes
```no-highlight
> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.
Quote break.
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put **Markdown** into a blockquote.
```
> Blockquotes are very handy in email to emulate reply text.
> This line is part of the same quote.
Quote break.
> This is a very long line that will still be quoted properly when it wraps. Oh boy let's keep writing to make sure this is long enough to actually wrap for everyone. Oh, you can put **Markdown** into a blockquote.
<a name="html"/>
## Inline HTML
You can also use raw HTML in your Markdown, and it'll mostly work pretty well.
```no-highlight
<dl>
<dt>Definition list</dt>
<dd>Is something people use sometimes.</dd>
<dt>Markdown in HTML</dt>
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>
```
<dl>
<dt>Definition list</dt>
<dd>Is something people use sometimes.</dd>
<dt>Markdown in HTML</dt>
<dd>Does *not* work **very** well. Use HTML <em>tags</em>.</dd>
</dl>
<a name="hr"/>
## Horizontal Rule
```
Three or more...
---
Hyphens
***
Asterisks
___
Underscores
```
Three or more...
---
Hyphens
***
Asterisks
___
Underscores
<a name="lines"/>
## Line Breaks
My basic recommendation for learning how line breaks work is to experiment and discover -- hit &lt;Enter&gt; once (i.e., insert one newline), then hit it twice (i.e., insert two newlines), see what happens. You'll soon learn to get what you want. "Markdown Toggle" is your friend.
Here are some things to try out:
```
Here's a line for us to start with.
This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
This line is also a separate paragraph, but...
This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
```
Here's a line for us to start with.
This line is separated from the one above by two newlines, so it will be a *separate paragraph*.
This line is also begins a separate paragraph, but...
This line is only separated by a single newline, so it's a separate line in the *same paragraph*.
(Technical note: *Markdown Here* uses GFM line breaks, so there's no need to use MD's two-space line breaks.)
<a name="videos"/>
## YouTube Videos
They can't be added directly but you can add an image with a link to the video like this:
```no-highlight
<a href="http://www.youtube.com/watch?feature=player_embedded&v=8AkLfYOgIrE
" target="_blank"><img src="http://img.youtube.com/vi/8AkLfYOgIrE/0.jpg"
alt="IMAGE ALT TEXT HERE" width="240" height="180" border="10" /></a>
```
Or, in pure Markdown, but losing the image sizing and border:
```no-highlight
[![IMAGE ALT TEXT HERE](http://img.youtube.com/vi/YOUTUBE_VIDEO_ID_HERE/0.jpg)](http://www.youtube.com/watch?v=YOUTUBE_VIDEO_ID_HERE)
```
content/posts/2018-09-29-a-post-with-images/cover.jpg

123 KiB

content/posts/2018-09-29-a-post-with-images/git-push-force.gif

1.99 MiB

---
title: A post with images
slug: a-post-with-images
cover: ./cover.jpg
generate-card: false
date: 2018-09-29
language: en
tags:
- gatsby
---
## How it works?
1. copy/paste the image in the post folder
2. `![put image description here](./git-push-force.gif)`
![a funny gif](./git-push-force.gif)
content/posts/2018-11-13-social-media-card-generator/cover-balloons.jpg

127 KiB

---
title: "How to generate social share images"
slug: social-media-card-generator
date: 2018-11-13
language: en
cover: ./cover-balloons.jpg
imageShare: ./social-media-card-generator-share.png
tags:
- gatsby
---
It's now posible to generate preview images for social networks ([Twitter](https://cards-dev.twitter.com/validator), Slack, LinkedIn...).
![twitter card](./twitter-card.png)
This great idea come from a [conversation](https://twitter.com/_maxpou/status/1054106299213012992) I had with Luciano Mammino (aka [@Loige](https://twitter.com/loige)). I basically took 85% of his code. Thanks Luciano 😊
**How to do it?**
1. Open 2 terminals:
```bash
# Terminal 1
npm run dev
# Terminal 2
npm run generatePostPreviewImages
# ..you can also specify the url (if different from http://localhost:8000/)
npm run generatePostPreviewImages http://localhost:1234/
```
2. In the post's header, add the generated images:
```yaml
title: My blog post
# ...
imageShare: ./social-media-card-generator-share.png
```
Gatsby will first create extra url suffixed by `/image_share` (i.e. *http://localhost:8000/gatsby-starter-morning-dew-v1-1/image_share*). Then, Pupetter will take a snapshot and add it to your `post` folder.
**💡Quick tip:** If you want to recreate this pictures
```bash
# delete all share images
find ./content -name "*-share.png" -type f -delete
```
If you want to skip the file generation for some posts, add `generate-card: false` to the post's header.
```yaml
---
title: My blog post
# ...
generate-card: false
---
```
content/posts/2018-11-13-social-media-card-generator/twitter-card.png

257 KiB

---
title: Utiliser MDX
slug: using-mdx-fr
date: 2019-07-10
language: fr
unlisted: true
generate-card: false
tags: ['gatsby', 'translation']
translations:
- link: '/using-mdx'
language: English
hreflang: en
---
## Salut les gens!
Grace a à MDX, il est maintenant possible d'ajouter du JSX dans du Markdown! Juste en dessous, un example de JSX intégré dans du Markdown <br />
> MDX est un format autorisable qui vous permet d'écrire en toute transparence JSX dans vos documents Markdown. Vous pouvez importer des composants, tels que des graphiques interactifs ou des alertes, et les intégrer dans votre contenu. Cela rend l'écriture de contenu longue forme avec des composants un souffle 🚀.
**Example:**
<div style={{ padding: '20px', backgroundColor: 'tomato' }}>
<h3>Voila du JSX dans du Markdown</h3>
{console.log('Salut MDX')}
</div>
Code:
```jsx
<div style={{ padding: '20px', backgroundColor: 'tomato' }}>
<h3>Voila du JSX dans du Markdown</h3>
{console.log('Salut MDX')}
</div>
```
## How-to?
```jsx{5}
import MySuperComponent from '../path/to/MySuperComponent'
# Du text en Markdown
<MySuperComponent />
Un autre texte en markdown
```
## Read more
👉 https://mdxjs.com
\ No newline at end of file
---
title: Using MDX
slug: using-mdx
date: 2019-07-10
language: en
generate-card: false
tags: ['gatsby', 'translation']
translations:
- link: '/using-mdx-fr'
language: French
hreflang: fr
---
## Hello, world!
Thanks to MDX, It is now possible to add JSX in Markdown! Below is an example of JSX embedded in Markdown. <br />
> MDX is an authorable format that lets you seamlessly write JSX in your Markdown documents. You can import components, such as interactive charts or alerts, and embed them within your content. This makes writing long-form content with components a blast 🚀.
**Example:**
<div style={{ padding: '20px', backgroundColor: 'tomato' }}>
<h3>This is JSX in Markdown</h3>
{console.log('hello MDX')}
</div>
Code:
```jsx
<div style={{ padding: '20px', backgroundColor: 'tomato' }}>
<h3>This is JSX in Markdown</h3>
{console.log('hello MDX')}
</div>
```
## How-to?
```jsx{5}
import MySuperComponent from '../path/to/MySuperComponent'
# Some text in Markdown
<MySuperComponent />
other text in markdown
```
## Read more
👉 https://mdxjs.com
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment