New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meta.title and meta.description only renders first character #553

Closed
martinbira opened this Issue Nov 1, 2017 · 3 comments

Comments

Projects
None yet
3 participants
@martinbira
Contributor

martinbira commented Nov 1, 2017

Description

The content in <title></title> and <description></description> derived from the page meta title and description only consist of the first character for the page meta value.

Expected behavior

<title></title> should consist of full content from the page meta title
<description></description> should consist of full content from the page meta description

Actual behavior

<title></title> consist of only the first character from the page meta title
<description></description> consist of only the first character from the page meta description

Steps to reproduce the bug

  1. In page.md set the following meta data:
---
title: Page title
description: Page description
---
  1. Verify that mkdocs builds page.
  2. Check page source for <title>P</title> and <description>P</description>

Package versions

  • Python: 3.6.1
  • MkDocs: 0.17.1
  • Material: 2.01

System information

  • OS: Windows 10

@martinbira martinbira changed the title from meta.title only renders first letter in title-tag to meta.title and meta.description only renders first character Nov 1, 2017

@coliff

This comment has been minimized.

Show comment
Hide comment
@coliff

coliff Nov 1, 2017

Contributor

I could reproduce this issue but it's easily fixed by using the following:

---
page.title: Page title
page.description: Page description
---

I got those variable names from the MkDocs 0.17.0 Release Notes:
http://www.mkdocs.org/about/release-notes/#version-0170-2017-10-19

Contributor

coliff commented Nov 1, 2017

I could reproduce this issue but it's easily fixed by using the following:

---
page.title: Page title
page.description: Page description
---

I got those variable names from the MkDocs 0.17.0 Release Notes:
http://www.mkdocs.org/about/release-notes/#version-0170-2017-10-19

@coliff

This comment has been minimized.

Show comment
Hide comment
@coliff

coliff Nov 1, 2017

Contributor

An update from me. I realised that using the above does correctly populates the title and description - but it also adds the title and description within the HTML of the page. Looks like a bug.

Using the following works though:

---
page_title: Page title
page_description: Page description
---
Contributor

coliff commented Nov 1, 2017

An update from me. I realised that using the above does correctly populates the title and description - but it also adds the title and description within the HTML of the page. Looks like a bug.

Using the following works though:

---
page_title: Page title
page_description: Page description
---
@squidfunk

This comment has been minimized.

Show comment
Hide comment
@squidfunk

squidfunk Nov 1, 2017

Owner

Fixed in #554, release will follow today.

Owner

squidfunk commented Nov 1, 2017

Fixed in #554, release will follow today.

@squidfunk squidfunk self-assigned this Nov 1, 2017

@squidfunk squidfunk closed this Nov 1, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment