Skip to content

Commit 5f06d1b

Browse files
authored
Ensure our own docs build without errors (#70)
1 parent 07e54ad commit 5f06d1b

File tree

5 files changed

+9
-6
lines changed

5 files changed

+9
-6
lines changed

docs/source/markup/admonitions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,11 @@ This is a tip
4949
Feature A
5050
```
5151

52-
```{versionchanged} 8.15
52+
```{versionchanged} 8.15.0
5353
Feature B
5454
```
5555

56-
```{deprecated} 2
56+
```{deprecated} 0.2.0
5757
Feature C
5858
```
5959

docs/source/markup/images.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ Here is an image from the local image folder.
3131

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

34-
```{figure-md}
35-
![Elasticsearch](/_static/img/observability.png){w=350px align=center}
34+
```{figure-md} /_static/img/observability.png
35+
:width: 350px
36+
:align: center
3637
3738
This is a caption in **Markdown**
3839
```

docs/source/markup/substitutions.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,4 @@ Here are some variable substitutions:
88

99
| Value | Source |
1010
| ------------------- | ------------ |
11-
| {{project}} | conf.py |
1211
| {{frontmatter_key}} | Front Matter |

src/Elastic.Markdown/Myst/Directives/ImageBlock.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ private void ExtractImageUrl(ParserContext context)
9595

9696
ImageUrl = imageUrl;
9797
var imagePath = Path.Combine(includeFrom, imageUrl.TrimStart('/'));
98-
if (context.Build.ReadFileSystem.File.Exists(imageUrl))
98+
if (context.Build.ReadFileSystem.File.Exists(imagePath))
9999
Found = true;
100100
else
101101
EmitError(context, $"`{imageUrl}` does not exist. resolved to `{imagePath}");

src/Elastic.Markdown/Myst/ParserContext.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@ public ParserContext(MarkdownParser markdownParser,
4242
foreach (var (key, value) in props)
4343
Properties[key] = value;
4444
}
45+
46+
if (frontMatter?.Title is {} title)
47+
Properties["page_title"] = title;
4548
}
4649

4750
public MarkdownParser Parser { get; }

0 commit comments

Comments
 (0)