-
-
Notifications
You must be signed in to change notification settings - Fork 386
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
setup doesn't work reliably & no CSS #181
Comments
Hey @Sammeeey, sorry for the late reply and thanks for reporting. Regarding not finding linked CSS or images: what staticrypt does is encrypt the html file only, and put it in the encrypted/filename.html
filename.html
style.css
image.jpg and your original html file links to external files with You can either move the style.css and image.jpg in the encrypted folder, use absolute links to the files ( encrypted/filename.html
html/filename.html
assets/style.css
assets/image.jpg and have relative linking with Regarding encryption working once: I don't think I understand exactly what you did here. Why did you delete the |
Hi, I believe I have a similar issue and can offer some more perspective: if I pass a directory to staticrypt, and there are css files in that directory, staticrypt will attempt to encrypt the css files (or any other file) as an HTML file. This causes syntax issues in the resulting css file. I would prefer if the CSS file were just copied to the new directory (this would work for my use case). Not sure if this is the general case solution though. Additionally, if there are multiple |
Hey @jshph, thanks for commenting and for the good idea. I think if we pass a directory we could encrypt the That means we're suddenly including files that used to be encrypted as plaintext, but I guess that's not behavior you were supposed to rely on (since the files were unusable), so not a breaking change. I'll sleep on it, happy to hear if others think otherwise. Regarding the multiple |
Yes that's exactly it. I consider the ability to pass a full directory as an improvement, but for my use case it needs to only encrypt HTML files. Perhaps others' use cases differ; an "excludes" filter that takes glob arguments could help. I think I wasn't aware of the |
Done & published! Starting 3.3.2, non-HTML file will be copied as-is. |
I'm trying to encrypt a very basic HTML file using
staticrypt filename.html
.It once worked.
After I deleted the generated
.staticrypt.json
and the/encrypted
the password protection doesn't show up anymore by default (using the VSCode Live Server Extension).Even if I do the same in a different basic project.
When I open the
index.html
in the/encrypted
folder, the password protection screen shows up and I can access the site using the password. But it doesn't find the linked images or any CSS:My setup
StatiCrypt version: 3.3.1
Node version: v18.16.0
Any additional relevant context, if any: Win 10
The text was updated successfully, but these errors were encountered: