termux / termux.github.io

The main termux site and help pages.
https://termux.github.io
883 stars 173 forks source link

Re-structure, pages/cn/ permalinks not used, layout. #90

Closed unique-EJ closed 1 year ago

unique-EJ commented 1 year ago

https://www.rubydoc.info/gems/jekyll-redirect-from/0.16.0#redirect-to

layout: redirect - customizing

If you want to customize the redirect template, you can. Simply create a layout in your site's _layouts directory called redirect.html.

agnostic-apollo commented 1 year ago

The redirect layout is provided by the redirect-from jekyll plugin. The termux.github.io had its own layout but it was removed in 9b83bc9, it also used different page. parameter keys than the jekyll plugin resulting in infinite redirect.

https://github.com/jekyll/jekyll-redirect-from/tree/master#customizing-the-redirect-template

https://github.com/jekyll/jekyll-redirect-from/blob/v0.16.0/lib/jekyll-redirect-from/redirect.html

The reason the Redirecting... splash screen is not shown is because of https://github.com/jekyll/jekyll-redirect-from/commit/97c2841d4b971c8e5b5b4f7d219891cd229c6636 and you can trigger it by disabling javascript in your browser.

Basically, do not set layout to null. Why are you even moving the pages to the root directory?

The pages/cn are all broken because of bad config. The community and issues pages don't have permalink defined, so their pages don't exist. The docs and posts pages do not have the redirect_to value defined, so it results in infinite redirect.

And why are you attempting to commit the _includes/page_data.html empty file and then remove it?

https://github.com/termux/termux.github.io/pull/90/commits/d0ddbdcef5404589d3a1cf8b5bdf6057224fae7e

https://github.com/termux/termux.github.io/pull/90/commits/532c33720633015565a0fe38a822164d32f8845a

unique-EJ commented 1 year ago

The redirect layout is provided by the redirect-from jekyll plugin. The termux.github.io had its own layout but it was removed in 9b83bc9, it also used different page. parameter keys than the jekyll plugin resulting in infinite redirect.

https://github.com/jekyll/jekyll-redirect-from/tree/master#customizing-the-redirect-template

https://github.com/jekyll/jekyll-redirect-from/blob/v0.16.0/lib/jekyll-redirect-from/redirect.html

The reason the Redirecting... splash screen is not shown is because of https://github.com/jekyll/jekyll-redirect-from/commit/97c2841d4b971c8e5b5b4f7d219891cd229c6636 and you can trigger it by disabling javascript in your browser.

-- okay.

Basically, do not set layout to null. Why are you even moving the pages to the root directory?

To make the structure better.

The pages/cn are all broken because of bad config. The community and issues pages don't have permalink defined, so their pages don't exist. The docs and posts pages do not have the redirect_to value defined, so it results in infinite redirect.

And why are you attempting to commit the _includes/page_data.html empty file and then remove it?

I don't want to commit it.

https://github.com/termux/termux.github.io/pull/90/commits/d0ddbdcef5404589d3a1cf8b5bdf6057224fae7e

https://github.com/termux/termux.github.io/pull/90/commits/532c33720633015565a0fe38a822164d32f8845a

unique-EJ commented 1 year ago

@agnostic-apollo

agnostic-apollo commented 1 year ago

To make the structure better.

Moving pages out of dedicated directories into root directory actually breaks the structure.

I don't want to commit it.

Then learn to edit commits and remove files, you can search on internet for answers on stackoverflow, etc. Can just soft reset and commit again or can use a GUI based tool like SublimeMerge, it has an option to Edit commit content, which allows you to unstage files in a commit and then delete them or make separate commits for unstages files to split commits.

https://github.com/termux/termux-packages/pull/13611#issuecomment-1376887294

Although, you don't need to do it since your changes are not acceptable anyways, the only changes acceptable would be fixups to pages/cn, if someone else doesn't do it, will do it myself later.