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

globvar ignore is ignored #985

Open
stanvanlier opened this issue Oct 17, 2022 · 5 comments
Open

globvar ignore is ignored #985

stanvanlier opened this issue Oct 17, 2022 · 5 comments

Comments

@stanvanlier
Copy link
Contributor

Adding files or directories to the ignore global config variable does not have an effect on what is copied over to the __site directory.

(I found out about it because Manifest.toml and Project.toml are copied over to the __site directory, which also should not happen according to the docs).

@tlienart
Copy link
Owner

Hello @stanvanlier!

Could you tell me how you defined ignore? I just did the following to test:

  1. create a dummy dir, activate it, add Franklin
  2. using Franklin; newsite(".") in the directory
  3. adjusted config.md so it had ignore = ["node_modules/", "Project.toml", "Manifest.toml"]
  4. ran serve(single=true, launch=false)
  5. ; ls __site gives
404.html	feed.xml	menu1		robots.txt
assets		index.html	menu2		sitemap.xml
css		libs		menu3		tag

which seems about right?

@stanvanlier
Copy link
Contributor Author

You're right! Apparently I didn't restarting the server. I assumed the whole config.md would be reevaluated by just saving it, but it turns out there are some exceptions to that.

@tlienart
Copy link
Owner

It definitely should, but the hard bit is that I think you're assuming that there's a cleanup pass to remove files afterwards, and there isn't.

What I mean is that you called serve, it copied stuff to site, then you saved config with a new ignore, but the copied files haven't been deleted. They will be deleted only if you call serve(clear=true) in which case the entire folder will be nuked and rebuilt.

You can always work with clear mode but if you have evaluated code cells, this will slow stuff down quite a bit; if you don't it's fine :)

@stanvanlier
Copy link
Contributor Author

Thanks, serve(clear=true) is a nice workaround.

What I did was I deleted Project.toml manually from __site and it then kept reappearing when saving config.md until I restart the server.

@tlienart
Copy link
Owner

Ah yes that's an interesting one; Franklin keeps a list of files being watched and given that it was there from the start, it will keep assuming it needs to copy it if it's not there.

What should ideally happen is that when ignore gets updated that list of files being watched also is. I'll reopen the issue to look a bit into it

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

2 participants