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: scripts/build.py
+24-1Lines changed: 24 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -168,6 +168,17 @@ def format_title(meta):
168
168
defformat_description(meta):
169
169
returnf'Read our review on {meta["name"]} at {meta["address"]} in {meta["area"]}, and more tasty vegan {meta["cuisine"]} food in the San Francisco Bay Area from V.I.L.F!'
170
170
171
+
defformat_description_with_dishes(meta, md):
172
+
"""Generate enhanced meta description with specific dishes mentioned"""
173
+
# Extract dishes marked with ** from review text
174
+
dishes=re.findall(r'\*\*(.*?)\*\*', md)
175
+
176
+
ifdishes:
177
+
dishes_text=", ".join(dishes[:2]) # Max 2 dishes for meta description
178
+
returnf'Read our review on {meta["name"]} featuring {dishes_text} at {meta["address"]} in {meta["area"]}, and more tasty vegan {meta["cuisine"]} food in the San Francisco Bay Area from V.I.L.F!'
179
+
else:
180
+
returnf'Read our review on {meta["name"]} at {meta["address"]} in {meta["area"]}, and more tasty vegan {meta["cuisine"]} food in the San Francisco Bay Area from V.I.L.F!'
0 commit comments