-
Notifications
You must be signed in to change notification settings - Fork 326
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11226 from quarto-dev/bugfix/10311
Loosen image auto-discovery for OpenGraph
- Loading branch information
Showing
13 changed files
with
161 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
_site/ | ||
.quarto | ||
/.quarto/ | ||
*jupyter_cache/ | ||
*.jupyter_cache* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
project: | ||
type: website | ||
|
||
website: | ||
title: "today" | ||
open-graph: true | ||
page-footer: | ||
center: | | ||
Footer image: | ||
[![](/profile.jpg)](https://quarto.org/) | ||
navbar: | ||
left: | ||
- href: index.qmd | ||
text: Home | ||
- posts.qmd | ||
|
||
format: | ||
html: | ||
theme: cosmo | ||
toc: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
title: "Home" | ||
listing: | ||
contents: | ||
- "posts.qmd" | ||
type: grid | ||
sort: false | ||
_quarto: | ||
render-project: true | ||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
title: "Listing Example" | ||
listing: | ||
contents: posts | ||
_quarto: | ||
render-project: true | ||
--- |
34 changes: 34 additions & 0 deletions
34
tests/docs/smoke-all/2024/10/28/issue-10311/posts/a-test-post-og/index.qmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
date: '2024-07-20T20:47:56-04:00' | ||
title: "Yes, opengraph image" | ||
_quarto: | ||
render-project: true | ||
tests: | ||
html: | ||
ensureFileRegexMatches: | ||
- | ||
- '\<meta property="og:image" content="index_files' | ||
- [] | ||
--- | ||
|
||
Testing images. | ||
|
||
```{python} | ||
# | label: fig-polar | ||
# | fig-cap: "A line plot on a polar axis" | ||
# | classes: preview-image | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
r = np.arange(0, 2, 0.01) | ||
theta = 2 * np.pi * r | ||
fig, ax = plt.subplots( | ||
subplot_kw = {'projection': 'polar'} | ||
) | ||
ax.plot(theta, r) | ||
ax.set_rticks([0.5, 1, 1.5, 2]) | ||
ax.grid(True) | ||
plt.show() | ||
``` |
33 changes: 33 additions & 0 deletions
33
tests/docs/smoke-all/2024/10/28/issue-10311/posts/a-test-post/index.qmd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
--- | ||
date: '2024-07-20T20:47:56-04:00' | ||
title: "This has no ogimage" | ||
_quarto: | ||
render-project: true | ||
tests: | ||
html: | ||
ensureFileRegexMatches: | ||
- | ||
- '\<meta property="og:image" content="index_files' | ||
- [] | ||
--- | ||
|
||
Testing images. | ||
|
||
```{python} | ||
#| label: fig-polar | ||
#| fig-cap: "A line plot on a polar axis" | ||
import numpy as np | ||
import matplotlib.pyplot as plt | ||
r = np.arange(0, 2, 0.01) | ||
theta = 2 * np.pi * r | ||
fig, ax = plt.subplots( | ||
subplot_kw = {'projection': 'polar'} | ||
) | ||
ax.plot(theta, r) | ||
ax.set_rticks([0.5, 1, 1.5, 2]) | ||
ax.grid(True) | ||
plt.show() | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
project: | ||
type: website | ||
|
||
website: | ||
title: "myblog" | ||
image: "/posts/post-with-code/image.jpg" | ||
open-graph: true | ||
page-footer: | ||
center: | | ||
Footer image: | ||
[![](/profile.jpg)](https://quarto.org/) | ||
navbar: | ||
right: | ||
- icon: github | ||
href: https://github.com/ | ||
- icon: twitter | ||
href: https://twitter.com | ||
|
||
format: | ||
html: | ||
theme: cosmo | ||
css: styles.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
title: "issue-5625" | ||
_quarto: | ||
render-project: true | ||
tests: | ||
html: | ||
ensureFileRegexMatches: | ||
- | ||
- '<meta property="og:image" content="/posts/post-with-code/image.jpg">' | ||
- [] | ||
--- | ||
|
||
This is a Quarto website. | ||
|
||
To learn more about Quarto websites visit <https://quarto.org/docs/websites>. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
/* css styles */ |