mirror of
https://github.com/discourse/discourse.git
synced 2025-04-01 05:06:04 +08:00
DEV: declare post position as simple number in structured data (#16231)
This replaces the position declared as `#123` with the more simple version `123`. The property position may be of type Integer or Text. A value of type Integer, or more precise of type Text which simply casts to integer, is sufficient here. See: https://schema.org/position In category-view the topic-list already uses this notation for the position of topics: `<meta itemprop="position" content="123">`
This commit is contained in:
parent
64f7b97d08
commit
137dbaf0dc
app
spec/fixtures/onebox
@ -191,6 +191,9 @@ body > noscript {
|
||||
[itemprop="position"] {
|
||||
float: left;
|
||||
margin-right: 0.5em;
|
||||
&:before {
|
||||
content: "#";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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'>
|
||||
|
@ -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'>
|
||||
|
@ -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'>
|
||||
|
Loading…
x
Reference in New Issue
Block a user