A platform for community discussion. Free, open, simple.
DEV: declare post position as simple number in structured data (#16231)
Ayke Halder137dbaf0dca9
diff --git a/app/assets/stylesheets/common/base/crawler_layout.scss b/app/assets/stylesheets/common/base/crawler_layout.scssindex cedb89fd949..934f4536c85 100644--- a/app/assets/stylesheets/common/base/crawler_layout.scss+++ b/app/assets/stylesheets/common/base/crawler_layout.scss@@ -191,6 +191,9 @@ body > noscript {[itemprop="position"] {float: left;margin-right: 0.5em;+ &:before {+ content: "#";+ }}}diff --git a/app/views/topics/show.html.erb b/app/views/topics/show.html.erbindex 65c12933c96..aed2a9a7225 100644--- a/app/views/topics/show.html.erb+++ b/app/views/topics/show.html.erb@@ -75,7 +75,7 @@<% else %><meta itemprop='dateModified' content='<%= post.created_at.to_formatted_s(:iso8601) %>'><% end %>- <span itemprop='position'>#<%= post.post_number %></span>+ <span itemprop='position'><%= post.post_number %></span></span></div><div class='post' itemprop='articleBody'>diff --git a/spec/fixtures/onebox/discourse_topic.response b/spec/fixtures/onebox/discourse_topic.responseindex 2d79976ba81..59d61bacd7a 100644--- a/spec/fixtures/onebox/discourse_topic.response+++ b/spec/fixtures/onebox/discourse_topic.response@@ -257,7 +257,7 @@ And that too in just over an year, way to go! [boom]"><time itemprop='dateModified' datetime='2015-06-19T06:45:49Z' class='post-time'>June 19, 2015, 6:45am</time>- <span itemprop='position'>#1</span>+ <span itemprop='position'>1</span></span></div><div class='post' itemprop='articleBody'>@@ -296,7 +296,7 @@ And that too in just over an year, way to go! [boom]"><time itemprop='datePublished' datetime='2014-02-06T05:27:06Z' class='post-time'>February 6, 2014, 5:27am</time>- <span itemprop='position'>#2</span>+ <span itemprop='position'>2</span></span></div><div class='post' itemprop='articleBody'>diff --git a/spec/fixtures/onebox/discourse_topic_reply.response b/spec/fixtures/onebox/discourse_topic_reply.responseindex 2412540fbec..4e7162e0954 100644--- a/spec/fixtures/onebox/discourse_topic_reply.response+++ b/spec/fixtures/onebox/discourse_topic_reply.response@@ -249,7 +249,7 @@ And that too in just over an year, way to go! [boom]"><time itemprop='dateModified' datetime='2015-06-19T06:45:49Z' class='post-time'>June 19, 2015, 6:45am</time>- <span itemprop='position'>#1</span>+ <span itemprop='position'>1</span></span></div><div class='post' itemprop='articleBody'>@@ -288,7 +288,7 @@ And that too in just over an year, way to go! [boom]"><time itemprop='datePublished' datetime='2014-02-06T05:27:06Z' class='post-time'>February 6, 2014, 5:27am</time>- <span itemprop='position'>#2</span>+ <span itemprop='position'>2</span></span></div><div class='post' itemprop='articleBody'>