Skip to content

Commit 1246c5d

Browse files
authored
Add support for gif & jpeg images (#370)
* Add support for gif images * include jpeg support as well
1 parent a78d321 commit 1246c5d

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

docs/syntax/images.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,21 @@ Here is the same image used inline ![Elasticsearch](img/observability.png)
4444

4545
Here is the same image used inline ![Elasticsearch](img/observability.png)
4646

47+
### SVG
48+
49+
```markdown
50+
![Elasticsearch](img/alerts.svg)
51+
```
52+
![Elasticsearch](img/alerts.svg)
53+
54+
### GIF
55+
56+
```markdown
57+
![Elasticsearch](img/timeslider.gif)
58+
```
59+
![Elasticsearch](img/timeslider.gif)
60+
61+
4762
## Asciidoc syntax
4863

4964
```asciidoc

docs/syntax/img/alerts.svg

Lines changed: 62 additions & 0 deletions
Loading

docs/syntax/img/timeslider.gif

641 KB
Loading

src/Elastic.Markdown/IO/DocumentationSet.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public DocumentationSet(BuildContext context)
4848
.Select(f => context.ReadFileSystem.FileInfo.New(f))
4949
.Select<IFileInfo, DocumentationFile>(file => file.Extension switch
5050
{
51+
".jpg" => new ImageFile(file, SourcePath, "image/jpeg"),
52+
".jpeg" => new ImageFile(file, SourcePath, "image/jpeg"),
53+
".gif" => new ImageFile(file, SourcePath, "image/gif"),
5154
".svg" => new ImageFile(file, SourcePath, "image/svg+xml"),
5255
".png" => new ImageFile(file, SourcePath),
5356
".md" => CreateMarkDownFile(file, context),

0 commit comments

Comments
 (0)