File tree Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Expand file tree Collapse file tree 1 file changed +14
-6
lines changed Original file line number Diff line number Diff line change @@ -102,12 +102,20 @@ fn create_chunk_req_payload(
102
102
variant. id
103
103
) ;
104
104
105
- let mut chunk_html = format ! (
106
- "<h1>{} - {}</h1>{}" ,
107
- product. title. clone( ) . unwrap_or_default( ) ,
108
- variant. title. clone( ) . unwrap_or_default( ) ,
109
- product. body_html. clone( ) . unwrap_or_default( )
110
- ) ;
105
+ let mut chunk_html = if variant. title == "Default Title" {
106
+ format ! (
107
+ "<h1>{}</h1>{}" ,
108
+ product. title. clone( ) . unwrap_or_default( ) ,
109
+ product. body_html. clone( ) . unwrap_or_default( )
110
+ )
111
+ } else {
112
+ format ! (
113
+ "<h1>{} - {}</h1>{}" ,
114
+ product. title. clone( ) . unwrap_or_default( ) ,
115
+ variant. title. clone( ) . unwrap_or_default( ) ,
116
+ product. body_html. clone( ) . unwrap_or_default( )
117
+ )
118
+ } ;
111
119
112
120
if let Some ( ScrapeOptions :: Shopify ( CrawlShopifyOptions {
113
121
tag_regexes : Some ( tag_regexes) ,
You can’t perform that action at this time.
0 commit comments