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

Maintain compatibility with old links on new site #14

Closed
seproDev opened this issue Mar 19, 2022 · 2 comments · Fixed by #17
Closed

Maintain compatibility with old links on new site #14

seproDev opened this issue Mar 19, 2022 · 2 comments · Fixed by #17

Comments

@seproDev
Copy link
Contributor

seproDev commented Mar 19, 2022

Ideally we would be able to redirect old URLs to new ones as to not break links.
Some DNS providers allow setting fake REDIRECT records that could be used to setup redirects like this:

Old New
www.aegisub.org aegisub.org (alternatively CNAME)
docs.aegisub.org/* aegisub.org/docs/*
blog.aegisub.org/* aegisub.org/blog/*
ftp.aegisub.org aegisub.org/downloads/ (?)
devel.aegisub.org github.com/Aegisub/Aegisub

(* meaning with the path being forwarded)

Speaking of DNS records, looking at the NS records aegisub.org seems to be using GratisDNS as a DNS provider which will be shutting down by the end of the month. Customers can migrate to one.com, but maybe this is a good time to re-evaluate providers.

If redirects at the DNS provider level are not possible, we could either point all subdomains at the site and use some javascript to redirect to the correct page or use something like cloudflare workers to make the redirects.
Edit: if we are hosting on our own hardware anyway doing those redirects in the nginx config would be much better than using javascript.

The actual forwards on the site (blog URLs differ completely and docs URLs are not capitalized by hugo) can be handled with hugo aliases. Once the switch to hugo is done and the DNS situation is figured out I'll make a PR adding the aliases.

@seproDev
Copy link
Contributor Author

seproDev commented Mar 19, 2022

Oh yeah the updates.aegisub.org subdomain also needs to point somewhere. Though redirects won't work here as Aegisub expects a status code of 200.
Also no Github Pages since Aegisub doesn't support HTTPS.

There should probably be an issue somewhere talking about how the update infastrucutre is going to work.


Edit: I gave updating the version checker a go myself. I didn't find any plans on how this should work so I just did what I thought would be reasonable. If there were any other plans do discard this.

The update checker now works by having a updates.json automatically generated by hugo. The idea would be that updates.aegisub.org always returns a file which indicates that 3.4.0 is released and future versions of Aegisub will get their update info from the aegisub.org/updates.json. If we don't want to include Boost.JSON the old format could be continued to be used.

I thought about using the GitHub releases api directly, but that doesn't play nice with the SVN revision number currently used for versioning. Changing it to actually compare the version number would also be possible, but binding it to the website has the added advantag of Aegisub not reporting an update that isn't available on the website.

Changes to Aegisite: seproDev/aegisite@5463b38...json-update
Changes to Aegisub: seproDev/Aegisub@400bb30 (This has been the first time I coded in C++. If this is too bad to be reviewed/fixed I am fine with someone else just redoing it. Also compilation only works under Linux as I was unable to update boost under Windows)

@CoffeeFlux
Copy link
Member

For the redirects, I'm not sure what the provider supports - I'll have to ask jfs. ftp.aegisub.org will probably just be moved to a fixed downloads page like you guessed, since I have no desire to run a public FTP server. The updater situation is slightly awkward and one of the last things I'd need to iron out before releasing a stable. If you ping me on Discord, I can explain.

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 a pull request may close this issue.

2 participants