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

Update migrated blog slugs #638

Open
noatamir opened this issue Jan 26, 2023 · 5 comments
Open

Update migrated blog slugs #638

noatamir opened this issue Jan 26, 2023 · 5 comments
Labels
labs 🔭 Items related to the Labs website type: content 📝

Comments

@noatamir
Copy link
Contributor

It would be useful to go through all blog slugs and update them, so they are all:

  • Lower caps
  • Separated by hyphens rather than underscores
  • Don't have overly generic names

Some examples are listed in @gabalafou's comment here.

@noatamir noatamir added labs 🔭 Items related to the Labs website type: content 📝 labels Jan 26, 2023
@gabalafou
Copy link
Contributor

On the subject, while I'm thinking about it, we might want to add a redirect rule that captures all of the old links and forwards them to the new link, like so: /blog/year/month/slug -> /blog/slug. Or maybe rethink the way we've been doing blog slugs on the new site.

@noatamir
Copy link
Contributor Author

Indeed! I was just asking @MarsBarLee about it on another PR because I think she mentioned that the CI is adding them or “fixing” redirects and I saw no evidence of that.
Can we prioritize it since there are a lot of blog2blog links that need manual updating otherwise?

@bskinn
Copy link
Contributor

bskinn commented Jan 26, 2023

the CI is adding them or “fixing” redirects and I saw no evidence of that.

Agreed, CI is not doing anything of the sort that I can tell. I've been adding all my redirects manually to next.config.js.

Regardless of what decision is made on the Labs blog slug paradigm, I'm thinking that it would be good to implement something cleaner for "simple" redirects like these for the blogs (esp. for Consulting blog), where for now each redirect is an explicit entry in the redirects entity in next.config.js. It would be more clear, simpler, and more DRY to have a separate file... simple-redirects.js or whatever ... that had all the redirect definitions in it, and then code in next.config.js that pulled that new JS file in and used its contents to autoinject the needed suite of redirects into redirects.

If folks like this, I can create an issue for it.

@gabalafou
Copy link
Contributor

Just to make sure we're on the same page, you're proposing an explicit redirect table like the following, right?

Old URL Redirects to
https://labs.quansight.org/blog/2019/08/spyder-40-beta4-kite-integration-is-here https://labs.quansight.org/blog/spyder-40-beta4-kite-integration-is-here
https://labs.quansight.org/blog/2021/09/not-a-checklist https://labs.quansight.org/blog/not-a-checklist
and so on... and so forth...

That seems like the simplest way to do it (and possibly least error-prone, despite the volume of entries). I'm +1 on that.

@bskinn
Copy link
Contributor

bskinn commented Jan 26, 2023

Yes, exactly that semantics @gabalafou. Though probably it would exist in code as a mapping?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
labs 🔭 Items related to the Labs website type: content 📝
Projects
None yet
Development

No branches or pull requests

3 participants