You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+262Lines changed: 262 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -631,6 +631,268 @@ Use these formats for time durations:
631
631
632
632
[↑ Back to Components](#-components-by-category)
633
633
634
+
### HowToJsonLd
635
+
636
+
The `HowToJsonLd` component helps you add structured data for how-to guides and tutorials. This can help your content appear as rich results with step-by-step instructions in search results.
637
+
638
+
#### Basic Usage
639
+
640
+
```tsx
641
+
import { HowToJsonLd } from"next-seo";
642
+
643
+
exportdefaultfunction HowToPage() {
644
+
return (
645
+
<>
646
+
<HowToJsonLd
647
+
name="How to Change a Flat Tire"
648
+
description="Step-by-step instructions for safely changing a flat tire"
649
+
image="https://example.com/tire-change.jpg"
650
+
totalTime="PT30M"
651
+
estimatedCost="$20"
652
+
supply={["Spare tire", "Wheel wedges"]}
653
+
tool={["Lug wrench", "Jack"]}
654
+
step={[
655
+
"Turn on hazard lights and apply wheel wedges",
656
+
"Remove the hubcap and loosen lug nuts",
657
+
"Position jack and raise the vehicle",
658
+
"Remove flat tire and mount spare",
659
+
"Lower vehicle and tighten lug nuts",
660
+
]}
661
+
/>
662
+
<article>
663
+
<h1>How to Change a Flat Tire</h1>
664
+
{/* Guide content */}
665
+
</article>
666
+
</>
667
+
);
668
+
}
669
+
```
670
+
671
+
#### Advanced Example with Sections and Detailed Steps
672
+
673
+
```tsx
674
+
<HowToJsonLd
675
+
name="How to Change a Flat Tire"
676
+
description="Complete guide to safely changing a flat tire on the roadside"
677
+
image={{
678
+
url: "https://example.com/tire-change-guide.jpg",
679
+
width: 1200,
680
+
height: 800,
681
+
}}
682
+
estimatedCost={{
683
+
currency: "USD",
684
+
value: 20,
685
+
}}
686
+
prepTime="PT5M"
687
+
performTime="PT25M"
688
+
totalTime="PT30M"
689
+
yield="1 changed tire"
690
+
tool={[
691
+
{
692
+
name: "Spare tire",
693
+
},
694
+
{
695
+
name: "Lug wrench",
696
+
image: "https://example.com/lug-wrench.jpg",
697
+
},
698
+
{
699
+
name: "Jack",
700
+
},
701
+
{
702
+
name: "Wheel wedges",
703
+
image: "https://example.com/wheel-wedges.jpg",
704
+
},
705
+
]}
706
+
supply={[
707
+
{
708
+
name: "Flares",
709
+
image: "https://example.com/flares.jpg",
710
+
},
711
+
]}
712
+
step={[
713
+
{
714
+
"@type": "HowToSection",
715
+
name: "Preparation",
716
+
position: 1,
717
+
itemListElement: [
718
+
{
719
+
"@type": "HowToStep",
720
+
position: 1,
721
+
itemListElement: [
722
+
{
723
+
"@type": "HowToDirection",
724
+
position: 1,
725
+
text: "Turn on your hazard lights and set the flares.",
726
+
},
727
+
{
728
+
"@type": "HowToTip",
729
+
position: 2,
730
+
text: "You're going to need space and want to be visible.",
731
+
},
732
+
],
733
+
},
734
+
{
735
+
"@type": "HowToStep",
736
+
position: 2,
737
+
itemListElement: [
738
+
{
739
+
"@type": "HowToDirection",
740
+
position: 1,
741
+
text: "Position wheel wedges in front of front tires if rear tire is flat, or behind rear tires if front tire is flat.",
742
+
},
743
+
{
744
+
"@type": "HowToTip",
745
+
position: 2,
746
+
text: "You don't want the car to move while you're working on it.",
747
+
},
748
+
],
749
+
},
750
+
],
751
+
},
752
+
{
753
+
"@type": "HowToSection",
754
+
name: "Raise the Car",
755
+
position: 2,
756
+
itemListElement: [
757
+
{
758
+
"@type": "HowToStep",
759
+
position: 1,
760
+
text: "Position the jack underneath the car, next to the flat tire.",
761
+
image: "https://example.com/position-jack.jpg",
762
+
},
763
+
{
764
+
"@type": "HowToStep",
765
+
position: 2,
766
+
text: "Raise the jack until the flat tire is just barely off of the ground.",
767
+
},
768
+
{
769
+
"@type": "HowToStep",
770
+
position: 3,
771
+
text: "Remove the hubcap and loosen the lug nuts.",
772
+
},
773
+
],
774
+
},
775
+
{
776
+
"@type": "HowToSection",
777
+
name: "Finishing Up",
778
+
position: 3,
779
+
itemListElement: [
780
+
{
781
+
"@type": "HowToStep",
782
+
position: 1,
783
+
text: "Lower the jack and tighten the lug nuts with the wrench.",
784
+
},
785
+
{
786
+
"@type": "HowToStep",
787
+
position: 2,
788
+
text: "Replace the hubcap.",
789
+
},
790
+
{
791
+
"@type": "HowToStep",
792
+
position: 3,
793
+
text: "Put the equipment and the flat tire away.",
794
+
},
795
+
],
796
+
},
797
+
]}
798
+
video={{
799
+
name: "How to Change a Tire Video Tutorial",
800
+
description: "Watch our mechanic demonstrate the proper technique",
2.**Include images**: Add images for complex steps to improve clarity
889
+
3.**Separate sections**: Use HowToSection to group related steps logically
890
+
4.**Accurate timing**: Provide realistic time estimates for each phase
891
+
5.**List all materials**: Include all supplies and tools needed upfront
892
+
6.**Add video**: Video content significantly improves search appearance
893
+
894
+
[↑ Back to Components](#-components-by-category)
895
+
634
896
### OrganizationJsonLd
635
897
636
898
The `OrganizationJsonLd` component helps you add structured data about your organization to improve how it appears in search results and knowledge panels.
0 commit comments