mirror of
				https://github.com/zulip/zulip.git
				synced 2025-11-03 21:43:21 +00:00 
			
		
		
		
	open graph: Omit .code-section navigation from open graph.
This commit is contained in:
		@@ -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(
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user