How to use alternate URL structure for query string type URLs?

I want to be able to create pages with URLs like:

Where the actual page being loaded is alpha, and 1234 is a parameter being passed to the page (like a query string) which will be consumed by some Javascript, and that is somehow accessible to the Javascript on the page.

Is this doable? Somehow, Hugo would have to generate pages knowing that alpha was a page, not a directory, and that 1234 was like a query string. If this is doable, how would I access 1234 in Javascript?

If this isn’t doable as outlined, is there a way to get close or approximate this using actual query strings?


It is not.

You need to use a query string: