I would find it useful to have a post hook after the site is generated, especially with the watch functionality where the site is generated on every change (which is very useful!). for example, a script could open or refresh a browser window or call sync files, etc.
This should be easy enough to add. We should add a prehook and a posthook
option to the config and command line.
I could take a stab at it in a couple days.
Thinking about this a bit more it should actually be a set of hooks that can be defined in the config. You should provide an optional extension, optional path and command to run. This should cover all bases for anything anyone would would as far as I can think of.
It covers the javascript compression case, the coffeescript case, the scss/sass case.
You could run an image compression or even push something to a remote server.
Probably the best way to do this is that the command would specify something like %file% in places where they would want the single changed file to be in the command.
Does this sound like it would work for everyone?
Can I have different hooks when I run it as a server and when I package the site?
When in server mode, I'd simply start compass watch or whatever_i_am_using watch.
It'd be nice I could start them as pre commands and have them killed when I kill the server.
@spf13 you said back in 2013 that you would "take a stab at it in a couple days". Now it is more than a few days later; what is the status?
This issue has been automatically marked as stale because it has not been commented on for at least four months.
The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in four months if no further activity occurs. Thank you for all your contributions.
Note/Update: This issue is marked as stale, and I may have said something earlier about "opening a thread on the discussion forum". Please don't.
If this is a bug and you can still reproduce this error on the latest release or the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
Most helpful comment
@spf13 you said back in 2013 that you would "take a stab at it in a couple days". Now it is more than a few days later; what is the status?