Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(markdown): images src with baseURL #1833

Merged
merged 1 commit into from Jan 24, 2023
Merged

fix(markdown): images src with baseURL #1833

merged 1 commit into from Jan 24, 2023

Conversation

farnabaz
Copy link
Member

πŸ”— Linked issue

resolves #1829

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@netlify
Copy link

netlify bot commented Jan 20, 2023

βœ… Deploy Preview for nuxt-content ready!

Name Link
πŸ”¨ Latest commit 3c683ce
πŸ” Latest deploy log https://app.netlify.com/sites/nuxt-content/deploys/63cf334e78187100099f9b78
😎 Deploy Preview https://deploy-preview-1833--nuxt-content.netlify.app
πŸ“± Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

// Prepend base URL to absolute images
if (node.tag === 'img') {
if (props.src?.startsWith('/') && !props.src.startsWith('//')) {
props.src = withBase(props.src, useRuntimeConfig().app.baseURL)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nuxt API says that a env variable can be set to change the base URL

https://nuxt.com/docs/api/configuration/nuxt-config/#baseurl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BaseURL is not added to images
2 participants