Skip to content

Commit

Permalink
fix(view): don't render title as <h1> on index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
ppoffice committed Feb 18, 2023
1 parent 41d9716 commit 2a57ea4
Showing 1 changed file with 2 additions and 3 deletions .
5 changes: 2 additions & 3 deletions layout/common/article.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,8 @@ module.exports = class extends Component {
< / div >
< / div > : null }
{ /* Title */ }
{ page . title !== '' ? < h1 class = "title is-3 is-size-4-mobile" >
{ index ? < a class = "link-muted" href = { url_for ( page . link || page . path ) } > { page . title } < / a > : page . title }
< / h1 > : null }
{ page . title !== '' && index ? < p class = "title is-3 is-size-4-mobile" > < a class = "link-muted" href = { url_for ( page . link || page . path ) } > { page . title } < / a > < / p > : null }
{ page . title !== '' && ! index ? < h1 class = "title is-3 is-size-4-mobile" > { page . title } < / h1 > : null }
{ /* Content/Excerpt */ }
< div class = "content" dangerouslySetInnerHTML = { { __html : index && page . excerpt ? page . excerpt : page . content } } > < / div >
{ /* Licensing block */ }
Expand Down

1 comment on commit 2a57ea4

 @ppoffice
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more .

Please sign in to comment.