mystx.ext.github_readme_stats.pinned_repo
=========================================

.. py:module:: mystx.ext.github_readme_stats.pinned_repo

.. autoapi-nested-parse::

   GitHub 置顶仓库卡片指令。

   提供 `GitHubPinnedRepoDirective`，将用户名与仓库名渲染为 GitHub Readme Stats 的 pin 卡片。

   示例（reStructuredText）：

   .. code-block:: rst

      .. github-pinned-repo::
         :username: octocat
         :repo: hello-world
         :theme: dark



Classes
-------

.. autoapisummary::

   mystx.ext.github_readme_stats.pinned_repo.GitHubPinnedRepoDirective


Module Contents
---------------

.. py:class:: GitHubPinnedRepoDirective(name, arguments, options, content, lineno, content_offset, block_text, state, state_machine)

   Bases: :py:obj:`mystx.ext.github_readme_stats.base.BaseGitHubCardDirective`


   渲染 GitHub 置顶仓库卡片。

   选项：
   - `username`（必填）：GitHub 用户名；
   - `repo`（必填）：仓库名；
   - `theme`（可选）：主题名称，默认为 `default`。

   示例参见模块文档的用法。


   .. py:attribute:: option_spec

      Mapping of option names to validator functions.



   .. py:method:: run()

      根据指令选项构建卡片 URL 并返回 HTML 节点。

      Returns:
          list[nodes.Node]: 单元素列表，包含原始 HTML `<img>` 节点。



