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

feat: enable images in project description text #651

Merged
merged 7 commits into from
Nov 6, 2023
Merged

Conversation

JRWallace
Copy link
Contributor

@JRWallace JRWallace commented Oct 13, 2023

This allows project pages to render images that are uploaded via netlify or stored in /static/image (see https://decapcms.org/docs/add-to-your-site/#app-file-structure)

@netlify
Copy link

netlify bot commented Oct 13, 2023

Deploy Preview for gatsby-theme-project-portal-defaults ready!

Name Link
🔨 Latest commit f6dabe9
🔍 Latest deploy log https://app.netlify.com/sites/gatsby-theme-project-portal-defaults/deploys/65493d600388020008684764
😎 Deploy Preview https://deploy-preview-651--gatsby-theme-project-portal-defaults.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 configuration.

@netlify
Copy link

netlify bot commented Oct 13, 2023

Deploy Preview for project-portal-storybook ready!

Name Link
🔨 Latest commit f6dabe9
🔍 Latest deploy log https://app.netlify.com/sites/project-portal-storybook/deploys/65493d60c3f28e000890c09a
😎 Deploy Preview https://deploy-preview-651--project-portal-storybook.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 configuration.

@netlify
Copy link

netlify bot commented Oct 13, 2023

Deploy Preview for gatsby-theme-project-portal-ex-site ready!

Name Link
🔨 Latest commit f6dabe9
🔍 Latest deploy log https://app.netlify.com/sites/gatsby-theme-project-portal-ex-site/deploys/65493d60a1f2d0000883d028
😎 Deploy Preview https://deploy-preview-651--gatsby-theme-project-portal-ex-site.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 configuration.

@github-actions
Copy link

github-actions bot commented Oct 13, 2023

Note: This comment gets updated with every commit

Git SHA: f6dabe959ed743c53e90ad8906fb84b833292bfa

Site: example-site

Pa11y test status: PASS

 {
    "total": 20,
    "passes": 20,
    "errors": 0,
    "results": {
        "http://localhost:9000/project/completed-project-nodate/": [],
        "http://localhost:9000/project/completed-project/": [],
        "http://localhost:9000/project/completed-project2/": [],
        "http://localhost:9000/project/ongoing-project-nodate/": [],
        "http://localhost:9000/project/ongoing-project/": [],
        "http://localhost:9000/project/ongoing-project2/": [],
        "http://localhost:9000/project/open-project-2/": [],
        "http://localhost:9000/project/open-project-nodate/": [],
        "http://localhost:9000/project/open-project/": [],
        "http://localhost:9000/project/open-project3/": [],
        "http://localhost:9000/project/open-project4/": [],
        "http://localhost:9000/project/open-project5/": [],
        "http://localhost:9000/project/open-project6/": [],
        "http://localhost:9000/completed/": [],
        "http://localhost:9000/": [],
        "http://localhost:9000/ongoing/": [],
        "http://localhost:9000/open/": [],
        "http://localhost:9000/about/": [],
        "http://localhost:9000/contact/": [],
        "http://localhost:9000/contact/thank-you/": []
    }
}
 

Copy link
Contributor

@hollandjg hollandjg left a comment

Choose a reason for hiding this comment

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

Hey Joselynn, this looks great! Please could you add an example of an image being shown in the packages/example-site site?

@JRWallace
Copy link
Contributor Author

Hey Joselynn, this looks great! Please could you add an example of an image being shown in the packages/example-site site?

Ok I did this and the checks seem to be passing

Copy link
Contributor

@hollandjg hollandjg left a comment

Choose a reason for hiding this comment

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

Test works great.
I had a look at some of the other collections – images are also set on the card pages and the other pages. Unfortunately, this change breaks the image display in those two places. There are a couple of options I can see.

It looks to me as though the handling of images on the whole – where they get stored, how they are divided up, and whether you can set images for the layout components from the CMS (you can't right now) – needs another look, but that's a different PR. It feels like, with this PR, we're getting the hang of handling images!

packages/project-portal-content-netlify/src/cms/cms.js Outdated Show resolved Hide resolved
@hollandjg hollandjg mentioned this pull request Oct 24, 2023
Copy link
Contributor

@hollandjg hollandjg left a comment

Choose a reason for hiding this comment

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

🚀 Great!

@JRWallace JRWallace changed the title editing the cms.js file so that media_folder points to static/image feat: enable images in project description text Nov 6, 2023
@JRWallace JRWallace added this pull request to the merge queue Nov 6, 2023
Merged via the queue into main with commit 4979d72 Nov 6, 2023
15 checks passed
@JRWallace JRWallace deleted the issue-455 branch November 6, 2023 20:09
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.

2 participants