File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change 3737
3838{% if page.description %}
3939 {% assign seo_description = page.description %}
40+ {% elsif page.excerpt %}
41+ {% assign seo_description = page.excerpt %}
4042{% elsif site.description %}
4143 {% assign seo_description = site.description %}
4244{% endif %}
Original file line number Diff line number Diff line change 3939 expect ( subject . render ( context ) ) . to match ( /<meta property='og:description' content="foo" \/ >/ )
4040 end
4141
42- it "uses the site description when no page description exists" do
42+ it "uses the page excerpt when no page description exists" do
43+ page = page ( { "description" => "foobar" } )
44+ context = context ( { :page => page } )
45+ expect ( subject . render ( context ) ) . to match ( /<meta name="description" content="foobar" \/ >/ )
46+ expect ( subject . render ( context ) ) . to match ( /<meta property='og:description' content="foobar" \/ >/ )
47+ end
48+
49+ it "uses the site description when no page description nor excerpt exist" do
4350 site = site ( { "description" => "foo" } )
4451 context = context ( { :site => site } )
4552 expect ( subject . render ( context ) ) . to match ( /<meta name="description" content="foo" \/ >/ )
You can’t perform that action at this time.
0 commit comments