News for hackers. Stuff that matters.
Re:Show HN: I created a URL shortener that can be entirely h... by Jhsto on Monday November 16, 2020 @08:05AM (#25111130)
You could also push static HTML pages to the git root which have, e.g.,

<meta http-equiv="refresh" content="1; url='https://news.ycombinator.com/'" />

in the header.

Re:Show HN: I created a URL shortener that can be entirely h... by ValentineC on Monday November 16, 2020 @08:21AM (#25111291)
I reckon it'll be possible to "simplify" it even more for an end-user, by making a static site generator generate these redirect HTML files from markdown or a CSV.
Re:Show HN: I created a URL shortener that can be entirely h... by nelsontky on Monday November 16, 2020 @08:31AM (#25111381)
Some guy shared his project in this post that does exactly that! Yes while that is possible and can get to a high level of automation via GitHub actions, the point of my URL shortener was more of people could post a link easily with a simple interface (like the interface for adding a new issue). But if I were operating with a fixed set of short links, then this would have been a good method!
Re:Show HN: I created a URL shortener that can be entirely h... by davchana on Monday November 16, 2020 @10:54AM (#25113154)
I did exactly as you said, about a year or two ago, using Jekyll.

https://gitlab.com/davch/static-redirect

Re:Show HN: I created a URL shortener that can be entirely h... by wesleytodd on Monday November 16, 2020 @03:25PM (#25116572)
Re:Show HN: I created a URL shortener that can be entirely h... by navanchauhan on Monday November 16, 2020 @08:13AM (#25111204)
I am not familiar with this, could you explain what will happen?
Re:Show HN: I created a URL shortener that can be entirely h... by lbotos on Monday November 16, 2020 @08:16AM (#25111227)
for browsers that load the page that contains that stanza and respect meta refresh, it will refresh and redirect you to the url=.
Re:Show HN: I created a URL shortener that can be entirely h... by notRobot on Monday November 16, 2020 @08:16AM (#25111222)
It will redirect to the url.
Re:Show HN: I created a URL shortener that can be entirely h... by chrismorgan on Monday November 16, 2020 @11:57AM (#25113965)
Any particular reason why you wrote 1 rather than 0?
Re:Show HN: I created a URL shortener that can be entirely h... by Jhsto on Monday November 16, 2020 @12:19PM (#25114274)
Not really. Copied it from somewhere else where the placeholder value was 7. 1 came to my mind before 0. Zero seems like it could be UB.
Re:Show HN: I created a URL shortener that can be entirely h... by chrismorgan on Monday November 16, 2020 @12:29PM (#25114407)
Nah, zero just means “redirect after zero seconds”, meaning immediately. You definitely want zero.