Skip to content

Conversation

@gchtr
Copy link
Member

@gchtr gchtr commented Oct 29, 2023

This pull request prepares the docs for the 2.x release. It will be used in combination with timber/timber#2829.

  • Upgrades Eleventy.js from 1.x to 2.x
  • Makes /v2/ the default version by adding a redirect from https://timber.github.io/docs/ to https://timber.github.io/docs/v2/.
  • Adds an index file for 1.x in https://timber.github.io/docs/v1/.
  • Adds a version note that always displays which version you are currently reading.

Testing

This version of the docs can be tested when

  • The 2.x-prepare-release branch is checked out in a timber directory right next to the docs directory.
  • You use PHP 7.4 for the local docs testing site.

Then, from the docs folder, run npm run build. You then use npm run serve to check out the docs from the local web server address displayed in your terminal.

Copy link
Member

@Levdbas Levdbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work @gchtr ! I found a few small things one reviewing the docs. Some are not directly connected to this PR though but are small improvements.

@gchtr
Copy link
Member Author

gchtr commented Nov 3, 2023

@Levdbas Thanks a lot for your review!

Fixed in e3e7f7b.

  • .toc a might be better as a inline-block, so the link does not stretch over the full width of the page

Fixed in 3ccbb96

Yes, I thought about that, too. But then we would have to create redirects for all v1 pages from / to /v1/ to not break a whole lot links out there. I’m not sure whether it’s worth it.

@Levdbas
Copy link
Member

Levdbas commented Nov 3, 2023

Great work!

Yes, I thought about that, too. But then we would have to create redirects for all v1 pages from / to /v1/ to not break a whole lot links out there. I’m not sure whether it’s worth it.

Hmm, on the other hand. It seems that the v1 docs have more "weight" currently then the soon to be new major version.
I really like the bootstrap idea now I think of it: https://getbootstrap.com/ The homepage points to the latest docs at https://getbootstrap.com/docs/5.3/.

What if we put all v1 docs under the /v1/ slug and then redirect all traffic to the new /v2/ as a permanent redirect. Some links will then give a 404 since we changed slugs etc.

From there it might be easier to release a v3 in the future as well. I say, let's take the hit now if any and profit in the future.

let me know what you think!

@gchtr
Copy link
Member Author

gchtr commented Nov 3, 2023

Okay, you have a point here as well. It sure is cleaner for future versions and I didn’t consider the possible SEO hit yet. I guess for that to work, we would need to work through the following todos:

@Levdbas
Copy link
Member

Levdbas commented Nov 3, 2023

Gotcha! I will prepare a PR for the 2nd todo. That PR should be based on the 2.x branch right but for the /v1 docs.

@gchtr
Copy link
Member Author

gchtr commented Nov 3, 2023

Thanks for taking over the second task!

That PR should be based on the 2.x branch right but for the /v1 docs.

Yes!

@Levdbas
Copy link
Member

Levdbas commented Nov 3, 2023

Submitted at timber/timber#2836

@gchtr
Copy link
Member Author

gchtr commented Nov 3, 2023

@Levdbas Huh, I think I figured it all out. There’s a way in Eleventy to create pages from arrays, so the redirects should now be handled without us having to define them manually. I even managed to make it work so that if we release v3, all non-versioned links automatically point to v3.

I’ll have a look at your PR soon.

@gchtr
Copy link
Member Author

gchtr commented Nov 7, 2023

I added a fix for the archive pages in 11b2d7b. Maybe you can test it when you pull the latest timber-2.x from the docs repository.

CleanShot 2023-11-07 at 17 38 33

Except for the section titles in the nav bar when accessing an archive page, everything seems to work fine.

Copy link
Member

@Levdbas Levdbas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested a fix for the missing section titles, other that that we are good to go from what I can see!

@gchtr gchtr merged commit f4b50fb into master Nov 9, 2023
@gchtr gchtr deleted the timber-2.x branch November 9, 2023 06:45
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 this pull request may close these issues.

3 participants