Skip to content

Rename doc file extension from .md to .mdx#691

Merged
albertvillanova merged 2 commits intohuggingface:mainfrom
albertvillanova:fix-690
Feb 18, 2025
Merged

Rename doc file extension from .md to .mdx#691
albertvillanova merged 2 commits intohuggingface:mainfrom
albertvillanova:fix-690

Conversation

@albertvillanova
Copy link
Copy Markdown
Member

@albertvillanova albertvillanova commented Feb 18, 2025

Rename docs files extension from .md to .mdx.

Note that the automatic conversion of doc files to notebooks searches for .mdx files.

Fix #690.

@albertvillanova albertvillanova changed the title Rename docs files extenmsion from .md to .mdx Rename doc file extension from .md to .mdx Feb 18, 2025
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@albertvillanova
Copy link
Copy Markdown
Member Author

Failing test is unrelated to this PR.

Copy link
Copy Markdown
Collaborator

@aymeric-roucher aymeric-roucher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Out of curiosity, why make this change?

@albertvillanova
Copy link
Copy Markdown
Member Author

@aymeric-roucher

Note that the automatic conversion of doc files to notebooks searches for .mdx files.

@albertvillanova albertvillanova merged commit 2982e88 into huggingface:main Feb 18, 2025
@irdbl
Copy link
Copy Markdown

irdbl commented Feb 18, 2025

@albertvillanova

@pytest.mark.skipif(not os.getenv("RUN_ALL"), reason="RUN_ALL environment variable not set")
class TestDocs:
    """Test case for documentation code testing."""

    @classmethod
    def setup_class(cls):
        cls._tmpdir = tempfile.mkdtemp()
        cls.launch_args = ["python3"]
        cls.docs_dir = Path(__file__).parent.parent / "docs" / "source" / "en"
        cls.extractor = DocCodeExtractor()

        if not cls.docs_dir.exists():
            raise ValueError(f"Docs directory not found at {cls.docs_dir}")

        load_dotenv()

        cls.md_files = list(cls.docs_dir.rglob("*.mdx")) # <- this needs to be changed too
        if not cls.md_files:
            raise ValueError(f"No markdown files found in {cls.docs_dir}")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Link in docs to open in Colab does not work

4 participants