-
-
Notifications
You must be signed in to change notification settings - Fork 122
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 images for featured links #117
Conversation
I was actually going to ask if we could figure out how to get these as local files. I started it locally but had to do day job things. |
Well, diving a bit more, i recon there's netlify admin (sorry to miss that previously) so images can be uploaded there. I assume links.yaml is generated from there? |
The admin is a work in progress which so far doesn’t work. |
Roger that. I was playing around with it in my own account. I guess I'll
postpone it and cook something out of as is. I might be adding some commits
related to its configuration, but since it's not being used, should be
harmless.
…On Tue, Jan 14, 2020, 8:13 PM Phil Sturgeon ***@***.***> wrote:
The admin is a work in progress which so far doesn’t work.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#117?email_source=notifications&email_token=AABECTCLXHHOPEZTM7ZWZUDQ5YMH7A5CNFSM4KGHDWSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEI56Y5Q#issuecomment-574352502>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABECTEE5DGHYZVQ7UGYGJDQ5YMH7ANCNFSM4KGHDWSA>
.
|
- still only placeholders (kittens!!!) - need to replace proper image source in `src/data/links.yaml` where `featured: true`
I guess this is it? |
Don't be so hard on yourself - images in gatsby can be a bit of a mess. Everything here looks sensible to me. Can you set a featured image for one category so we can test this out? |
Erm, i do i do that?
So, what's going on here is the following:
- if a featured link has the image filled
- if the field is a valid https url -> it's streamed down to a file
located in `src/images/featured/cards` named after its slugged title and
uses the extension from the content type's response (yeah, composed
content-types will break it)
- otherwise it does nothing
- in the categories template it will look for sharp-worked images and, if
there's a match from the slugged title, it will serve it
It's not being hard, but this is kinda volatile is all.
I'd prefer to have it sorted with the netlify cms though... I could look
into that if that's the direction this is headed.
…On Thu, 16 Jan 2020 at 12:36, Mike Bifulco ***@***.***> wrote:
Don't be so hard on yourself - images in gatsby can be a bit of a mess.
Everything here looks sensible to me. Can you set a featured image for one
category so we can test this out?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#117?email_source=notifications&email_token=AABECTABX3KK2DCNDHJSVA3Q6BIDPA5CNFSM4KGHDWSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJD5GHA#issuecomment-575132444>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABECTCPKKSJF4R7FQAXHYLQ6BIDPANCNFSM4KGHDWSA>
.
--
Rui Pedro Lima
|
@rapzo netlify cms is up and running now! Sorry for the change whilst you're working. I was imagining we'd just have local files saved by humans and point to them in a file, like categories, but I like your effort to make it awesome. If there is a way we can just upload images to a "link" then click a featured checkbox, that sounds amazing. |
Will look into it. After all, i have my fork deployed and up and running in
netlify as well. Will get back once i get some results.
…On Thu, Jan 16, 2020, 2:26 PM Phil Sturgeon ***@***.***> wrote:
@rapzo <https://github.com/rapzo> netlify cms is up and running now!
[image: image]
<https://user-images.githubusercontent.com/67381/72532833-fe75a380-386b-11ea-8c2c-e45ad58cb8b6.png>
Sorry for the change whilst you're working. I was imagining we'd just have
local files saved by humans and point to them in a file, like categories,
but I like your effort to make it awesome.
If there is a way we can just upload images to a "link" then click a
featured checkbox, that sounds amazing.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#117?email_source=notifications&email_token=AABECTFZDXVATFDKWQLOBILQ6BVBTA5CNFSM4KGHDWSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJEHVKA#issuecomment-575175336>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABECTA2ITWD4J75UYRXRSLQ6BVBTANCNFSM4KGHDWSA>
.
|
Hey I hope things are going ok over there. Sorry things were a bit of a mess before but netlify cms seems to have stabilized. Let me know if I can help with anything :D |
Eish, totally slept on it, sorry. I have it kinda working, except I can't
make image uploads go through sharp plugin... I think that would require a
rebuild but the netlify-cms plugin doesn't go through it. I will sort it
out today and open the PR.
Sorry!
…On Sun, Jan 26, 2020, 10:20 AM Phil Sturgeon ***@***.***> wrote:
Hey I hope things are going ok over there. Sorry things were a bit of a
mess before but netlify cms seems to have stabilized. Let me know if I can
help with anything :D
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#117?email_source=notifications&email_token=AABECTGX54OTAIIJ5UQS35TQ7VPWFA5CNFSM4KGHDWSKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEJ5QOEI#issuecomment-578488081>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AABECTGITJWZD4JUDKBHKSTQ7VPWFANCNFSM4KGHDWSA>
.
|
Closing this one and will open a new one since this code is not useful while using netlify-cms. |
src/data/links.yaml
where
featured: true