Problem/Motivation

Avoid 1 redirect.

Steps to reproduce

Front page with pager.
Inspect the 'next', 'first', 'last', ... HTML head links and notice they use more than just the front page URL.
They append it with 'node/' or its alias.

Proposed resolution

Generate URL from '<front>' instead of '<current>' when on front page.
Use code like this in rocketship_seo_preprocess() :

// For the front page, prefer the front page alias over the node alias.
$route_name = \Drupal::service('path.matcher')->isFrontPage() ? '<front>' : '<current>';

Remaining tasks

Create patch.

User interface changes

None.

API changes

None.

Data model changes

None.

Comments

PieterDC created an issue. See original summary.

pieterdc’s picture

Issue summary: View changes

  • rembrandx committed cae9968 on 5.x
    Issue #3188558 by PieterDC: On front page, make HTML head pager links...

  • rembrandx committed 7028a3c on 6.x
    Issue #3183006 by PieterDC: '\''Last'\'' link in HTML head always...
rembrandx’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.