unimal-jp / spear

The spear OSS repository
https://late-cloud-6411.spearly.app
MIT License
10 stars 1 forks source link

I would like to specify a third attribute within the spear-seo tag, such as specifying hlang for the link-alternate. #175

Open pandaulait opened 1 year ago

pandaulait commented 1 year ago

Is your feature request related to a problem? Please describe.

Describe the solution you'd like

I want to specify alternate in [alias].html like <link rel="alternate" hreflang="en" href="https://example.com/en/blog/content_alias.html" />, but I cannot specify the third attribute with spear -seo does not allow me to specify the third attribute.

<spear-seo
  link-alternate="[https://spearly.com/en/blog/{%=](https://spearly.com/en/blog/%7B%=) article_category %}/{%= article_#alias %}.html"
></spear-seo>

I've heard that cannonical is the least of the problems, but Google's best practice says that alternate should be set, so please consider this as well!

Generated
<link rel="alternate" href="https://spearly.com/en/blog/contents/post-9.html">

What we would like to be able to generate
<link rel="alternate" hreflang="en" href="https://spearly.com/en/blog/features/post-1234.html" />

<link rel="alternate" hreflang="en" href="https://example.com/en/blog/content_alias.html" />のように[alias].html内でalternateを指定したいが、spear-seoだと3つ目の属性を指定できない。

<spear-seo
  link-alternate="[https://spearly.com/en/blog/{%=](https://spearly.com/en/blog/%7B%=) article_category %}/{%= article_#alias %}.html"
></spear-seo>

cannonicalがあれば最低限問題はないらしいのですが、Googleのベストプラクティス的にはalternateを設定するべきらしいので検討もお願いしたいです

生成されたもの
<link rel="alternate" href="https://spearly.com/en/blog/contents/post-9.html">

生成できてほしいもの
<link rel="alternate" hreflang="en" href="https://spearly.com/en/blog/features/post-1234.html" />

Describe alternatives you've considered A clear and concise description of any alternative solutions or features you've considered.

Additional context Add any other context or screenshots about the feature request here.