Skip to content

Commit

Permalink
Merge pull request #86 from chrismwilliams/markdown-unwrap-images
Browse files Browse the repository at this point in the history
remove wrapping paragraphs for md images and update example
  • Loading branch information
Chris Williams authored Jul 7, 2023
2 parents 01f7662 + f18c067 commit 7e7d03f
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 0 deletions.
2 changes: 2 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import mdx from "@astrojs/mdx";
import tailwind from "@astrojs/tailwind";
import sitemap from "@astrojs/sitemap";
import prefetch from "@astrojs/prefetch";
import remarkUnwrapImages from "remark-unwrap-images";

// https://astro.build/config
export default defineConfig({
// ! Please remember to replace the following site property with your own domain
site: "https://astro-theme-cactus.netlify.app/",
markdown: {
remarkPlugins: [remarkUnwrapImages],
shikiConfig: {
theme: "dracula",
wrap: true,
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"prettier": "^2.8.8",
"prettier-plugin-astro": "0.10.0",
"prettier-plugin-tailwindcss": "^0.3.0",
"remark-unwrap-images": "^3.0.1",
"tailwindcss": "^3.3.2",
"typescript": "^5.1.5"
},
Expand Down
12 changes: 12 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/content/post/markdown-elements/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ Right aligned columns
## Images

Image in the same folder: `src/content/post/markdown-elements/logo.png`

![Astro theme cactus logo](./logo.png)

Image in the aliased assets folder: `src/assets/about-astro.png`

![A cartoon cactus looking at the Astro.build logo](~/assets/about-astro.png)

## Links
Expand Down

0 comments on commit 7e7d03f

Please sign in to comment.