-
Notifications
You must be signed in to change notification settings - Fork 12
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
Uploaded media not published #31
Comments
Could it be the order of how the plugins are loaded? |
Picture and transform images have no effect over the CMS, because the CMS only read the source files (not the output files in I have checked the site in my computer, replacing GitHub adapter with But maybe the problem is you're not setting a base path in GitHub. cms.storage(
"gh",
new GitHub({
client: new Octokit({ auth: Deno.env.get("GITHUB_TOKEN") }),
owner: "juliecogley",
repo: "julie_portfolio",
branch: "main",
path: "src" // Base path of your repo.
}),
); Then, you can remove the cms.upload("assets", "gh:assets"); Let me know if this works. |
Ok, seems that GitHub API only returns the content of files smaller than 1Mb. |
I'd be happy to. What do I need to do, to use the dev version? |
In the import map, just change the version of lume/cms to the hash of the last commit:
|
Right, so changing the import map version to your commit fixed the main Home/Assets view, so that now, no matter the image, it appears properly in the preview. Cool! However, from page edit view, retesting the magnifying glass picker, the popup is back to giving an error. I think everything is referenced correctly with "src" qualified in the gh storage (and it was working before changing the import map to the commit). https://github.com/juliecogley/julie_portfolio/blob/main/_cms.ts#L34-L39 ![]() ![]() |
well noted, thanks for testing. I'll try clearing caches and things like that. |
It works again when I revert to 0.7.0, go figure, but clearing caches and that sort of thing did not work. |
also, just in case, I'm testing by pushing to main, waiting, and just going to https://cms.julie.cogley.jp to see. I need to figure out how to set those variables locally, but I haven't had time to look into it. |
That's weird. The issue happens locally or in the server? |
hi, the issue happens when I publish to the server, and take a look at the cms site. I still haven't had a chance to make it work locally. |
can you send me privately a user/password to enter in the cms? |
sent via discord DM, and thank you very much for the troubleshooting. I'll look into .env! |
just upgraded to 0.7.2 and there are no problems, FYI (and, it seems very fast on deno deploy) |
nice! |
I posted a related question on the Discord, asking about how to set the upload folder so that the magnifying glass icon picker works correctly. By looking at the code and experimentation figured out that I can do as follows, specifying the public path as the third arg:
I noticed that this fixes the ability to click the magnifying glass icon and select a file for placement in the frontmatter slot it's linked to. However, for an item I uploaded via the CMS, from the main assets upload area (Home button in the CMS, then Assets, then do the upload), I see a broken image with the text "Preview".
I am creating an HTML file using the tree command, and if you check it out:
https://julie.cogley.jp/julie_cogley_jp_tree.html
... you'll see that the file in question, /assets/julie-maru-2024.jpg is not present.
Trying to access the file directly also proves it:
https://julie.cogley.jp/assets/julie-maru-202409.jpg
The repo is: https://github.com/juliecogley/julie_portfolio
There is something off with the order things are working, because of the way I have it set up.
I'm using picture and transformimages, and copyRemainingFiles():
https://github.com/juliecogley/julie_portfolio/blob/main/_config.ts
I want to serve the images from
julie.cogley.jp/assets
and store images in/src/assets
. I found that when I put a transform in the template like this:https://github.com/juliecogley/julie_portfolio/blob/main/src/showcase/fire-extinguisher_flyer.vto#L15
... the original is NOT copied to
_site/assets
, and nothing I did in the config withsite.copy
served to fix that. To get around this, I also added a_data.yml
with transforms to the repo's/src/assets
folder. This forces the original image to be copied to_site/assets
as well, so that it can be referenced, say, as a css background image.https://github.com/juliecogley/julie_portfolio/blob/main/src/assets/_data.yml
I think there is something that is not working with the timing of processing, when I upload images via the cms, because they are not getting copied to
_site/assets
and hence cannot be referenced. I am guessing that if I edit something from vscode and push, those cms uploaded files will indeed get copied...This is possibly related to lumeland/lume#571 but is there anything to be done?
The text was updated successfully, but these errors were encountered: