mirror of https://github.com/zulip/zulip.git
open graph: Omit .code-section navigation from open graph.
This commit is contained in:
parent
e1f02dc6f2
commit
d3125f59e1
|
@ -460,6 +460,10 @@ class FinalizeOpenGraphDescription(MiddlewareMixin):
|
|||
for tag in bs.find_all('div', class_="admonition"):
|
||||
tag.clear()
|
||||
|
||||
# Skip code-sections, which just contains navigation instructions.
|
||||
for tag in bs.find_all('div', class_="code-section"):
|
||||
tag.clear()
|
||||
|
||||
text = ''
|
||||
for paragraph in bs.find_all('p'):
|
||||
# .text converts it from HTML to text
|
||||
|
|
|
@ -103,7 +103,9 @@ class OpenGraphTest(ZulipTestCase):
|
|||
'/help/logging-out',
|
||||
"Logging out (Zulip Help Center)",
|
||||
# Ideally we'd do something better here
|
||||
["Click on the gear () icon in", "Click Log out. Tap the menu"], [])
|
||||
["We're here to help! Email us at zulip-admin@example.com with questions, feedback, or " +
|
||||
"feature requests."],
|
||||
["Click on the gear"])
|
||||
|
||||
def test_index_pages(self) -> None:
|
||||
self.check_title_and_description(
|
||||
|
|
Loading…
Reference in New Issue