【问题标题】:Add dynamic description and canonical via Middleman and HAML通过 Middleman 和 HAML 添加动态描述和规范
【发布时间】:2016-12-06 17:40:26
【问题描述】:

尝试通过 HAML 向我的 Middleman App 文档的头部添加规范链接标签,但不知道如何做。

%link(rel="canonical" href="current_page.data.canonical")

使用 YAML 等

---
title: Swan Physio
description: This is the description
canonical : http://swanphysio.co.uk
---

【问题讨论】:

    标签: yaml haml middleman


    【解决方案1】:

    你可以这样做:

    %link(rel="canonical" href='http://example.com#{current_page.url}')
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-09-06
      • 1970-01-01
      • 2021-12-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多