Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions docs/syntax/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,21 @@ Here is the same image used inline ![Elasticsearch](img/observability.png)

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

### SVG

```markdown
![Elasticsearch](img/alerts.svg)
```
![Elasticsearch](img/alerts.svg)

### GIF

```markdown
![Elasticsearch](img/timeslider.gif)
```
![Elasticsearch](img/timeslider.gif)


## Asciidoc syntax

```asciidoc
Expand Down
62 changes: 62 additions & 0 deletions docs/syntax/img/alerts.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/syntax/img/timeslider.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions src/Elastic.Markdown/IO/DocumentationSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@ public DocumentationSet(BuildContext context)
.Select(f => context.ReadFileSystem.FileInfo.New(f))
.Select<IFileInfo, DocumentationFile>(file => file.Extension switch
{
".jpg" => new ImageFile(file, SourcePath, "image/jpeg"),
".jpeg" => new ImageFile(file, SourcePath, "image/jpeg"),
".gif" => new ImageFile(file, SourcePath, "image/gif"),
".svg" => new ImageFile(file, SourcePath, "image/svg+xml"),
".png" => new ImageFile(file, SourcePath),
".md" => CreateMarkDownFile(file, context),
Expand Down