schema.org features #942
Replies: 2 comments 3 replies
-
Sorry for the late response (I just notice this, I thought it just a comment of the demo site), I didn't have experience with this, could you provide related docs/reference about this? What I saw is that output a |
Beta Was this translation helpful? Give feedback.
-
Hi @razonyang This is schema.org markup, specifically the ones described in this google structured data There's a feature guides that goes into further details. Here's a toml page front matter, if you schema_enabled = true and the fields are filled out, they will show up. #ARTICLE SCHEMA
article_schema_enabled = false
article_schema_title = "Title of a News Article"
article_schema_date = 2023-05-10T08:00:00
article_schema_lastmod = 2023-05-10T09:20:00
article_schema_headline = "Title of a News Article"
article_schema_images = [
"https://example.com/photos/1x1/photo.jpg",
"https://example.com/photos/4x3/photo.jpg",
"https://example.com/photos/16x9/photo.jpg"
]
article_schema_date_published = "2015-02-05T08:00:00+08:00"
article_schema_date_modified = "2015-02-05T09:20:00+08:00"
article_schema_authors = [
{name = "Jane Doe", url = "https://example.com/profile/janedoe123"},
{name = "John Doe", url = "https://example.com/profile/johndoe123"}
]
article_schema_publisher_name = "The Daily Bug"
article_schema_publisher_url = "https://www.example.com"
#HOWTO SCHEMA
howto_schema_enabled = false
howto_schema_name = "How to tile a kitchen backsplash"
howto_schema_image_url = "https://example.com/photos/1x1/photo.jpg"
howto_schema_image_height = "406"
howto_schema_image_width = "305"
howto_schema_estimated_cost_currency = "USD"
howto_schema_estimated_cost_value = "100"
howto_schema_supplies = ["tiles", "thin-set mortar", "tile grout", "grout sealer"]
howto_schema_tools = ["notched trowel", "bucket", "large sponge"]
howto_schema_steps = [
{name = "Prepare the surfaces", url = "https://example.com/kitchen#step1", directions = ["Turn off the power to the kitchen and then remove everything that is on the wall, such as outlet covers, switchplates, and any other item in the area that is to be tiled.", "Then clean the surface thoroughly to remove any grease or other debris and tape off the area."], image_url = "https://example.com/photos/1x1/photo-step1.jpg", image_height = "406", image_width = "305"},
{name = "Plan your layout", url = "https://example.com/kitchen#step2", directions = ["The creases created up until this point will be guiding lines for creating the four walls of your planter box.", "Lift one side at a 90-degree angle, and fold it in place so that the point on the paper matches the other two points already in the center.", "Repeat on the other side."], image_url = "https://example.com/photos/1x1/photo-step2.jpg", image_height = "406", image_width = "305"},
{name = "Prepare your and apply mortar (or choose adhesive tile)", url = "https://example.com/kitchen#step3", directions = ["Follow the instructions on your thin-set mortar to determine the right amount of water to fill in your bucket. Once done, add the powder gradually and make sure it is thoroughly mixed.", "Once mixed, let it stand for a few minutes before mixing it again. This time do not add more water. Double check your thin-set mortar instructions to make sure the consistency is right.", "Spread the mortar on a small section of the wall with a trowel.", "Thinset and other adhesives set quickly so make sure to work in a small area.", "Once it's applied, comb over it with a notched trowel."], image_url = "https://example.com/photos/1x1/photo-step3.jpg", image_height = "406", image_width = "305"},
{name = "Add your tile to the wall", url = "https://example.com/kitchen#step4", directions = ["Place the tile sheets along the wall, making sure to add spacers so the tiles remain lined up.", "Press the first piece of tile into the wall with a little twist, leaving a small (usually one-eight inch) gap at the countertop to account for expansion. use a rubber float to press the tile and ensure it sets in the adhesive.", "Repeat the mortar and tiling until your wall is completely tiled, Working in small sections."], image_url = "https://example.com/photos/1x1/photo-step4.jpg", image_height = "406", image_width = "305"},
{name = "Apply the grout", url = "https://example.com/kitchen#step5", directions = ["Allow the thin-set mortar to set. This usually takes about 12 hours. Don't mix the grout before the mortar is set, because you don't want the grout to dry out!", "To apply, cover the area thoroughly with grout and make sure you fill all the joints by spreading it across the tiles vertically, horizontally, and diagonally. Then fill any remaining voids with grout.", "Then, with a moist sponge, sponge away the excess grout and then wipe clean with a towel. For easier maintenance in the future, think about applying a grout sealer."], image_url = "https://example.com/photos/1x1/photo-step5.jpg", image_height = "406", image_width = "305" },
]
howto_schema_total_time = "P2D"
#FACT-CHECK SCHEMA
fact_check_schema_enabled = false
fact_check_schema_url = "https://example.com/news/science/worldisflat.html"
fact_check_schema_claim_reviewed = "The world is flat"
fact_check_schema_item_author_type = "Organization"
fact_check_schema_item_author_name = "Square World Society"
fact_check_schema_item_author_same_as = "https://example.flatworlders.com/we-know-that-the-world-is-flat"
fact_check_schema_item_date_published = "2016-06-20"
fact_check_schema_appearance_type = "OpinionNewsArticle"
fact_check_schema_appearance_url = "https://example.com/news/a122121"
fact_check_schema_appearance_headline = "Square Earth - Flat earthers for the Internet age"
fact_check_schema_appearance_date_published = "2016-06-22"
fact_check_schema_appearance_author_type = "Person"
fact_check_schema_appearance_author_name = "T. Tellar"
fact_check_schema_appearance_image = "https://example.com/photos/1x1/photo.jpg"
fact_check_schema_appearance_publisher_type = "Organization"
fact_check_schema_appearance_publisher_name = "Skeptical News"
fact_check_schema_appearance_publisher_logo_type = "ImageObject"
fact_check_schema_appearance_publisher_logo_url = "https://example.com/logo.jpg"
fact_check_schema_author_type = "Organization"
fact_check_schema_author_name = "Example.com science watch"
fact_check_schema_review_rating_type = "Rating"
fact_check_schema_review_rating_value = 1
fact_check_schema_review_best_rating = 5
fact_check_schema_review_worst_rating = 1
fact_check_schema_review_alternate_name = "False"
#FAQ SCHEMA
faq_schema_enabled = false
faq_schema_questions = [
{ faq_schema_question = "how old is the sun?", faq_schema_answer = "the sun is very old." },
{ faq_schema_question = "what color is red?", faq_schema_answer = "red is a warm and vibrant color" },
{ faq_schema_question = "is this a test?", faq_schema_answer = "no, this is not a test" },
{ faq_schema_question = "how old are you?", faq_schema_answer = "i am this many years old" },
]
#VIDEO METADATA SCHEMA
video_schema_enabled = false
video_schema_title = "Video Page"
video_schema_video_name = "A Sample Video"
video_schema_video_description = "A short description of the video."
video_schema_thumbnail_url = "https://example.com/thumbnails/sample-video-thumbnail.jpg"
video_schema_upload_date = "2023-05-10"
video_schema_duration = "PT2M30S"
video_schema_content_url = "https://example.com/videos/sample-video.mp4"
video_schema_embed_url = "https://www.example.com/embed/sample-video"
video_schema_author_name = "John Doe"
video_schema_publisher_name = "Example Video"
video_schema_publisher_logo_url = "https://example.com/images/logo.png"
video_schema_publisher_logo_height = 60
video_schema_publisher_logo_width = 300
#IMAGE METADATA SCHEMA
image_metadata_schema_enabled = false
image_metadata_schema = [
{ image_schema_contentUrl = "https://example.com/photos/1x1/black-labrador-puppy.jpg", image_schema_license = "https://example.com/license", image_schema_acquireLicensePage = "https://example.com/how-to-use-my-images", image_schema_creditText = "Labrador PhotoLab", image_schema_creator_name = "Brixton Brownstone", image_schema_copyrightNotice = "Clara Kent" },
{ image_schema_contentUrl = "https://example.com/photos/1x1/black-labrador-puppy.jpg", image_schema_license = "https://example.com/license", image_schema_acquireLicensePage = "https://example.com/how-to-use-my-images", image_schema_creditText = "Labrador PhotoLab", image_schema_creator_name = "Brixton Brownstone", image_schema_copyrightNotice = "Clara Kent" },
{ image_schema_contentUrl = "https://example.com/photos/1x1/black-labrador-puppy.jpg", image_schema_license = "https://example.com/license", image_schema_acquireLicensePage = "https://example.com/how-to-use-my-images", image_schema_creditText = "Labrador PhotoLab", image_schema_creator_name = "Brixton Brownstone", image_schema_copyrightNotice = "Clara Kent" },
{ image_schema_contentUrl = "https://example.com/photos/1x1/black-labrador-puppy.jpg", image_schema_license = "https://example.com/license", image_schema_acquireLicensePage = "https://example.com/how-to-use-my-images", image_schema_creditText = "Labrador PhotoLab", image_schema_creator_name = "Brixton Brownstone", image_schema_copyrightNotice = "Clara Kent" }
]
#PRODUCT REVIEW SCHEMA
product_schema_enabled = false
product_schema_name = "Executive Anvil"
product_schema_image = ["https://example.com/photos/1x1/photo.jpg", "https://example.com/photos/4x3/photo.jpg", "https://example.com/photos/16x9/photo.jpg"]
product_schema_description = "Sleeker than ACME's Classic Anvil, the Executive Anvil is perfect for the business traveler looking for something to drop from a height."
product_schema_sku = "0446310786"
product_schema_mpn = "925872"
product_schema_brand_name = "ACME"
product_schema_review_author_name = "Fred Benson"
product_schema_review_rating_value = 4
product_schema_review_best_rating = 5
product_schema_aggregate_rating_value = 4.4
product_schema_aggregate_review_count = 89
product_schema_offers_offer_count = 5
product_schema_offers_low_price = 119.99
product_schema_offers_high_price = 199.99
product_schema_offers_price_currency = "USD" I've also implemented sitemapsearch, breadcrumblist, organization schemas. These are configured in the config.toml sitelink_search_target = "https://domain.com/search?q={search_term_string}"
[params.organization]
name = "Upcomingtrader Trading"
url = "https://upcomingtrader.com"
logo = "https://avatars.githubusercontent.com/u/128974941"
sameas = [
"https://youtube.com/username",
"https://twitter.com/username"
]
breadcrumb_position = ["/:1", "/home:1", "/posts:2", "/contact:3", "/about:4"]
breadcrumb_excludes = [] you can configure the breadcrumblist positions to force certain urls to have a position in the list, you can use breadcrumb_excludes to prevent certain urls from appearing in the breadcrumblist I also added a feature where you can append user generated content, nofollow, sponsored, canonical rel to links by appending ///ugc,nofollow,canonical to the end of markdown urls. If you have any questions you can ask for clarification. |
Beta Was this translation helpful? Give feedback.
-
Hello
I wanted to assist in creating some schema.org sections and wanted to start off with a fairly simple one; faq schema.
I know that you have a faq section but I would like to add this faq schema to each posts if necessary.
I already created the partial: https://github.com/upcomingtradera/hugo-theme-bootstrap/commit/3b57ded62f722e98f085c7f694ec1698b9068ebc
I'd like to get your feedback as where to put this so that it can be merged upstream?
Beta Was this translation helpful? Give feedback.
All reactions