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

Adds an org-static-blog-after-publish hook #141

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

JanJoar
Copy link

@JanJoar JanJoar commented Jan 1, 2025

I wanted to automatically upload changes to my server after org-static-blog-publish and so created a wrapper function and renamed org-static-blog-publish to org-static-blog-publish-blog as to be backward compatible. Then I added a simple hook that runs after completion.

@bastibe
Copy link
Owner

bastibe commented Jan 2, 2025

This is cool! Thank you!

However, I feel that this is better reserved to an advice of org-static-blog-publish, instead of a full-blown hook. If you see it differently, please do explain your reasoning; I am open to discussions about this.

@JanJoar
Copy link
Author

JanJoar commented Jan 4, 2025

You're right of course that advice works for this, but I fail to see the harm of a hook. Mind you that I am firmly an inclusionist so your view might be different. I just thought of using a hook, failed to find one, and added it. I don't really have any deeper reasoning.

@bastibe
Copy link
Owner

bastibe commented Jan 5, 2025

No harm in a hook. In terms of API design, I am deletionist. More code is more bug opportunities and more maintenance burden. Still, it's just a hook.

Why did you make it a new function, instead of attaching the hook to the end of the existing function?

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

Successfully merging this pull request may close these issues.

2 participants