Hammer for Mac - the 2025 rebirth

Thanks so much for sending the build, @steve! Firing it up now! :slight_smile:

1 Like

Thanks for this, @steve :+1:

1 Like

How did you get on? :eyes: :ear:

Great, thanks, @steve! Not got too far yet beyond installation, setting up the starter template, and messing with some variables, but it’s all working perfectly so far.

Here’s a question: this is going to be a personal website for my wife and I want to give her light content editing capabilities by putting all of the “dynamic” content in snippets, and then have her edit only the snippets using the browser-based GitHub.dev code editor. Is there a way I could neatly separate those out from the “regular” snippets by putting them in another directory, and give her access to just that directory? Could be a nice way of keeping content semi-separate from the actual site files, if possible.

Great to hear.

I think I understand the question and use-case but am probably making some assumptions about how your wife would work with the content.

As a starting point, have you seen my draft concept for content management and generation in Hammer?

I think it would answer the separation of content from templating and markup, what do you think?

I’m not clear how you would want the content > compilation > deployment workflow to be. I would imagine when the site is designed and built you wouldn’t want to be responsible yourself for the hammer build and export? But it also sounds like your wife wouldn’t be running Hammer to trigger compilation after making content updates in GitHub editor?

for this, it seems like having GitHub sync with Hammer cloud compilation triggered before deployment would work. That way your wife could simply edit the content and commit the change or make a PR and post on merge, GitHub will fire webhook and trigger deploy.

Will you host on Forge? If so, we can do this.

Hello, I’m Phil, I used Hammer in the past to make a portfolio site for my creative work. I like to hand code HTML and CSS, and hate server maintenance, so it suited me perfectly. I have an idea for a new site and would love to try building it with the new Hammer. :slightly_smiling_face:

1 Like

Hi @steve! Given the infrequency of the updates to this site, I think me just doing a pull-then-local-rebuild-then-push whenever my wife tells me she’s made an update in the browser-based editor should be fine. :slight_smile:

Hi! Hammer Class of 2014 - glad to see Hammer back in dev - looking forward to giving it a spin! Cheers!

1 Like

@steve Out of interest, is there anything ‘wrong’ with doing this? i.e. having index.html consist purely of includes? It seems to compile fine, but I thought I’d check!

1 Like

It will mostly depend on the contents of your your includes being structurally sound (proper doctype, html boilerplate, all tags closed etc.), there’s no problem in principle as it’s valid Hammer tag usage. How does the compiled output look?

You also don’t need to have the includes/ part of the path in the @include tag, Hammer will automatically look there. But I would recommend using _prefix to avoid the partials also being compiled to your build folder.

e.g. <!-- @include _header.html -->

How’s everyone getting on with the Hammer testing?

I’ve had surprisingly few issues or blockers reported (which is a pleasant surprise, but makes me nervous).

Keen to hear how you’ve found it so far?
What are you building with Hammer?
Any observations, gripes, issues?
Anything you really love about it?

Just had time to make a real site, quite simple one. Took the example, and moved the to an include, and also the values so that they could be used across all pages easily.

I’m not sure if there is an option to auto-detect the changed source files and do an build, and I can’t seem to turn off the cache (not sure if I’d want to).

Also, the includes are output in the build directory, but they aren’t referenced. Not sure that should be the case as they sort of “leak” information?

Apart from that, this has been great as a template driven content system.

1 Like

Amazing, great to hear.

Just had time to make a real site, quite simple one. Took the example, and moved the to an include, and also the values so that they could be used across all pages easily.

Yes, includes with variables are great for this.

I’m not sure if there is an option to auto-detect the changed source files and do an build,

This should be the default behaviour - Hammer watches the filesystem for changes and when you save a change, the build will be triggered. Check that the :eye: icon (which is a toggle for the file system watcher) is enable (solid filled icon, not outline). Otherwise, I’d need more info to see what’s up in your case.

and I can’t seem to turn off the cache (not sure if I’d want to).

Ability to turn off the cache is mostly when you find some issue that is due to cache and you want to do a completely fresh build, but mostly shouldn’t be needed. The UX of the Cache button isn’t very clear, you click it, then trigger build and you’ll see the “cache disabled” state for the build. I willimprove this along with some other UX gripes I have with those buttons / actions.

Also, the includes are output in the build directory, but they aren’t referenced. Not sure that should be the case as they sort of “leak” information?

Make sure you prefix your include filenames with _ e.g. _head.html - this needed to tell Hammer you don’t want the file in the Build output.

Apart from that, this has been great as a template driven content system.

:heart:

Is it possible to use the loop function on a directory of files?

I’m thinking blog posts, but could be product list or whatever. So I’d create a number of files which would probably have html content, but also a few variables or something (perhaps a date or sequential number). The loop would work on each of these, in order of date or sequence, and be able to read the variables in the file (titles etc). I could then use conditionals to only take the first 5 in the sequence.

From what I’ve read on the documentation (I hope the right site) I can define variables, but not operate on them (so can’t count to 5 and then stop outputting). And I can’t get the file list either.

This strikes me as a key feature if blogs are to be automatically updated with the latest posts…

Hope this helps, thanks! Matthew

I note the auto-reload doesn’t work in Safari on the Mac.
SyntaxError: Invalid regular expression: nothing to repeat
var href = link.href.replace(/((&|?)hammer=)[^&]+/, ‘’);

Sounds like a perfect use-case for content mode in Hammer.

I’ve recorded a video that gives a practical walkthrough of how it works…

Let me know if you think this is aligned with what you had in mind.

That looks perfect. I shall work out how to apply that for my needs. One thing that I can do on WordPress is add a line which indicates a “break” which on summaries (like an index page) would show “more…” so that the full blog isn’t displayed, but just the first paragraph or two. No idea if Markdown has such but a simple [summary-break] text would work, and could be removed easily for the full version.

I’d also like to be able to pick just the three latest blogs, or perhaps the summary paragraphs of three, and then the titles of further blogs. I can’t see any variable operators but I did work out I could use simple conditions if a variable can be set to true and then set to false later and it work in a loop.

But I’m perhaps getting ahead of myself and Hammer. More when I have time to implement the blog…

Hmm, just realised that content mode isn’t available in the version we have for test. I shall await it!

1 Like

Just wanted to say I used hammer back in the day and following along now. This demo was great to see!

1 Like

One further thought - in converting an existing blog using Hammer, the content mode is great. Apart from the fact that my content is currently HTML, so I have to convert that to markdown. Most of my content is just text, so that’s fine, but it does strike me that it would be good for the content mode to just use the extension of the file to determine how to treat it. .md=> markdown. .yaml=>whatever that is. .html=> just take as is into the template.

1 Like

You can actually use raw HTML in the body Markdown section if you like - I do that for pages where I’m more opinionated about the layout.

1 Like