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

Deployment of dotfiles by default? #954

Open
damiencourousse opened this issue Sep 20, 2022 · 4 comments
Open

Deployment of dotfiles by default? #954

damiencourousse opened this issue Sep 20, 2022 · 4 comments

Comments

@damiencourousse
Copy link

I had an issue with the deployment of files and directories which names would start with a dot.
After a lot of time I stumbled on #841 #841 (comment) and could solve the issue.

By default, I think dotfiles should be deployed. Is there any reason not to? To avoid the deployment of a '.git' directory in particular cases?

@Minoru
Copy link
Collaborator

Minoru commented Oct 9, 2022

Judging by the commit that introduced it (f04efba) and a later commit that added support for Emacs (ca17e43), the goal of ignoreFile is to exclude temporary files created by text editors. It doesn't explain why dotfiles were included in there.

Still, I think it's a good idea to ignore them, because I can think of only a single case where I'd want such a file to be deployed: .htaccess. Is that what you tried to do?

We definitely need to make this behaviour more visible though, because people bump into it from time to time (#560, #841). Can you recall what docs you looked at while trying to figure it out? Currently this is only documented in Hakyll.Core.Configuration, which is clearly not enough. Perhaps we should also teach Hakyll to count the number of ignored files and display it at the end of the build, and provide the list of those files in build --verbose.

@Minoru Minoru changed the title Deployment of dotFiles by default? Deployment of dotfiles by default? Oct 9, 2022
@damiencourousse
Copy link
Author

Still, I think it's a good idea to ignore them, because I can think of only a single case where I'd want such a file to be deployed: .htaccess. Is that what you tried to do?

I had a use case where I needed to (process and) deploy some files, but not include them in sitemap.xml. Using dotfiles for this seemed to be a simple naming convention.

We definitely need to make this behaviour more visible though, because people bump into it from time to time (#560, #841). Can you recall what docs you looked at while trying to figure it out? Currently this is only documented in Hakyll.Core.Configuration, which is clearly not enough. Perhaps we should also teach Hakyll to count the number of ignored files and display it at the end of the build, and provide the list of those files in build --verbose.

I agree. The easily accessible documentation lets the user think that all the files are processed (e.g. in default compilers).

Explicitly listing those files in a verbose build can also help.

@Minoru
Copy link
Collaborator

Minoru commented Oct 12, 2022

I guess Hakyll.Core.Rules.match would be a better place than compilers, because that's where filenames are handled. Currently this function is not documented at all :(

@rpearce
Copy link
Contributor

rpearce commented Jan 31, 2023

I can think of only a single case where I'd want such a file to be deployed

There is also the popular .well-known/ folder that Brave and Keybase use, for example (there are plenty of others).

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

No branches or pull requests

3 participants