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

🖼️ Add cover image to content layout #558

Merged
merged 1 commit into from
Jan 12, 2023
Merged

Conversation

MeganSteenkamp
Copy link
Contributor

Add cover image with a path pulled from markdown.

Test plan: Expect to see cover image as per screenshot.

Screenshot 2023-01-11 at 4 49 42 PM

Screenshot 2023-01-11 at 4 49 51 PM

@@ -1,5 +1,6 @@
---
title: Farmlands POS Integration Guide
img: /farmlands-pos-integration-cover.jpg
Copy link
Contributor

Choose a reason for hiding this comment

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

What was your reasoning for using a JPG over a PNG? I see the other image you used was a PNG

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tom-blake I went to Unsplash and got the original image as the one from Figma wasn't large enough. Unsplash didn't have an option for the file type and downloaded it as a JPG.

Copy link
Contributor

Choose a reason for hiding this comment

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

I see - thanks! Maybe let the designers know if Unsplash isn't what they'd do :)

@@ -1,5 +1,6 @@
---
title: Farmlands POS Integration Guide
img: /farmlands-pos-integration-cover.jpg
Copy link
Contributor

Choose a reason for hiding this comment

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

@MeganSteenkamp I think it's good that you used the front-matter to declare the image path, @AndyClifford will need this path to display this guide as a small card on the partner page 👍

Is there a reason why it doesn't need to be the full path (include /public)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Is it possible to use the assets directory here? ~/assets/farmlands/pos-integration-cover.jpg

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@tom-blake @AndyClifford I have tried the assets directory but it didn't work 🤔. By default files in the /public directory are served at the root which is why I didn't need to specify the folder.

I see Nuxt has an image module if we did want to optimize images: https://v1.image.nuxtjs.org/get-started/

Copy link
Contributor

Choose a reason for hiding this comment

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

@MeganSteenkamp Yeah it's not working for me either. Found this comment that suggests copying the files to public or using the module you mentioned

@MeganSteenkamp MeganSteenkamp force-pushed the add-cover-image branch 2 times, most recently from 1df543c to 8cc4bd7 Compare January 12, 2023 21:01
Add cover image with a path pulled from markdown.

Test plan: Expect to see cover image as per screenshot.
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.

None yet

3 participants