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

[Question]: add lightbox2 #187

Closed
emanuelegdepaoli opened this issue Jan 6, 2023 · 2 comments
Closed

[Question]: add lightbox2 #187

emanuelegdepaoli opened this issue Jan 6, 2023 · 2 comments
Labels

Comments

@emanuelegdepaoli
Copy link

I'am trying to add lighbox2 to my website created using alembic as theme. I followed the instructions in this page:

1- added the folders css and js with the required files.
2- added the folder _layout which includes a custom default.html, with the required modifications.

However, when running the site locally, I get the following errors:

[2023-01-06 10:56:37] ERROR `/page/css/lightbox.css' not found. 
[2023-01-06 10:56:37] ERROR `/page/js/lightbox-plus-jquery.js' not found.

where page is the website section where I try to load the images. That is, I have a page.md file in my main folder and my header in _config.yml is like the following:

# Header nav
navigation_header:
- title: Home
  url: /
- title: Mypage
  url: /page/

This is my first attempt to build a website and I really don't know how to solve the path problem.

@daviddarnes
Copy link
Owner

I think you need to place the CSS and JS files in the assets directory and make sure when you reference them you're pointing to them absolutely. From looking at the errors you posted you've either added /page/ into the path, which isn't needed, or they are being set relatively which isn't right either. They need to be absolute so the files can be found from any page on the site. Hope this makes sense!

@emanuelegdepaoli
Copy link
Author

Thank you for your help, the problem was that the CSS file, the JS file and the folder image have to be all in assets and I have to point to them absolutely.

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

No branches or pull requests

2 participants