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
4 changes: 2 additions & 2 deletions docs/source/markup/admonitions.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
---

Check warning on line 1 in docs/source/markup/admonitions.md

View workflow job for this annotation

GitHub Actions / docs

Directive block 'attention' is unsupported. See https://github.com/elastic/docs-builder/issues/3 for more information.

Check warning on line 1 in docs/source/markup/admonitions.md

View workflow job for this annotation

GitHub Actions / docs

Directive block 'danger' is unsupported. See https://github.com/elastic/docs-builder/issues/3 for more information.

Check warning on line 1 in docs/source/markup/admonitions.md

View workflow job for this annotation

GitHub Actions / docs

Directive block 'error' is unsupported. See https://github.com/elastic/docs-builder/issues/3 for more information.

Check warning on line 1 in docs/source/markup/admonitions.md

View workflow job for this annotation

GitHub Actions / docs

Directive block 'hint' is unsupported. See https://github.com/elastic/docs-builder/issues/3 for more information.

Check warning on line 1 in docs/source/markup/admonitions.md

View workflow job for this annotation

GitHub Actions / docs

Directive block 'important' is unsupported. See https://github.com/elastic/docs-builder/issues/3 for more information.

Check warning on line 1 in docs/source/markup/admonitions.md

View workflow job for this annotation

GitHub Actions / docs

Directive block 'seealso' is unsupported. See https://github.com/elastic/docs-builder/issues/3 for more information.
title: Admonitions
---

Expand Down Expand Up @@ -49,11 +49,11 @@
Feature A
```

```{versionchanged} 8.15
```{versionchanged} 8.15.0
Feature B
```

```{deprecated} 2
```{deprecated} 0.2.0
Feature C
```

Expand Down
5 changes: 3 additions & 2 deletions docs/source/markup/images.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

Here is a block-level image from the top-level static folder. The image directive supports attributes such as alt text and image width as shown here.

```{image} /_static/img/observability.png

Check failure on line 9 in docs/source/markup/images.md

View workflow job for this annotation

GitHub Actions / docs

`/_static/img/observability.png` does not exist. resolved to `/github/workspace/docs/source/_static/img/observability.png
:alt: Elastic Search
:width: 250px
```
Expand All @@ -22,7 +22,7 @@

Here is an image from the local image folder.

```{image} img/serverless-capabilities.svg

Check failure on line 25 in docs/source/markup/images.md

View workflow job for this annotation

GitHub Actions / docs

`img/serverless-capabilities.svg` does not exist. resolved to `/github/workspace/docs/source/markup/img/serverless-capabilities.svg
:alt: Elastic Search
:height: 400px
```
Expand All @@ -31,8 +31,9 @@

We can use the `figure-md` directive to add caption to an image.

```{figure-md}
![Elasticsearch](/_static/img/observability.png){w=350px align=center}
```{figure-md} /_static/img/observability.png

Check failure on line 34 in docs/source/markup/images.md

View workflow job for this annotation

GitHub Actions / docs

`/_static/img/observability.png` does not exist. resolved to `/github/workspace/docs/source/_static/img/observability.png
:width: 350px
:align: center

This is a caption in **Markdown**
```
1 change: 0 additions & 1 deletion docs/source/markup/substitutions.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ Here are some variable substitutions:

| Value | Source |
| ------------------- | ------------ |
| {{project}} | conf.py |
| {{frontmatter_key}} | Front Matter |
2 changes: 1 addition & 1 deletion src/Elastic.Markdown/Myst/Directives/ImageBlock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ private void ExtractImageUrl(ParserContext context)

ImageUrl = imageUrl;
var imagePath = Path.Combine(includeFrom, imageUrl.TrimStart('/'));
if (context.Build.ReadFileSystem.File.Exists(imageUrl))
if (context.Build.ReadFileSystem.File.Exists(imagePath))
Found = true;
else
EmitError(context, $"`{imageUrl}` does not exist. resolved to `{imagePath}");
Expand Down
3 changes: 3 additions & 0 deletions src/Elastic.Markdown/Myst/ParserContext.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ public ParserContext(MarkdownParser markdownParser,
foreach (var (key, value) in props)
Properties[key] = value;
}

if (frontMatter?.Title is {} title)
Properties["page_title"] = title;
}

public MarkdownParser Parser { get; }
Expand Down
Loading