def chunk_page(
        self,
        title: str,
        url: str,
        content: str,
        type: str,
        target_length: int = 100,  # Token counts for different chunk sizes
        overlap_percentage: float = 0.5  # 20% overlap by default
    ) -> BlogChunks:
        """
        Chunks document content with specified overlap percentage and multiple target lengths.
        Returns a dictionary mapping target length to list of chunks.
        """
        # Clean the content first
        content = self._clean_content(content)
        
        # Dictionary to store chunks for each target length
        chunks = BlogChunks(
            title=title,
            content=[],
            type=type,
            url=url
        )
        
        overlap_tokens = int(target_length * overlap_percentage)
        remaining_text = content
        current_section = None
        
        while remaining_text:
            # Handle section headers
            if remaining_text.lstrip().startswith('#'):
                section_end = remaining_text.find('\n')
                if section_end == -1:
                    break
                current_section = remaining_text[:section_end].lstrip('#').strip()
                remaining_text = remaining_text[section_end:].strip()
                continue
            
            # Find natural break point
            chunk_text, remaining_text = self.find_chunk_boundary(
                remaining_text, 
                target_length,
                overlap_tokens
            )
            
            if chunk_text:
                chunks.content.append(chunk_text)
            
            if not remaining_text:
                break
        for i, chunk in enumerate(chunks.content):
            if "Demos" in chunk and "demo.launch()" in chunk:
                chunks.content[i] = chunk.split("Demos")[0] + chunk.split("demo.launch()")[1]
            if "Open in" in chunk and "demo.launch()" in chunk:
                chunks.content.pop(i)

        print(f"\nChunked: {title}")
        # print(f"\n\n\n{'*'*50}")
        # print(f"Target Length: {target_length}")
        # print(f"\n{'*'*50}")
        # print(f"{'='*50}")
        # for chunk in all_chunks:
        #     print(f"Length: {self.count_tokens(chunk.content)} tokens")
        #     print(f"Content: {chunk.content}")
        #     print(f"{'='*50}")  
        # print(f"\n\n\n{'*'*50}") 
        # print([chunk.content for chunk in all_chunks])
        
        return chunks

        Chunks document content with specified overlap percentage and multiple target lengths.
        Returns a dictionary mapping target length to list of chunks.
        
js/_website/generate_jsons/chunking.py