readthedocs / website

The Read the Docs community website
15 stars 5 forks source link

Use filename as slug source #261

Closed stsewd closed 4 months ago

stsewd commented 4 months ago

By default, the title of the article is used as the slug, if the title is changed, the slug will be updated, and the URL of the article will be changed, leading to a 404.

Our previous blog used the filename as the slug, I like that.

If we agree, I can set slug explicitly for the articles that are already published or maybe create a redirect.


📚 Documentation preview 📚: https://read-the-docs-website--261.com.readthedocs.build/

stsewd commented 4 months ago

Got the diff from all the filenames before and after the change

$ diff a.txt b.txt
7,8c7,8
< output/blog/2024/02/read-the-docs-newsletter-february-2024
< output/blog/2024/02/read-the-docs-newsletter-february-2024/index.html
---
> output/blog/2024/02/newsletter-february-2024
> output/blog/2024/02/newsletter-february-2024/index.html
32a33,34
> output/drafts/2022-war-in-ukraine.html
> output/drafts/newsletter-march-2022.html
37,38d38
< output/drafts/read-the-docs-newsletter-march-2022.html
< output/drafts/war-in-ukraine-and-what-it-means-for-read-the-docs.html

Only the newsletter needs a redirect, I'll create one.

stsewd commented 4 months ago

Also, I'm still deleting branches manually, can we enable the "delete heads branches after merge" option in the repo? :)

agjohnson commented 4 months ago

Yeah, feel free to enable. I don't think we have a reason not to, just never set it up.

stsewd commented 4 months ago

@agjohnson I don't have permissions on this project.

agjohnson commented 4 months ago

Oops, try now. I added core team with admin permissions.

stsewd commented 4 months ago

All set now :+1: