This repository was archived by the owner on Jul 25, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1414 "dateModified": @article.updated_at.iso8601,
1515 "author": {
1616 "@type": "Person",
17- "name": @article.author_name.presence || "Maybe Finance"
18- },
17+ "name": @article.author&.name || @article.author_name.presence || "Maybe Finance",
18+ "url": @article.author ? author_url(@article.author) : nil,
19+ "jobTitle": @article.author&.position
20+ }.compact,
1921 "publisher": {
2022 "@type": "Organization",
2123 "name": "Maybe Finance",
Original file line number Diff line number Diff line change 11<%
22 title "Personal Finance Authors"
33 description "Meet the experts behind our personal finance content."
4+
5+ content_for :schema_data do
6+ authors_list_schema = {
7+ "@context": "https://schema.org",
8+ "@type": "ItemList",
9+ "name": "Personal Finance Authors",
10+ "description": "Meet the experts behind our personal finance content.",
11+ "itemListElement": @authors.map.with_index do |author, index|
12+ {
13+ "@type": "ListItem",
14+ "position": index + 1,
15+ "item": {
16+ "@type": "Person",
17+ "name": author.name,
18+ "url": author_url(author),
19+ "jobTitle": author.position,
20+ "description": author.bio,
21+ "image": author.avatar_url
22+ }.compact
23+ }
24+ end
25+ }
26+
27+ concat(tag.script(authors_list_schema.to_json.html_safe, type: "application/ld+json"))
28+ end
429%>
530 <div class ="bg-contain bg-[left_0_top_0] bg-no-repeat " style ="background-image: url(<%= asset_path ( 'articles-bg.svg' ) %> ) ">
631 < div class ="max-w-[1100px] mx-auto ">
Original file line number Diff line number Diff line change 11<%
22 title @author.name
33 description @author.bio || "Read articles and content by #{@author.name}"
4+
5+ content_for :schema_data do
6+ author_schema = {
7+ "@context": "https://schema.org",
8+ "@type": "Person",
9+ "name": @author.name,
10+ "url": author_url(@author),
11+ "jobTitle": @author.position,
12+ "description": @author.bio,
13+ "image": @author.avatar_url,
14+ "sameAs": @author.social_links&.values&.compact || [],
15+ "worksFor": {
16+ "@type": "Organization",
17+ "name": "Maybe Finance",
18+ "url": "https://maybefinance.com"
19+ }
20+ }.compact
21+
22+ concat(tag.script(author_schema.to_json.html_safe, type: "application/ld+json"))
23+ end
424%>
525 <div class ="bg-contain bg-[left_0_top_0] bg-no-repeat " style ="background-image: url(<%= asset_path ( 'articles-bg.svg' ) %> ) ">
626 < div class ="max-w-[1100px] mx-auto ">
Original file line number Diff line number Diff line change 1616 "acceptedAnswer": {
1717 "@type": "Answer",
1818 "text": strip_tags(@faq.answer),
19- "dateCreated": @faq.created_at.iso8601
20- }
19+ "dateCreated": @faq.created_at.iso8601,
20+ "author": @faq.author ? {
21+ "@type": "Person",
22+ "name": @faq.author.name,
23+ "url": author_url(@faq.author),
24+ "jobTitle": @faq.author.position
25+ }.compact : nil
26+ }.compact
2127 }
2228 }
2329
Original file line number Diff line number Diff line change 1919 "headline": @term.name.presence || "#{@term.name} meaning in personal finance",
2020 "description": article_description,
2121 "author": {
22- "@type": "Organization",
23- "name": "Maybe"
24- },
22+ "@type": @term.author ? "Person" : "Organization",
23+ "name": @term.author&.name || "Maybe",
24+ "url": @term.author ? author_url(@term.author) : nil,
25+ "jobTitle": @term.author&.position
26+ }.compact,
2527 "publisher": {
2628 "@type": "Organization",
2729 "name": "Maybe",
You can’t perform that action at this time.
0 commit comments