mirror of
https://github.com/getpelican/pelican.git
synced 2026-07-13 02:34:33 +02:00
Merge a53272ecf4 into 3c69dc68d2
This commit is contained in:
commit
df72627e18
5 changed files with 2474 additions and 2888 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -7,16 +7,17 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PELICAN 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-07-13 11:46+0800\n"
|
||||
"PO-Revision-Date: 2024-06-25 19:00+0800\n"
|
||||
"POT-Creation-Date: 2026-06-08 09:56+0800\n"
|
||||
"PO-Revision-Date: 2026-06-08 13:11+0800\n"
|
||||
"Last-Translator: GeorgeHu <dhxxhch@163.com>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.17.0\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Generated-By: Babel 2.10.3\n"
|
||||
"X-Generator: Poedit 3.4.2\n"
|
||||
|
||||
#: ../../install.rst:2 e735e1393d63466092c9fc0a5ee4117d
|
||||
msgid "Installing Pelican"
|
||||
|
|
@ -24,197 +25,289 @@ msgstr "安装Pelican"
|
|||
|
||||
#: ../../install.rst:4 e34bdf7c1bbb4c75a47f8bd16e626c67
|
||||
msgid ""
|
||||
"Pelican currently runs best on |min_python|; earlier versions of Python "
|
||||
"Pelican currently runs best on Python |min_python|; earlier versions of Python "
|
||||
"are not supported."
|
||||
msgstr "Pelican需要 |min_python| 以上版本的Python,不支持更低版本。"
|
||||
|
||||
#: ../../install.rst:6 ff98ade47da6403e84dd1b2209896d9c
|
||||
#: ../../install.rst:6 2498d09099194317a62e67b907bdd5d3
|
||||
msgid ""
|
||||
"You can install Pelican via several different methods. The simplest is "
|
||||
"via Pip_::"
|
||||
msgstr "有多种方法可以安装Pelican,最简单的就是通过 Pip_:"
|
||||
|
||||
#: ../../install.rst:10 ae2fcb82534e4a3f81980f69ed94c9ad
|
||||
msgid "Or, if you plan on using Markdown::"
|
||||
msgstr "如果您需要使用Markdown,请使用下面的命令安装:"
|
||||
|
||||
#: ../../install.rst:14 ed597b1eb47949efba0f1781ef7bbd1f
|
||||
msgid ""
|
||||
"(Keep in mind that some operating systems will require you to prefix the "
|
||||
"above command with ``sudo`` in order to install Pelican system-wide.)"
|
||||
msgstr "(在某些操作系统中,需要在命令前加 ``sudo`` 才能在整个系统上安装Pelican)"
|
||||
|
||||
#: ../../install.rst:17 04d6784f06dd40e7bff76bf6476aaba1
|
||||
msgid ""
|
||||
"While the above is the simplest method, the recommended approach is to "
|
||||
"create a virtual environment for Pelican via virtualenv_ before "
|
||||
"installing Pelican. Assuming you have virtualenv_ installed, you can then"
|
||||
" open a new terminal session and create a new virtual environment for "
|
||||
"Pelican::"
|
||||
"Once Pelican is installed, you can run ``pelican --help`` to see basic usage "
|
||||
"options. For more detail, refer to the :doc:`Publish<publish>` section."
|
||||
msgstr ""
|
||||
"尽管上面是最简单的安装方法,但我们推荐使用虚拟环境 virtualenv_ 完成Pelican的安装。当您安装好 virtualenv_ "
|
||||
"后,打开一个新的命令行并为Pelican创建一个虚拟环境:"
|
||||
"当您安装好Pelican,可以执行 ``pelican --help`` 命令来查看一些基本用法。在 :doc:`"
|
||||
"发布站点<publish>` 章节中可以了解更多信息。"
|
||||
|
||||
#: ../../install.rst:26 08aae819315e48a194a065a3fc3dddad
|
||||
#: ../../install.rst:9 ff98ade47da6403e84dd1b2209896d9c
|
||||
msgid "You can install Pelican via several different methods."
|
||||
msgstr "有多种方法可以安装Pelican。"
|
||||
|
||||
#: ../../install.rst:11 eeeecf4680d2487cbf2a90ccff671e0a
|
||||
msgid "**Recommended method:** `Pip <https://pip.pypa.io/>`_ User Install"
|
||||
msgstr "**推荐安装方式:** `Pip <https://pip.pypa.io/>`_"
|
||||
|
||||
#: ../../install.rst:13 261e5439b61a4734a6ce7e678830aacd
|
||||
msgid "To install Pelican via Pip::"
|
||||
msgstr "通过Pip安装Pelican:"
|
||||
|
||||
#: ../../install.rst:17 190eabcd8f3a437cbf895ecee25aff4d
|
||||
msgid ""
|
||||
"Once the virtual environment has been created and activated, Pelican can "
|
||||
"be installed via ``python -m pip install pelican`` as noted above. "
|
||||
"Alternatively, if you have the project source, you can install Pelican "
|
||||
"using the setuptools method::"
|
||||
"Or, if you do not plan to use `Markdown <https://pypi.org/project/Markdown/>`_, "
|
||||
"you can omit the ``[markdown]`` suffix::"
|
||||
msgstr ""
|
||||
"当创建并激活虚拟环境后,使用之前提到过的命令 ``python -m pip install pelican`` "
|
||||
"就可以安装Pelican了。或者,如果您想要从源码安装,可以使用setuptools:"
|
||||
"如您不使用 `Markdown <https://pypi.org/project/Markdown/>`_ 来写作,可以省略 "
|
||||
"``[markdown]`` 后缀:"
|
||||
|
||||
#: ../../install.rst:33 368febf14ca740e19fa470b0f832dea1
|
||||
#: ../../install.rst:22 def9b0888d8641e69417b1917bbc2ae8
|
||||
msgid "**Alternate method 1:** `Pipx <https://github.com/pypa/pipx>`_"
|
||||
msgstr "**替代安装方法1:** `Pipx <https://github.com/pypa/pipx>`_"
|
||||
|
||||
#: ../../install.rst:24 35add90587264dbba68c7e5f1718ce9d
|
||||
msgid ""
|
||||
"Pipx lets you execute binaries from Python packages in isolated environments. "
|
||||
"You can install Pipx by following its `documentation <https://pipx.pypa.io>`_. "
|
||||
"After Pipx is installed, you can install Pelican via::"
|
||||
msgstr ""
|
||||
"Pipx可以让Python包中的命令在隔离的环境中执行。安装Pipx的文档参见 `documentation "
|
||||
"<https://pipx.pypa.io>`_ 。安装好Pipx后,就可以通过Pipx来安装Pelican了:"
|
||||
|
||||
#: ../../install.rst:31 998d417a354148b0a590f37c97e8c8bb
|
||||
msgid "**Alternate method 2:** `uv <https://docs.astral.sh/uv/>`_"
|
||||
msgstr "**替代安装方法2:** `uv <https://docs.astral.sh/uv/>`_"
|
||||
|
||||
#: ../../install.rst:33 7defa330173d40748e4c744fac35b2f9
|
||||
msgid ""
|
||||
"Like Pipx, ``uv`` allows you to install tools in isolated environments. If you "
|
||||
"have ``uv`` installed, you can install Pelican via::"
|
||||
msgstr ""
|
||||
"和Pipx一样, ``uv`` 可以让命令在隔离的环境中运行。在安装好 ``uv`` 之后,使用如下"
|
||||
"命令安装Pelican:"
|
||||
|
||||
#: ../../install.rst:38 a82e85e7ff654fcaaab9c562e2531952
|
||||
msgid "**Alternate method 3:** Virtual Environment"
|
||||
msgstr "**替代安装方法3:** 虚拟环境"
|
||||
|
||||
#: ../../install.rst:40 6fa4ae30ab5b4b6d93769dcc6fd8e9f6
|
||||
msgid ""
|
||||
"If you prefer to manually manage a virtual environment, you can create a "
|
||||
"virtual environment for Pelican via venv_ before installing Pelican::"
|
||||
msgstr "如果习惯于手动管理虚拟环境,可以先使用 venv_ 为Pelican创建一个虚拟环境:"
|
||||
|
||||
#: ../../install.rst:47 08aae819315e48a194a065a3fc3dddad
|
||||
msgid ""
|
||||
"Alternatively, if you have the project source, you can replace the last command "
|
||||
"with the following to install Pelican using the ``setuptools`` method::"
|
||||
msgstr ""
|
||||
"当然,也可以从Pelican的项目源码安装,此时需要使用 ``setuptools`` ,将刚才的最后"
|
||||
"一条命令替换为:"
|
||||
|
||||
#: ../../install.rst:53 368febf14ca740e19fa470b0f832dea1
|
||||
msgid ""
|
||||
"If you have Git installed and prefer to install the latest bleeding-edge "
|
||||
"version of Pelican rather than a stable release, use the following "
|
||||
"command::"
|
||||
msgstr "如果安装过Git,并且您希望安装Pelican的最最新版本(而不是稳定版),请使用下面的命令:"
|
||||
|
||||
#: ../../install.rst:38 2498d09099194317a62e67b907bdd5d3
|
||||
msgid ""
|
||||
"Once Pelican is installed, you can run ``pelican --help`` to see basic "
|
||||
"usage options. For more detail, refer to the :doc:`Publish<publish>` "
|
||||
"section."
|
||||
"version of Pelican rather than a stable release, use the following command::"
|
||||
msgstr ""
|
||||
"当您安装好Pelican,可以执行 ``pelican --help`` 命令来查看一些基本用法。在 :doc:`发布站点<publish>` "
|
||||
"章节中可以了解更多信息。"
|
||||
"如果安装过Git,并且您希望安装Pelican的最最新版本(而不是稳定版),请使用下面的命"
|
||||
"令:"
|
||||
|
||||
#: ../../install.rst:42 4ef93669753e4bb89252a8c9852e7a71
|
||||
#: ../../install.rst:58 3baac634fc304b949e0abae0ca5b854b
|
||||
msgid "To exit the virtual environment, type ``deactivate``."
|
||||
msgstr "使用 ``deactivate`` 退出虚拟环境。"
|
||||
|
||||
#: ../../install.rst:61 4ef93669753e4bb89252a8c9852e7a71
|
||||
msgid "Optional packages"
|
||||
msgstr "可选包"
|
||||
|
||||
#: ../../install.rst:44 190eabcd8f3a437cbf895ecee25aff4d
|
||||
#: ../../install.rst:63 190eabcd8f3a437cbf895ecee25aff4d
|
||||
msgid ""
|
||||
"If you plan on using `Markdown <https://pypi.org/project/Markdown/>`_ as "
|
||||
"a markup format, you can install Pelican with Markdown support::"
|
||||
"If you plan on using `Markdown <https://pypi.org/project/Markdown/>`_ as a "
|
||||
"markup format, you can install Pelican with Markdown support::"
|
||||
msgstr ""
|
||||
"如您希望使用 `Markdown <https://pypi.org/project/Markdown/>`_ "
|
||||
"来写作,执行下面的命令来安装Markdown支持:"
|
||||
"如您希望使用 `Markdown <https://pypi.org/project/Markdown/>`_ 来写作,执行下面的"
|
||||
"命令来安装Markdown支持:"
|
||||
|
||||
#: ../../install.rst:49 fa8fc8ff397a412f839bc2805696aa45
|
||||
#: ../../install.rst:68 fa8fc8ff397a412f839bc2805696aa45
|
||||
msgid ""
|
||||
"Typographical enhancements can be enabled in your settings file, but "
|
||||
"first the requisite `Typogrify <https://pypi.org/project/typogrify/>`_ "
|
||||
"library must be installed::"
|
||||
"Typographical enhancements can be enabled in your settings file, but first the "
|
||||
"requisite `Typogrify <https://github.com/justinmayer/typogrify>`_ library must "
|
||||
"be installed::"
|
||||
msgstr ""
|
||||
"Pelican还支持排版增强,若您需要使用,请先安装 `Typogrify "
|
||||
"<https://pypi.org/project/typogrify/>`_ 库,稍后您可以在设置文件中启用它。"
|
||||
"Pelican还支持排版增强,若您需要使用,请先安装 `Typogrify <https://pypi.org/"
|
||||
"project/typogrify/>`_ 库,稍后您可以在设置文件中启用它:"
|
||||
|
||||
#: ../../install.rst:56 74911273a6934154bad4fadbc0d1f28b
|
||||
#: ../../install.rst:74 97417cb4416b4ef8989f056b494bd556
|
||||
msgid ""
|
||||
"If you are using Pipx, you can inject packages into the Pipx-managed virtual "
|
||||
"environment. For example, to add Typogrify::"
|
||||
msgstr ""
|
||||
"如果用的是Pipx,可以将额外的包注入到Pipx管理的虚拟环境中。例如,可以添加"
|
||||
"Typogrify:"
|
||||
|
||||
#: ../../install.rst:79 a783480b39e84a22ace0f10d83f19474
|
||||
msgid ""
|
||||
"To use ``uv`` to install Pelican with additional extra packages, use the "
|
||||
"following example command, which like above will also install Typogrify::"
|
||||
msgstr ""
|
||||
"若想用 ``uv`` 安装额外的包与Pelican配合使用,可以使用像下面这样的命令,仍以"
|
||||
"Typogrify为例:"
|
||||
|
||||
#: ../../install.rst:85 74911273a6934154bad4fadbc0d1f28b
|
||||
msgid "Dependencies"
|
||||
msgstr "依赖"
|
||||
|
||||
#: ../../install.rst:58 77d44b11ae7e4945b119fd473bb53e67
|
||||
#: ../../install.rst:87 77d44b11ae7e4945b119fd473bb53e67
|
||||
msgid ""
|
||||
"When Pelican is installed, the following dependent Python packages should"
|
||||
" be automatically installed without any action on your part:"
|
||||
msgstr "当Pelican安装完成后,下面的所有Python依赖应该都会自动安装,无需另外做任何操作:"
|
||||
"When Pelican is installed, the following dependent Python packages should be "
|
||||
"automatically installed without any action on your part:"
|
||||
msgstr ""
|
||||
"当Pelican安装完成后,下面的所有Python依赖应该都会自动安装,无需另外做任何操作:"
|
||||
|
||||
#: ../../install.rst:61 22bdf13ed0a3482fb66f10486518261c
|
||||
#: ../../install.rst:90 22bdf13ed0a3482fb66f10486518261c
|
||||
msgid ""
|
||||
"`feedgenerator <https://pypi.org/project/feedgenerator/>`_, to generate "
|
||||
"the Atom feeds"
|
||||
msgstr "`feedgenerator <https://pypi.org/project/feedgenerator/>`_,用于生成Atom feeds"
|
||||
"`feedgenerator <https://pypi.org/project/feedgenerator/>`_, to generate the "
|
||||
"Atom feeds"
|
||||
msgstr ""
|
||||
"`feedgenerator <https://pypi.org/project/feedgenerator/>`_,用于生成Atom feeds"
|
||||
|
||||
#: ../../install.rst:63 21ddc5ce3bed4f9cab2a454e8319a8c4
|
||||
#: ../../install.rst:92 21ddc5ce3bed4f9cab2a454e8319a8c4
|
||||
msgid "`jinja2 <https://pypi.org/project/Jinja2/>`_, for templating support"
|
||||
msgstr "`jinja2 <https://pypi.org/project/Jinja2/>`_,用于模板系统"
|
||||
|
||||
#: ../../install.rst:64 9302b2919a4f4de0927060911f69f5ed
|
||||
#: ../../install.rst:93 9302b2919a4f4de0927060911f69f5ed
|
||||
msgid "`pygments <https://pypi.org/project/Pygments/>`_, for syntax highlighting"
|
||||
msgstr "`pygments <https://pypi.org/project/Pygments/>`_,用于语法高亮"
|
||||
|
||||
#: ../../install.rst:65 c6e45ac0f3ea4f91953fb2dfc66d29d9
|
||||
#: ../../install.rst:94 c6e45ac0f3ea4f91953fb2dfc66d29d9
|
||||
msgid ""
|
||||
"`docutils <https://pypi.org/project/docutils/>`_, for supporting "
|
||||
"reStructuredText as an input format"
|
||||
msgstr "`docutils <https://pypi.org/project/docutils/>`_,用于reStructuredText格式"
|
||||
msgstr ""
|
||||
"`docutils <https://pypi.org/project/docutils/>`_,用于reStructuredText格式"
|
||||
|
||||
#: ../../install.rst:67 aea17a424f3c4e8eab50172b6653fe16
|
||||
#: ../../install.rst:96 aea17a424f3c4e8eab50172b6653fe16
|
||||
msgid ""
|
||||
"`blinker <https://pypi.org/project/blinker/>`_, an object-to-object and "
|
||||
"broadcast signaling system"
|
||||
msgstr "`blinker <https://pypi.org/project/blinker/>`_,对象-对象的信号广播系统"
|
||||
|
||||
#: ../../install.rst:69 5da4c8d1fdf349c2afe23ffc9d832816
|
||||
#: ../../install.rst:98 5da4c8d1fdf349c2afe23ffc9d832816
|
||||
msgid ""
|
||||
"`unidecode <https://pypi.org/project/Unidecode/>`_, for ASCII "
|
||||
"transliterations of Unicode text utilities"
|
||||
"`unidecode <https://pypi.org/project/Unidecode/>`_, for ASCII transliterations "
|
||||
"of Unicode text utilities"
|
||||
msgstr ""
|
||||
"`unidecode "
|
||||
"<https://pypi.org/project/Unidecode/>`_,用于将Unicode文本转为ASCII字符的音译"
|
||||
"`unidecode <https://pypi.org/project/Unidecode/>`_,用于将Unicode文本转为ASCII字"
|
||||
"符的音译"
|
||||
|
||||
#: ../../install.rst:72 ff81051def5544e1b5d66532453aed25
|
||||
#: ../../install.rst:101 ff81051def5544e1b5d66532453aed25
|
||||
msgid ""
|
||||
"`MarkupSafe <https://pypi.org/project/MarkupSafe/>`_, for a markup-safe "
|
||||
"string implementation"
|
||||
msgstr "`MarkupSafe <https://pypi.org/project/MarkupSafe/>`_,用于转义字符的安全处理"
|
||||
|
||||
#: ../../install.rst:74 0222b4cdfdcb48839f5f6b092071db99
|
||||
msgid ""
|
||||
"`python-dateutil <https://pypi.org/project/python-dateutil/>`_, to read "
|
||||
"the date metadata"
|
||||
"`MarkupSafe <https://pypi.org/project/MarkupSafe/>`_, for a markup-safe string "
|
||||
"implementation"
|
||||
msgstr ""
|
||||
"`python-dateutil <https://pypi.org/project/python-"
|
||||
"dateutil/>`_,用于读取日期相关的元数据"
|
||||
"`MarkupSafe <https://pypi.org/project/MarkupSafe/>`_,用于转义字符的安全处理"
|
||||
|
||||
#: ../../install.rst:78 49117127302b49b39bd5b86abae18709
|
||||
#: ../../install.rst:103 0222b4cdfdcb48839f5f6b092071db99
|
||||
msgid ""
|
||||
"`python-dateutil <https://pypi.org/project/python-dateutil/>`_, to read the "
|
||||
"date metadata"
|
||||
msgstr ""
|
||||
"`python-dateutil <https://pypi.org/project/python-dateutil/>`_,用于读取日期相关"
|
||||
"的元数据"
|
||||
|
||||
#: ../../install.rst:107 49117127302b49b39bd5b86abae18709
|
||||
msgid "Upgrading"
|
||||
msgstr "更新升级"
|
||||
|
||||
#: ../../install.rst:80 93962c7d303f4c9fa5ad9d43f86ea50a
|
||||
#: ../../install.rst:109 93962c7d303f4c9fa5ad9d43f86ea50a
|
||||
msgid ""
|
||||
"If you installed a stable Pelican release via Pip_ and wish to upgrade to"
|
||||
" the latest stable release, you can do so by adding ``--upgrade``::"
|
||||
msgstr "若是通过 Pip_ 安装了稳定版本的Pelican,可以通过在安装命令中添加 ``--upgrade`` 来升级到最新版:"
|
||||
"If you installed a stable Pelican release via Pip_ and wish to upgrade to the "
|
||||
"latest stable release, you can do so by adding ``--upgrade``::"
|
||||
msgstr ""
|
||||
"若是通过 Pip_ 安装了稳定版本的Pelican,可以通过在安装命令中添加 ``--upgrade`` 来"
|
||||
"升级到最新版:"
|
||||
|
||||
#: ../../install.rst:85 1ac1fa009f9e4245ae7f975bda7d5a22
|
||||
#: ../../install.rst:114 1ac1fa009f9e4245ae7f975bda7d5a22
|
||||
msgid ""
|
||||
"If you installed Pelican via distutils or the bleeding-edge method, "
|
||||
"simply perform the same step to install the most recent version."
|
||||
msgstr "若是通过distutils安装或是通过Git安装了测试版的Pelican重新进行一遍和安装时同样的步骤即可。"
|
||||
"If you installed Pelican via ``setuptools`` or the bleeding-edge method, "
|
||||
"perform the same step to install the most recent version."
|
||||
msgstr ""
|
||||
"若是通过 ``setuptools`` 或其他较新方式安装Pelican,重新进行一遍和安装时同样的步"
|
||||
"骤即可完成升级。"
|
||||
|
||||
#: ../../install.rst:89 7845fa285f0b4dcd8e881c9edd61f80c
|
||||
#: ../../install.rst:117 b311ca799e8c4bea93713a1dd3cb6733
|
||||
msgid "If you installed with Pipx, upgrade via::"
|
||||
msgstr "对于使用Pipx安装的Pelican,通过下面的命令升级:"
|
||||
|
||||
#: ../../install.rst:121 ce5470b22a35445f9b206b4cceed7221
|
||||
msgid "If you installed with ``uv``, upgrade via::"
|
||||
msgstr "对于使用 ``uv`` 安装的Pelican,通过下面的命令升级:"
|
||||
|
||||
#: ../../install.rst:126 7845fa285f0b4dcd8e881c9edd61f80c
|
||||
msgid "Kickstart your site"
|
||||
msgstr "启动网站"
|
||||
|
||||
#: ../../install.rst:91 488ad84175cb45f6a6bb26cec24c1f10
|
||||
#: ../../install.rst:128 488ad84175cb45f6a6bb26cec24c1f10
|
||||
msgid ""
|
||||
"Once Pelican has been installed, you can create a skeleton project via "
|
||||
"the ``pelican-quickstart`` command, which begins by asking some questions"
|
||||
" about your site::"
|
||||
"Once Pelican has been installed, you can create a skeleton project via the "
|
||||
"``pelican-quickstart`` command, which begins by asking some questions about "
|
||||
"your site::"
|
||||
msgstr ""
|
||||
"Pelican安装完成后,通过 ``pelican-quickstart`` "
|
||||
"命令创建项目的整体框架,在运行这个命令时,您需要输入一些与站点相关的信息:"
|
||||
"Pelican安装完成后,通过 ``pelican-quickstart`` 命令创建项目的整体框架,在运行这"
|
||||
"个命令时,您需要输入一些与站点相关的信息:"
|
||||
|
||||
#: ../../install.rst:97 63a773d35b91455b944206337e527a3a
|
||||
#: ../../install.rst:134 63a773d35b91455b944206337e527a3a
|
||||
msgid ""
|
||||
"If run inside an activated virtual environment, ``pelican-quickstart`` "
|
||||
"will look for an associated project path inside "
|
||||
"``$VIRTUAL_ENV/.project``. If that file exists and contains a valid "
|
||||
"directory path, the new Pelican project will be saved at that location. "
|
||||
"Otherwise, the default is the current working directory. To set the new "
|
||||
"project path on initial invocation, use: ``pelican-quickstart --path "
|
||||
"/your/desired/directory``"
|
||||
"If run inside an activated virtual environment, ``pelican-quickstart`` will "
|
||||
"look for an associated project path inside ``$VIRTUAL_ENV/.project``. If that "
|
||||
"file exists and contains a valid directory path, the new Pelican project will "
|
||||
"be saved at that location. Otherwise, the default is the current working "
|
||||
"directory. To set the new project path on initial invocation, use: ``pelican-"
|
||||
"quickstart --path /your/desired/directory``"
|
||||
msgstr ""
|
||||
"如果是在虚拟环境中执行 ``pelican-quickstart`` ,系统会自动在 ``$VIRTUAL_ENV/.project`` "
|
||||
"目录中查找这个命令。若这个这个命令存在并且路径是正确的,一个新的Pelican项目就会在目标位置创建。否则,会默认在当前的工作目录下创建这个项目。若要在初始化时指定项目路径,请使用"
|
||||
" ``pelican-quickstart --path /your/desired/directory``。"
|
||||
"如果是在虚拟环境中执行, ``pelican-quickstart`` 会自动在 ``$VIRTUAL_ENV/."
|
||||
"project`` 目录中搜索项目路径。若文件存在并且路径配置正确,一个新的Pelican项目就"
|
||||
"会在目标位置创建。否则,会默认在当前的工作目录下创建这个项目。若要在初始化时指定"
|
||||
"项目路径,请使用 ``pelican-quickstart --path /your/desired/directory``"
|
||||
|
||||
#: ../../install.rst:104 b7cdf15328074880bb4fc69dcb7bd26f
|
||||
#: ../../install.rst:141 b7cdf15328074880bb4fc69dcb7bd26f
|
||||
msgid ""
|
||||
"Once you finish answering all the questions, your project will consist of"
|
||||
" the following hierarchy (except for *pages* — shown in parentheses below"
|
||||
" — which you can optionally add yourself if you plan to create non-"
|
||||
"chronological content)::"
|
||||
"Once you finish answering all the questions, your project will consist of the "
|
||||
"following hierarchy (except for *pages* — shown in parentheses below — which "
|
||||
"you can optionally add yourself if you plan to create non-chronological "
|
||||
"content)::"
|
||||
msgstr ""
|
||||
"当您回答完所有问题后,项目就会成功创建。项目中会包含下述的一些层级结构(除了用括号括起来的 "
|
||||
"*pages*)。如果有一些内容不需要按时间排序,您可以将它们放在(pages)所在的位置:"
|
||||
"当您回答完所有问题后,项目就会成功创建。项目中会包含下述的一些层级结构(除了用括"
|
||||
"号括起来的 *pages*)。如果有一些内容不需要按时间排序,您可以将它们放在(pages)"
|
||||
"所在的位置:"
|
||||
|
||||
#: ../../install.rst:118 05e4fe3b0d0a4c998fba451692a68725
|
||||
#: ../../install.rst:155 05e4fe3b0d0a4c998fba451692a68725
|
||||
msgid ""
|
||||
"The next step is to begin to adding content to the *content* folder that "
|
||||
"has been created for you."
|
||||
"The next step is to begin to adding content to the *content* folder that has "
|
||||
"been created for you."
|
||||
msgstr "接下来就可以开始往 *content* 目录中添加自己创作的内容了。"
|
||||
|
||||
#~ msgid "Or, if you plan on using Markdown::"
|
||||
#~ msgstr "如果您需要使用Markdown,请使用下面的命令安装:"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "(Keep in mind that some operating systems will require you to prefix the "
|
||||
#~ "above command with ``sudo`` in order to install Pelican system-wide.)"
|
||||
#~ msgstr ""
|
||||
#~ "(在某些操作系统中,需要在命令前加 ``sudo`` 才能在整个系统上安装Pelican)"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "While the above is the simplest method, the recommended approach is to "
|
||||
#~ "create a virtual environment for Pelican via virtualenv_ before installing "
|
||||
#~ "Pelican. Assuming you have virtualenv_ installed, you can then open a new "
|
||||
#~ "terminal session and create a new virtual environment for Pelican::"
|
||||
#~ msgstr ""
|
||||
#~ "尽管上面是最简单的安装方法,但我们推荐使用虚拟环境 virtualenv_ 完成Pelican的"
|
||||
#~ "安装。当您安装好 virtualenv_ 后,打开一个新的命令行并为Pelican创建一个虚拟环"
|
||||
#~ "境:"
|
||||
|
||||
#~ msgid ""
|
||||
#~ "Once the virtual environment has been created and activated, Pelican can be "
|
||||
#~ "installed via ``python -m pip install pelican`` as noted above. "
|
||||
#~ "Alternatively, if you have the project source, you can install Pelican using "
|
||||
#~ "the setuptools method::"
|
||||
#~ msgstr ""
|
||||
#~ "当创建并激活虚拟环境后,使用之前提到过的命令 ``python -m pip install "
|
||||
#~ "pelican`` 就可以安装Pelican了。或者,如果您想要从源码安装,可以使用"
|
||||
#~ "setuptools:"
|
||||
|
|
|
|||
|
|
@ -7,16 +7,17 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PELICAN 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2025-07-13 11:46+0800\n"
|
||||
"PO-Revision-Date: 2024-06-26 19:00+0800\n"
|
||||
"POT-Creation-Date: 2026-06-08 09:56+0800\n"
|
||||
"PO-Revision-Date: 2026-06-08 10:57+0800\n"
|
||||
"Last-Translator: GeorgeHu <dhxxhch@163.com>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: \n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Language: zh_CN\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.17.0\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"Generated-By: Babel 2.10.3\n"
|
||||
"X-Generator: Poedit 3.4.2\n"
|
||||
|
||||
#: ../../plugins.rst:4 3df58bcad1a64350a8e763d87d7470e3
|
||||
msgid "Plugins"
|
||||
|
|
@ -24,10 +25,10 @@ msgstr "插件"
|
|||
|
||||
#: ../../plugins.rst:6 5e0f2aa517254778a71d1e742b051645
|
||||
msgid ""
|
||||
"Beginning with version 3.0, Pelican supports plugins. Plugins are a way "
|
||||
"to add features to Pelican without having to directly modify the Pelican "
|
||||
"core."
|
||||
msgstr "Pelican从3.0版本开始支持插件。通过插件,不必直接修改Pelican的核心代码就可以给Pelican添加新功能。"
|
||||
"Beginning with version 3.0, Pelican supports plugins. Plugins are a way to add features to "
|
||||
"Pelican without having to directly modify the Pelican core."
|
||||
msgstr ""
|
||||
"Pelican从3.0版本开始支持插件。通过插件,不必直接修改Pelican的核心代码就可以给Pelican添加新功能。"
|
||||
|
||||
#: ../../plugins.rst:10 40ad4aad1dc54b929f6059031edae0d9
|
||||
msgid "How to use plugins"
|
||||
|
|
@ -35,61 +36,54 @@ msgstr "如何使用插件"
|
|||
|
||||
#: ../../plugins.rst:12 8fc9f8cba76b4bb9930d80b5b985885a
|
||||
msgid ""
|
||||
"Starting with version 4.5, Pelican moved to a new plugin structure "
|
||||
"utilizing namespace packages that can be easily installed via Pip_. "
|
||||
"Plugins supporting this structure will install under the namespace "
|
||||
"package ``pelican.plugins`` and can be automatically discovered by "
|
||||
"Pelican. To see a list of Pip-installed namespace plugins that are active"
|
||||
" in your environment, run::"
|
||||
"Starting with version 4.5, Pelican moved to a new plugin structure utilizing namespace packages "
|
||||
"that can be easily installed via Pip_. Plugins supporting this structure will install under the "
|
||||
"namespace package ``pelican.plugins`` and can be automatically discovered by Pelican. To see a "
|
||||
"list of Pip-installed namespace plugins that are active in your environment, run::"
|
||||
msgstr ""
|
||||
"Pelican从4.5版本开始使用了一种全新的插件结构,利用了命名空间包,并且可以轻松地通过 Pip_ "
|
||||
"进行安装。支持此结构地插件都会被安装在命名空间包 ``pelican.plugins`` "
|
||||
"下,因此Pelican可以自动发现他们。下面的命令可以用于查看环境中用Pip安装的所有插件:"
|
||||
"Pelican从4.5版本开始使用了一种全新的插件结构,利用了命名空间包,并且可以轻松地通过 Pip_ 进行安"
|
||||
"装。支持此结构地插件都会被安装在命名空间包 ``pelican.plugins`` 下,因此Pelican可以自动发现他们。"
|
||||
"下面的命令可以用于查看环境中用Pip安装的所有插件:"
|
||||
|
||||
#: ../../plugins.rst:20 de052285e7f645a9ab551433f3c07d46
|
||||
msgid ""
|
||||
"If you leave the ``PLUGINS`` setting as default (``None``), Pelican will "
|
||||
"automatically discover namespace plugins and register them. If, on the "
|
||||
"other hand, you specify a ``PLUGINS`` setting as a list of plugins, this "
|
||||
"auto-discovery will be disabled. At that point, only the plugins you "
|
||||
"specify will be registered, and you must explicitly list any namespace "
|
||||
"plugins as well."
|
||||
"If you leave the ``PLUGINS`` setting as default (``None``), Pelican will automatically discover "
|
||||
"namespace plugins and register them. If, on the other hand, you specify a ``PLUGINS`` setting as "
|
||||
"a list of plugins, this auto-discovery will be disabled. At that point, only the plugins you "
|
||||
"specify will be registered, and you must explicitly list any namespace plugins as well."
|
||||
msgstr ""
|
||||
"若将 ``PLUGINS`` 配置项设为默认的 ``None`` ,Pelican会自动发现命名空间中的插件并且将他们全部加载;若你在 "
|
||||
"``PLUGINS`` 设置项中指定了一系列的插件,Pelican就不会去自动发现插件,也就是说,你需要显式地指定所有要使用的插件。"
|
||||
"若将 ``PLUGINS`` 配置项设为默认的 ``None`` ,Pelican会自动发现命名空间中的插件并且将他们全部加"
|
||||
"载;若你在 ``PLUGINS`` 设置项中指定了一系列的插件,Pelican就不会去自动发现插件,也就是说,你需要"
|
||||
"显式地指定所有要使用的插件。"
|
||||
|
||||
#: ../../plugins.rst:26 a9675be841b84df584e67087cd23ab34
|
||||
msgid ""
|
||||
"If you are using the ``PLUGINS`` setting, you can specify plugins in two "
|
||||
"ways. The first method specifies plugins as a list of strings. Namespace "
|
||||
"plugins can be specified either by their full names "
|
||||
"(``pelican.plugins.myplugin``) or by their short names (``myplugin``)::"
|
||||
"If you are using the ``PLUGINS`` setting, you can specify plugins in two ways. The first method "
|
||||
"specifies plugins as a list of strings. Namespace plugins can be specified either by their full "
|
||||
"names (``pelican.plugins.myplugin``) or by their short names (``myplugin``)::"
|
||||
msgstr ""
|
||||
"在配置 ``PLUGINS`` 时,有两种方式。一是用字符串列表指定插件的名称,可以是包含命名空间的完整名称(例如 "
|
||||
"``pelican.plugins.myplugin`` ),也可以是简短名称( ``myplugin``):"
|
||||
"在配置 ``PLUGINS`` 时,有两种方式。一是用字符串列表指定插件的名称,可以是包含命名空间的完整名称"
|
||||
"(例如 ``pelican.plugins.myplugin`` ),也可以是简短名称( ``myplugin``):"
|
||||
|
||||
#: ../../plugins.rst:35 188bf617180b4a7b9bc09f3fb1c201ae
|
||||
msgid ""
|
||||
"Alternatively, you can import them in your settings file and pass the "
|
||||
"modules::"
|
||||
msgid "Alternatively, you can import them in your settings file and pass the modules::"
|
||||
msgstr "二是在设置文件中先import进来,再将import进的模块放在 ``PLUGINS`` 设置项中:"
|
||||
|
||||
#: ../../plugins.rst:43 2d5db874810245a98b59ab080a0df1a5
|
||||
msgid ""
|
||||
"When experimenting with different plugins (especially the ones that deal "
|
||||
"with metadata and content) caching may interfere and the changes may not "
|
||||
"be visible. In such cases disable caching with ``LOAD_CONTENT_CACHE = "
|
||||
"False`` or use the ``--ignore-cache`` command-line switch."
|
||||
"When experimenting with different plugins (especially the ones that deal with metadata and "
|
||||
"content) caching may interfere and the changes may not be visible. In such cases disable caching "
|
||||
"with ``LOAD_CONTENT_CACHE = False`` or use the ``--ignore-cache`` command-line switch."
|
||||
msgstr ""
|
||||
"在尝试不同的插件时(尤其是那些处理元数据和内容的插件),缓存可能会相互干扰,一些更改不会生效。发生这种情况时,就需要通过设置 "
|
||||
"``LOAD_CONTENT_CACHE = False`` 或使用 ``--ignore-cache`` 命令行选项禁用缓存。"
|
||||
"在尝试不同的插件时(尤其是那些处理元数据和内容的插件),缓存可能会相互干扰,一些更改不会生效。发"
|
||||
"生这种情况时,就需要通过设置 ``LOAD_CONTENT_CACHE = False`` 或使用 ``--ignore-cache`` 命令行选项"
|
||||
"禁用缓存。"
|
||||
|
||||
#: ../../plugins.rst:48 7421f93c1d714c9c853fc9311681515a
|
||||
msgid ""
|
||||
"If your plugins are not in an importable path, you can specify a list of "
|
||||
"paths via the ``PLUGIN_PATHS`` setting. As shown in the following "
|
||||
"example, paths in the ``PLUGIN_PATHS`` list can be absolute or relative "
|
||||
"to the settings file::"
|
||||
"If your plugins are not in an importable path, you can specify a list of paths via the "
|
||||
"``PLUGIN_PATHS`` setting. As shown in the following example, paths in the ``PLUGIN_PATHS`` list "
|
||||
"can be absolute or relative to the settings file::"
|
||||
msgstr ""
|
||||
"如果插件处于无法直接进行import的路径,可以在 ``PLUGIN_PATHS`` 配置项中指定这些路径。如下例所示, "
|
||||
"``PLUGIN_PATHS`` 中的路径可以是绝对的,也可以是相对于设置文件的:"
|
||||
|
|
@ -100,570 +94,580 @@ msgstr "在哪儿下载插件"
|
|||
|
||||
#: ../../plugins.rst:57 b07653ce77194a998630a55ae9511de5
|
||||
msgid ""
|
||||
"Namespace plugins can be found in the `pelican-plugins organization`_ as "
|
||||
"individual repositories. Legacy plugins are located in the `pelican-"
|
||||
"plugins repository`_ and will be gradually phased out in favor of the "
|
||||
"namespace versions."
|
||||
"Namespace plugins can be found in the `pelican-plugins organization`_ as individual "
|
||||
"repositories. Legacy plugins are located in the `pelican-plugins repository`_ and will be "
|
||||
"gradually phased out in favor of the namespace versions."
|
||||
msgstr ""
|
||||
"新的命名空间插件可以在GitHub的 `pelican-plugins 组织`_ "
|
||||
"中找到,每个插件都是一个独立的仓库。而老的插件则可以在GitHub的 `pelican-plugins 仓库`_ "
|
||||
"中找到。这些老的插件会逐步淘汰并转移到新的命名空间版本。"
|
||||
"新的命名空间插件可以在GitHub的 `pelican-plugins 组织`_ 中找到,每个插件都是一个独立的仓库。而老的"
|
||||
"插件则可以在GitHub的 `pelican-plugins 仓库`_ 中找到。这些老的插件会逐步淘汰并转移到新的命名空间版"
|
||||
"本。"
|
||||
|
||||
#: ../../plugins.rst:65 5c55fa6f3d664be2a49b8256dc2f6a2e
|
||||
msgid ""
|
||||
"Please note that while we do our best to review and maintain these "
|
||||
"plugins, they are submitted by the Pelican community and thus may have "
|
||||
"varying levels of support and interoperability."
|
||||
msgstr "请注意,尽管我们尽全力审查和维护这些插件,但这些插件是Pelican社区提交的,因此支持性和互操作性程度各不相同。"
|
||||
"Please note that while we do our best to review and maintain these plugins, they are submitted "
|
||||
"by the Pelican community and thus may have varying levels of support and interoperability."
|
||||
msgstr ""
|
||||
"请注意,尽管我们尽全力审查和维护这些插件,但这些插件是Pelican社区提交的,因此支持性和互操作性程度"
|
||||
"各不相同。"
|
||||
|
||||
#: ../../plugins.rst:70 25339a713a97492c88b0e60024ac34b8
|
||||
#: ../../plugins.rst:69 575d8a911bee4cbca0d3e8d8b110c1d7
|
||||
msgid ""
|
||||
"Community plugins can also be found on PyPI tagged with \"`Framework :: Pelican :: Plugins`_\"."
|
||||
msgstr "社区插件也可以在PyPI上通过“ `Framework :: Pelican :: Plugins`_ ”标签搜索到。"
|
||||
|
||||
#: ../../plugins.rst:75 25339a713a97492c88b0e60024ac34b8
|
||||
msgid "How to create plugins"
|
||||
msgstr "如何创建插件"
|
||||
|
||||
#: ../../plugins.rst:72 62b6b4a1a5f0486e8b3a39d6a7050f0a
|
||||
#: ../../plugins.rst:77 62b6b4a1a5f0486e8b3a39d6a7050f0a
|
||||
msgid ""
|
||||
"Plugins are based on the concept of signals. Pelican sends signals, and "
|
||||
"plugins subscribe to those signals. The list of available signals is "
|
||||
"documented in a subsequent section."
|
||||
msgstr "插件是基于信号这一概念的。Pelican会发送信号,插件则订阅这些信号。可用的信号在下一节会贴出来。"
|
||||
|
||||
#: ../../plugins.rst:76 f8f74b0257be46a1878e72e126166bd0
|
||||
msgid ""
|
||||
"The only rule to follow for plugins is to define a ``register`` callable,"
|
||||
" in which you map the signals to your plugin logic. Let's take a simple "
|
||||
"example::"
|
||||
"Plugins are based on the concept of signals. Pelican sends signals, and plugins subscribe to "
|
||||
"those signals. The list of available signals is documented in a subsequent section."
|
||||
msgstr ""
|
||||
"对于插件来说,唯一需要遵循的规则就是一定要定义一个可调用的 ``register`` ,在 ``register`` "
|
||||
"中需要将信号映射到插件逻辑上。下面是一个简单的例子:"
|
||||
"插件是基于信号这一概念的。Pelican会发送信号,插件则订阅这些信号。可用的信号在下一节会贴出来。"
|
||||
|
||||
#: ../../plugins.rst:93 163eebc74421416da2ad497830c42771
|
||||
#: ../../plugins.rst:81 f8f74b0257be46a1878e72e126166bd0
|
||||
msgid ""
|
||||
"Signal receivers are weakly-referenced and thus must not be defined "
|
||||
"within your ``register`` callable or they will be garbage-collected "
|
||||
"before the signal is emitted."
|
||||
msgstr "信号接收器在Pelican中是弱引用的,因此不能将它定义在可调用的 ``register`` 中,否则接收器在信号发送之前就会被回收。"
|
||||
|
||||
#: ../../plugins.rst:97 bb63bd2d24e341a1a4f7dfa118648d9a
|
||||
msgid ""
|
||||
"If multiple plugins connect to the same signal, plugins will be invoked "
|
||||
"in the order they are registered. When the ``PLUGINS`` setting is "
|
||||
"defined, plugin invocation order will be the order in which the plugins "
|
||||
"are listed in the ``PLUGINS`` setting. If you rely on auto-discovered "
|
||||
"namespace plugins and have no ``PLUGINS`` setting defined, plugins will "
|
||||
"be invoked in the same order that they are discovered (the same order as "
|
||||
"listed in the output of the ``pelican-plugins`` command). If you want to "
|
||||
"specify the order explicitly, disable auto-discovery by defining "
|
||||
"``PLUGINS`` in the desired order."
|
||||
"The only rule to follow for plugins is to define a ``register`` callable, in which you map the "
|
||||
"signals to your plugin logic. Let's take a simple example::"
|
||||
msgstr ""
|
||||
"对于关联到同一个信号的多个插件,将按照它们注册的前后顺序执行。但若设置了 ``PLUGINS`` "
|
||||
"配置项,则会以此配置项中的顺序为准。如果您使用了无需PLUGINS设置的新版命名空间插件,它们将按照被探测到的顺序进行连接(与 pelican-"
|
||||
"plugins 输出的顺序相同)。若您此时仍想要显式指定顺序,设置 ``PLUGINS`` 配置项即可。"
|
||||
"对于插件来说,唯一需要遵循的规则就是一定要定义一个可调用的 ``register`` ,在 ``register`` 中需要"
|
||||
"将信号映射到插件逻辑上。下面是一个简单的例子:"
|
||||
|
||||
#: ../../plugins.rst:107 062aa3a3402141cfbd376d4fee1b5b34
|
||||
#: ../../plugins.rst:98 163eebc74421416da2ad497830c42771
|
||||
msgid ""
|
||||
"Signal receivers are weakly-referenced and thus must not be defined within your ``register`` "
|
||||
"callable or they will be garbage-collected before the signal is emitted."
|
||||
msgstr ""
|
||||
"信号接收器在Pelican中是弱引用的,因此不能将它定义在可调用的 ``register`` 中,否则接收器在信号发送"
|
||||
"之前就会被回收。"
|
||||
|
||||
#: ../../plugins.rst:102 bb63bd2d24e341a1a4f7dfa118648d9a
|
||||
msgid ""
|
||||
"If multiple plugins connect to the same signal, plugins will be invoked in the order they are "
|
||||
"registered. When the ``PLUGINS`` setting is defined, plugin invocation order will be the order "
|
||||
"in which the plugins are listed in the ``PLUGINS`` setting. If you rely on auto-discovered "
|
||||
"namespace plugins and have no ``PLUGINS`` setting defined, plugins will be invoked in the same "
|
||||
"order that they are discovered (the same order as listed in the output of the ``pelican-"
|
||||
"plugins`` command). If you want to specify the order explicitly, disable auto-discovery by "
|
||||
"defining ``PLUGINS`` in the desired order."
|
||||
msgstr ""
|
||||
"对于关联到同一个信号的多个插件,将按照它们注册的前后顺序执行。但若设置了 ``PLUGINS`` 配置项,则会"
|
||||
"以此配置项中的顺序为准。如果您使用了无需PLUGINS设置的新版命名空间插件,它们将按照被探测到的顺序进"
|
||||
"行连接(与 pelican-plugins 输出的顺序相同)。若您此时仍想要显式指定顺序,设置 ``PLUGINS`` 配置项"
|
||||
"即可。"
|
||||
|
||||
#: ../../plugins.rst:112 062aa3a3402141cfbd376d4fee1b5b34
|
||||
msgid "Namespace plugin structure"
|
||||
msgstr "命名空间插件的结构"
|
||||
|
||||
#: ../../plugins.rst:109 e6968290620d4de3b71ff62d5abba91f
|
||||
#: ../../plugins.rst:114 e6968290620d4de3b71ff62d5abba91f
|
||||
msgid ""
|
||||
"Namespace plugins must adhere to a certain structure in order to function"
|
||||
" properly. They need to be installable (i.e. contain ``setup.py`` or "
|
||||
"equivalent) and have a folder structure as follows::"
|
||||
msgstr "命名空间插件必须遵循特定的结构才能正常工作。这些插件需要是可安装的(即包含 ``setup.py`` 或其他等效文件),并且遵循下述文件夹结构:"
|
||||
|
||||
#: ../../plugins.rst:122 b9782f71fae14bce9854b8b5056407d8
|
||||
msgid ""
|
||||
"It is crucial that ``pelican`` or ``pelican/plugins`` folder **not** "
|
||||
"contain an ``__init__.py`` file. In fact, it is best to have those "
|
||||
"folders empty besides the listed folders in the above structure and keep "
|
||||
"your plugin related files contained solely in the "
|
||||
"``pelican/plugins/myplugin`` folder to avoid any issues."
|
||||
"Namespace plugins must adhere to a certain structure in order to function properly. They need to "
|
||||
"be installable (i.e. contain ``setup.py`` or equivalent) and have a folder structure as follows::"
|
||||
msgstr ""
|
||||
"非常关键的一点就是, ``pelican`` 和 ``pelican/plugins`` 文件夹下都 **不能** 包含 "
|
||||
"``__init__.py`` 文件。事实上,这两个文件夹下最好是只有上面列出的文件夹,并且保证与插件相关的文件都仅包含在 "
|
||||
"命名空间插件必须遵循特定的结构才能正常工作。这些插件需要是可安装的(即包含 ``setup.py`` 或其他等"
|
||||
"效文件),并且遵循下述文件夹结构:"
|
||||
|
||||
#: ../../plugins.rst:127 b9782f71fae14bce9854b8b5056407d8
|
||||
msgid ""
|
||||
"It is crucial that ``pelican`` or ``pelican/plugins`` folder **not** contain an ``__init__.py`` "
|
||||
"file. In fact, it is best to have those folders empty besides the listed folders in the above "
|
||||
"structure and keep your plugin related files contained solely in the ``pelican/plugins/"
|
||||
"myplugin`` folder to avoid any issues."
|
||||
msgstr ""
|
||||
"非常关键的一点就是, ``pelican`` 和 ``pelican/plugins`` 文件夹下都 **不能** 包含 ``__init__.py`` "
|
||||
"文件。事实上,这两个文件夹下最好是只有上面列出的文件夹,并且保证与插件相关的文件都仅包含在 "
|
||||
"``pelican/plugins/myplugin`` 文件夹中,以避免奇奇怪怪的问题。"
|
||||
|
||||
#: ../../plugins.rst:128 8440bc91329c498c90fadab556391a84
|
||||
#: ../../plugins.rst:133 8440bc91329c498c90fadab556391a84
|
||||
msgid ""
|
||||
"To easily set up the proper structure, a `cookiecutter template for "
|
||||
"plugins`_ is provided. Refer to that project's README for instructions on"
|
||||
" how to use it."
|
||||
msgstr "为了让大家更容易就能建立正确的结构,我们为插件提供了一个 `cookiecutter模板`_ ,使用方法参考此项目README文件中的指示即可。"
|
||||
"To easily set up the proper structure, a `cookiecutter template for plugins`_ is provided. Refer "
|
||||
"to that project's README for instructions on how to use it."
|
||||
msgstr ""
|
||||
"为了让大家更容易就能建立正确的结构,我们为插件提供了一个 `cookiecutter模板`_ ,使用方法参考此项目"
|
||||
"README文件中的指示即可。"
|
||||
|
||||
#: ../../plugins.rst:134 bb029c6c9ea14a2dac684d516fb9a1eb
|
||||
#: ../../plugins.rst:139 bb029c6c9ea14a2dac684d516fb9a1eb
|
||||
msgid "List of signals"
|
||||
msgstr "信号列表"
|
||||
|
||||
#: ../../plugins.rst:136 968d92d9b3bb4491ad9c0e4a015e73f9
|
||||
#: ../../plugins.rst:141 968d92d9b3bb4491ad9c0e4a015e73f9
|
||||
msgid "Here is the list of currently implemented signals:"
|
||||
msgstr "下面是目前已经实现了的信号:"
|
||||
|
||||
#: ../../plugins.rst:139 f2db011f146d40bf9f07ec6b09c7c6d0
|
||||
#: ../../plugins.rst:144 f2db011f146d40bf9f07ec6b09c7c6d0
|
||||
msgid "Signal"
|
||||
msgstr "信号"
|
||||
|
||||
#: ../../plugins.rst:139 32f683cb25c74315ac803c62868bd7b2
|
||||
#: ../../plugins.rst:144 32f683cb25c74315ac803c62868bd7b2
|
||||
msgid "Arguments"
|
||||
msgstr "参数"
|
||||
|
||||
#: ../../plugins.rst:139 d02ae4c30dec40ae8bd894fda051562d
|
||||
#: ../../plugins.rst:144 d02ae4c30dec40ae8bd894fda051562d
|
||||
msgid "Description"
|
||||
msgstr "描述"
|
||||
|
||||
#: ../../plugins.rst:141 d526b9cb6c3c409f9b2d243082dfbdc3
|
||||
#: ../../plugins.rst:146 d526b9cb6c3c409f9b2d243082dfbdc3
|
||||
msgid "initialized"
|
||||
msgstr "initialized"
|
||||
|
||||
#: ../../plugins.rst:141 ../../plugins.rst:142 ../../plugins.rst:160
|
||||
#: ../../plugins.rst:163 0ab3e30cf009477980c4c619e0a7dc5e
|
||||
#: 8cf4a2d70a234250a4d9f63e4e8cb49f a600f769faef42d99333442745c7b498
|
||||
#: a69e7ba2df7a47658b2f0e4ade60d455
|
||||
#: ../../plugins.rst:146 ../../plugins.rst:147 ../../plugins.rst:167 ../../plugins.rst:170
|
||||
#: 8cf4a2d70a234250a4d9f63e4e8cb49f
|
||||
msgid "pelican object"
|
||||
msgstr "pelican object"
|
||||
|
||||
#: ../../plugins.rst:142 3aff44965eec41269a45fd0b84b8b5d7
|
||||
#: ../../plugins.rst:147 3aff44965eec41269a45fd0b84b8b5d7
|
||||
msgid "finalized"
|
||||
msgstr "finalized"
|
||||
|
||||
#: ../../plugins.rst:142 6a3bd6c773b245af9151ff5669ef7f84
|
||||
#: ../../plugins.rst:147 6a3bd6c773b245af9151ff5669ef7f84
|
||||
msgid ""
|
||||
"invoked after all the generators are executed and just before pelican "
|
||||
"exits useful for custom post processing actions, such as: - minifying "
|
||||
"js/css assets. - notify/ping search engines with an updated sitemap."
|
||||
msgstr "所有generator执行完成后调用,即pelican退出之前。这对于自定义后处理操作是非常有用的,例如可以简化js/css资源、向搜索引擎告知更新后的sitemap。"
|
||||
"invoked after all the generators are executed and just before pelican exits useful for custom "
|
||||
"post processing actions, such as: - minifying js/css assets. - notify/ping search engines with "
|
||||
"an updated sitemap."
|
||||
msgstr ""
|
||||
"所有generator执行完成后调用,即pelican退出之前。这对于自定义后处理操作是非常有用的,例如可以简化"
|
||||
"js/css资源、向搜索引擎告知更新后的sitemap。"
|
||||
|
||||
#: ../../plugins.rst:146 eecb5a5dc1b84f94a830db617122f365
|
||||
#: ../../plugins.rst:151 eecb5a5dc1b84f94a830db617122f365
|
||||
msgid "generator_init"
|
||||
msgstr "generator_init"
|
||||
|
||||
#: ../../plugins.rst:146 b01311f8da704b55b38e23149c60bc22
|
||||
#: ../../plugins.rst:151 b01311f8da704b55b38e23149c60bc22
|
||||
msgid "generator"
|
||||
msgstr "generator"
|
||||
|
||||
#: ../../plugins.rst:146 a3c477e7a8d04e94af4ee7a82c873ef2
|
||||
#: ../../plugins.rst:151 a3c477e7a8d04e94af4ee7a82c873ef2
|
||||
msgid "invoked in the Generator.__init__"
|
||||
msgstr "在Generator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:147 246a49eb99d34589ac409e5613f27069
|
||||
#: ../../plugins.rst:152 246a49eb99d34589ac409e5613f27069
|
||||
msgid "all_generators_finalized"
|
||||
msgstr "all_generators_finalized"
|
||||
|
||||
#: ../../plugins.rst:147 0dafe1a8f7224b1bbe1af3ebeeac0b31
|
||||
#: ../../plugins.rst:152 0dafe1a8f7224b1bbe1af3ebeeac0b31
|
||||
msgid "generators"
|
||||
msgstr "generators"
|
||||
|
||||
#: ../../plugins.rst:147 9d5130f91ac748e58d96cfba7711e8f6
|
||||
#: ../../plugins.rst:152 9d5130f91ac748e58d96cfba7711e8f6
|
||||
msgid "invoked after all the generators are executed and before writing output"
|
||||
msgstr "在所有generator执行完后,写入输出内容前调用,"
|
||||
msgstr "在所有generator执行完后、写入输出内容前调用"
|
||||
|
||||
#: ../../plugins.rst:148 3a7f543549164bb684f47daa5b1b9bd1
|
||||
#: ../../plugins.rst:153 3a7f543549164bb684f47daa5b1b9bd1
|
||||
msgid "readers_init"
|
||||
msgstr "readers_init"
|
||||
|
||||
#: ../../plugins.rst:148 0946829014734c53a0b1e389df853daf
|
||||
#: ../../plugins.rst:153 0946829014734c53a0b1e389df853daf
|
||||
msgid "readers"
|
||||
msgstr "readers"
|
||||
|
||||
#: ../../plugins.rst:148 380ba486fff24555b3c312bee4645d23
|
||||
#: ../../plugins.rst:153 380ba486fff24555b3c312bee4645d23
|
||||
msgid "invoked in the Readers.__init__"
|
||||
msgstr "在Readers.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:149 ../../plugins.rst:203 04aa2b44a0b84da9b62b952b627a2b5c
|
||||
#: e725d629327b48e3a7dffad1d07d81d2
|
||||
#: ../../plugins.rst:154 ../../plugins.rst:210 e725d629327b48e3a7dffad1d07d81d2
|
||||
msgid "article_generator_context"
|
||||
msgstr "article_generator_context"
|
||||
|
||||
#: ../../plugins.rst:149 f0c440ead7fc46e2a90685c3fdffb5d4
|
||||
#: ../../plugins.rst:154 f0c440ead7fc46e2a90685c3fdffb5d4
|
||||
msgid "article_generator, metadata"
|
||||
msgstr "article_generator, metadata"
|
||||
|
||||
#: ../../plugins.rst:150 ../../plugins.rst:205 2ed41de1aaed481195aeacbc841459be
|
||||
#: e9e159b6d49d4cd29ebbe6eb6e0bb3b1
|
||||
#: ../../plugins.rst:154 1b2fbadf156644429e66ad2e64d26658
|
||||
msgid ""
|
||||
"invoked after the content and metadata for the article has been generated; use if you need to "
|
||||
"adjust the article metadata before it gets used by Pelican."
|
||||
msgstr "在文章内容和元数据生成后调用;若想要修改给入Pelican的文章元数据,可以使用此信号。"
|
||||
|
||||
#: ../../plugins.rst:157 ../../plugins.rst:212 2ed41de1aaed481195aeacbc841459be
|
||||
msgid "article_generator_preread"
|
||||
msgstr "article_generator_preread"
|
||||
|
||||
#: ../../plugins.rst:150 ../../plugins.rst:152 ../../plugins.rst:153
|
||||
#: ../../plugins.rst:156 37277bd83e254f47b6df91ba6790f79e
|
||||
#: 9d3b745b96114ff7931cbcc372901c3e b89f87d254984ec59e25045227c708bf
|
||||
#: d38f0e2931b84b82adcc5aca5a4c2233
|
||||
#: ../../plugins.rst:157 ../../plugins.rst:159 ../../plugins.rst:160 ../../plugins.rst:163
|
||||
#: b89f87d254984ec59e25045227c708bf
|
||||
msgid "article_generator"
|
||||
msgstr "article_generator"
|
||||
|
||||
#: ../../plugins.rst:150 7a45243569e84c1e9d5d49b5c1a7b86a
|
||||
#: ../../plugins.rst:157 7a45243569e84c1e9d5d49b5c1a7b86a
|
||||
msgid ""
|
||||
"invoked before a article is read in ArticlesGenerator.generate_context; "
|
||||
"use if code needs to do something before every article is parsed"
|
||||
msgstr "在ArticlesGenerator.generate_context读取文章之前调用;若代码需要在解析每篇文章前执行某些操作,就可以使用此信号。"
|
||||
"invoked before a article is read in ArticlesGenerator.generate_context; use if code needs to do "
|
||||
"something before every article is parsed"
|
||||
msgstr ""
|
||||
"在ArticlesGenerator.generate_context读取文章之前调用;若代码需要在每篇文章解析前执行某些操作,就"
|
||||
"可以使用此信号"
|
||||
|
||||
#: ../../plugins.rst:152 87c8e4ad4a104cb889172025f1b0229b
|
||||
#: ../../plugins.rst:159 87c8e4ad4a104cb889172025f1b0229b
|
||||
msgid "article_generator_init"
|
||||
msgstr "article_generator_init"
|
||||
|
||||
#: ../../plugins.rst:152 46c1e5fbb90a4668afda3d66e4520689
|
||||
#: ../../plugins.rst:159 46c1e5fbb90a4668afda3d66e4520689
|
||||
msgid "invoked in the ArticlesGenerator.__init__"
|
||||
msgstr "在ArticlesGenerator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:153 de4b631d41e946c485ebb813e3dd6b62
|
||||
#: ../../plugins.rst:160 de4b631d41e946c485ebb813e3dd6b62
|
||||
msgid "article_generator_pretaxonomy"
|
||||
msgstr "article_generator_pretaxonomy"
|
||||
|
||||
#: ../../plugins.rst:153 697a45a251fe4188b1f32cec631427b9
|
||||
#: ../../plugins.rst:160 697a45a251fe4188b1f32cec631427b9
|
||||
msgid ""
|
||||
"invoked before categories and tags lists are created useful when e.g. "
|
||||
"modifying the list of articles to be generated so that removed articles "
|
||||
"are not leaked in categories or tags"
|
||||
msgstr "在创建类别和标签列表之前调用。例如,当需要变更要生成的文章列表时可以使用,如此可以避免一些已移除文章在分类或标签列表中泄露。"
|
||||
"invoked before categories and tags lists are created useful when e.g. modifying the list of "
|
||||
"articles to be generated so that removed articles are not leaked in categories or tags"
|
||||
msgstr ""
|
||||
"在类别和标签列表创建之前调用。例如,当需要变更待生成的文章列表时可以使用,如此可以避免一些已移除"
|
||||
"文章在分类或标签列表中泄露"
|
||||
|
||||
#: ../../plugins.rst:156 ../../plugins.rst:204 051dcac75cbf4f5ea3a665e6da642324
|
||||
#: 2360e283fdd142ab8d65792581522e72
|
||||
#: ../../plugins.rst:163 ../../plugins.rst:211 2360e283fdd142ab8d65792581522e72
|
||||
msgid "article_generator_finalized"
|
||||
msgstr "article_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:156 0c3c808d5b7044018f8566ccc6dd3010
|
||||
#: ../../plugins.rst:163 0c3c808d5b7044018f8566ccc6dd3010
|
||||
msgid "invoked at the end of ArticlesGenerator.generate_context"
|
||||
msgstr "在ArticlesGenerator.generate_context的最后调用"
|
||||
|
||||
#: ../../plugins.rst:157 60d78048da4843a7a0307218c078d151
|
||||
#: ../../plugins.rst:164 60d78048da4843a7a0307218c078d151
|
||||
msgid "article_generator_write_article"
|
||||
msgstr "article_generator_write_article"
|
||||
|
||||
#: ../../plugins.rst:157 2ac0d0e7306a4d5086bb2e8b7b17ffb1
|
||||
#: ../../plugins.rst:164 2ac0d0e7306a4d5086bb2e8b7b17ffb1
|
||||
msgid "article_generator, content"
|
||||
msgstr "article_generator, content"
|
||||
|
||||
#: ../../plugins.rst:157 565551e010964925b10a3b5734913119
|
||||
#: ../../plugins.rst:164 565551e010964925b10a3b5734913119
|
||||
msgid "invoked before writing each article, the article is passed as content"
|
||||
msgstr "在写入每篇文章前调用,文章以内容的形式作为参数传入。"
|
||||
msgstr "在写入每篇文章前调用,文章以内容的形式传入"
|
||||
|
||||
#: ../../plugins.rst:158 fd7918c3200f4714b028c8d0a200df98
|
||||
#: ../../plugins.rst:165 fd7918c3200f4714b028c8d0a200df98
|
||||
msgid "article_writer_finalized"
|
||||
msgstr "article_writer_finalized"
|
||||
|
||||
#: ../../plugins.rst:158 e54633543dbf4e5fb2dd4c1bfc09b1c1
|
||||
#: ../../plugins.rst:165 e54633543dbf4e5fb2dd4c1bfc09b1c1
|
||||
msgid "article_generator, writer"
|
||||
msgstr "article_generator, writer"
|
||||
|
||||
#: ../../plugins.rst:158 965e61a0fd6347faa2d7224a50a98b76
|
||||
#: ../../plugins.rst:165 965e61a0fd6347faa2d7224a50a98b76
|
||||
msgid ""
|
||||
"invoked after all articles and related pages have been written, but "
|
||||
"before the article generator is closed."
|
||||
"invoked after all articles and related pages have been written, but before the article generator "
|
||||
"is closed."
|
||||
msgstr "在所有文章及相关联页面写入完成后,在文章generator关闭前调用。"
|
||||
|
||||
#: ../../plugins.rst:160 30df01c5c11a4ed58b006d78b007c68d
|
||||
#: ../../plugins.rst:167 30df01c5c11a4ed58b006d78b007c68d
|
||||
msgid "get_generators"
|
||||
msgstr "get_generators"
|
||||
|
||||
#: ../../plugins.rst:160 758447f5e55a4738a14486b0e962034d
|
||||
#: ../../plugins.rst:167 758447f5e55a4738a14486b0e962034d
|
||||
msgid ""
|
||||
"invoked in Pelican.get_generator_classes, can return a Generator, or "
|
||||
"several generators in a tuple or in a list."
|
||||
msgstr "在Pelican.get_generator_classes中调用,可以返回一个Generator,也可以以一个元组或列表的形式返回多个generator。"
|
||||
"invoked in Pelican.get_generator_classes, can return a Generator, or several generators in a "
|
||||
"tuple or in a list."
|
||||
msgstr ""
|
||||
"在Pelican.get_generator_classes中调用,可以返回一个Generator,也可以以一个元组或列表的形式返回多"
|
||||
"个generator。"
|
||||
|
||||
#: ../../plugins.rst:163 730e948388a24435be216830e0af5be6
|
||||
#: ../../plugins.rst:170 730e948388a24435be216830e0af5be6
|
||||
msgid "get_writer"
|
||||
msgstr "get_writer"
|
||||
|
||||
#: ../../plugins.rst:163 df9f9fef24984c4bad07b8834e79352f
|
||||
#: ../../plugins.rst:170 df9f9fef24984c4bad07b8834e79352f
|
||||
msgid "invoked in Pelican.get_writer, can return a custom Writer."
|
||||
msgstr "在Pelican.get_writer前调用,可以返回一个自定义Writer。"
|
||||
|
||||
#: ../../plugins.rst:165 ../../plugins.rst:206 1c172b26e92543d2be488a88cceaf576
|
||||
#: 252231854c504621b28243dfba9d88ab
|
||||
#: ../../plugins.rst:172 ../../plugins.rst:213 1c172b26e92543d2be488a88cceaf576
|
||||
msgid "page_generator_context"
|
||||
msgstr "page_generator_context"
|
||||
|
||||
#: ../../plugins.rst:165 a830e240c6564552ba4952bc657120a9
|
||||
#: ../../plugins.rst:172 a830e240c6564552ba4952bc657120a9
|
||||
msgid "page_generator, metadata"
|
||||
msgstr "page_generator, metadata"
|
||||
|
||||
#: ../../plugins.rst:166 ../../plugins.rst:207 09add2ea39344ad8936296a07cfd8e82
|
||||
#: 0fc3cf365d9d418b8225e8f1f5da76d0
|
||||
#: ../../plugins.rst:173 ../../plugins.rst:214 09add2ea39344ad8936296a07cfd8e82
|
||||
msgid "page_generator_preread"
|
||||
msgstr "page_generator_preread"
|
||||
|
||||
#: ../../plugins.rst:166 ../../plugins.rst:168 ../../plugins.rst:169
|
||||
#: 3c31cfe2f4744cd987f1638a4b82e5de a80ec8c388cb477abbcfc4f558d34df7
|
||||
#: ../../plugins.rst:173 ../../plugins.rst:175 ../../plugins.rst:176
|
||||
#: d485c4f9c2c443748234827727cc887e
|
||||
msgid "page_generator"
|
||||
msgstr "page_generator"
|
||||
|
||||
#: ../../plugins.rst:166 4d8b96aa6ebf47d885cd978c336679ff
|
||||
#: ../../plugins.rst:173 4d8b96aa6ebf47d885cd978c336679ff
|
||||
msgid ""
|
||||
"invoked before a page is read in PageGenerator.generate_context; use if "
|
||||
"code needs to do something before every page is parsed."
|
||||
msgstr "在PageGenerator.generate_context读取页面前调用,若代码需要在解析每个页面前执行某些操作,就可以使用此信号。"
|
||||
"invoked before a page is read in PageGenerator.generate_context; use if code needs to do "
|
||||
"something before every page is parsed."
|
||||
msgstr ""
|
||||
"在PageGenerator.generate_context读取页面前调用,若代码需要在解析每个页面前执行某些操作,就可以使"
|
||||
"用此信号。"
|
||||
|
||||
#: ../../plugins.rst:168 ../../plugins.rst:209 06adf06d2b204100b9f80850b84bdff0
|
||||
#: c0988434a401410e8cf6b4528e6d2870
|
||||
#: ../../plugins.rst:175 ../../plugins.rst:216 c0988434a401410e8cf6b4528e6d2870
|
||||
msgid "page_generator_init"
|
||||
msgstr "page_generator_init"
|
||||
|
||||
#: ../../plugins.rst:168 d359da10912949fa999dc3ad5215be66
|
||||
#: ../../plugins.rst:175 d359da10912949fa999dc3ad5215be66
|
||||
msgid "invoked in the PagesGenerator.__init__"
|
||||
msgstr "在PagesGenerator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:169 ../../plugins.rst:208 0994b38b87704caea04ef0671a7b1c67
|
||||
#: a97cf5f236a64959aa09838dbe03dfdc
|
||||
#: ../../plugins.rst:176 ../../plugins.rst:215 a97cf5f236a64959aa09838dbe03dfdc
|
||||
msgid "page_generator_finalized"
|
||||
msgstr "page_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:169 4cfdfe952daf4e3ea5ea1c8b2cf7a664
|
||||
#: ../../plugins.rst:176 4cfdfe952daf4e3ea5ea1c8b2cf7a664
|
||||
msgid "invoked at the end of PagesGenerator.generate_context"
|
||||
msgstr "在PagesGenerator.generate_context的最后调用"
|
||||
|
||||
#: ../../plugins.rst:170 7e2504584a1b4fa4ae88c5002bcbb26f
|
||||
#: ../../plugins.rst:177 7e2504584a1b4fa4ae88c5002bcbb26f
|
||||
msgid "page_generator_write_page"
|
||||
msgstr "page_generator_write_page"
|
||||
|
||||
#: ../../plugins.rst:170 ea204a5fe703472ea5afea283135b94d
|
||||
#: ../../plugins.rst:177 ea204a5fe703472ea5afea283135b94d
|
||||
msgid "page_generator, content"
|
||||
msgstr "page_generator, content"
|
||||
|
||||
#: ../../plugins.rst:170 22dd198fe6dc498f944e2c0e2c595c6c
|
||||
#: ../../plugins.rst:177 22dd198fe6dc498f944e2c0e2c595c6c
|
||||
msgid "invoked before writing each page, the page is passed as content"
|
||||
msgstr "在写入每个页面前调用,页面以内容形式作为参数传入"
|
||||
|
||||
#: ../../plugins.rst:171 84d5def2c4fc4a2489d2b4fc1fa445df
|
||||
#: ../../plugins.rst:178 84d5def2c4fc4a2489d2b4fc1fa445df
|
||||
msgid "page_writer_finalized"
|
||||
msgstr "page_writer_finalized"
|
||||
|
||||
#: ../../plugins.rst:171 c55d65276a4e49c58c34d12cc062c90d
|
||||
#: ../../plugins.rst:178 c55d65276a4e49c58c34d12cc062c90d
|
||||
msgid "page_generator, writer"
|
||||
msgstr "page_generator, writer"
|
||||
|
||||
#: ../../plugins.rst:171 b2a3d1c7c2864a08829833bc16b3223e
|
||||
msgid ""
|
||||
"invoked after all pages have been written, but before the page generator "
|
||||
"is closed."
|
||||
#: ../../plugins.rst:178 b2a3d1c7c2864a08829833bc16b3223e
|
||||
msgid "invoked after all pages have been written, but before the page generator is closed."
|
||||
msgstr "调用于所有页面写入完成后,在页面generator关闭前。"
|
||||
|
||||
#: ../../plugins.rst:173 ../../plugins.rst:210 097c5b3dc1d34a5eb7c1b4ae67179b3e
|
||||
#: a420152f887e4977bdd26a5fa7230915
|
||||
#: ../../plugins.rst:180 ../../plugins.rst:217 a420152f887e4977bdd26a5fa7230915
|
||||
msgid "static_generator_context"
|
||||
msgstr "static_generator_context"
|
||||
|
||||
#: ../../plugins.rst:173 1bbacfe960644e4a902b9c866e3fffce
|
||||
#: ../../plugins.rst:180 1bbacfe960644e4a902b9c866e3fffce
|
||||
msgid "static_generator, metadata"
|
||||
msgstr "static_generator, metadata"
|
||||
|
||||
#: ../../plugins.rst:174 ../../plugins.rst:211 c1242bcf76fc40568f67a2ce4e70c0bb
|
||||
#: f407aa94870645c891bb349edc3ae9a4
|
||||
#: ../../plugins.rst:181 ../../plugins.rst:218 f407aa94870645c891bb349edc3ae9a4
|
||||
msgid "static_generator_preread"
|
||||
msgstr "static_generator_preread"
|
||||
|
||||
#: ../../plugins.rst:174 ../../plugins.rst:177 ../../plugins.rst:178
|
||||
#: 36f5be5c982b42d097c0465f542e490f cf0ebefd743246dd9db1b37a8c6a43a8
|
||||
#: d5cd54887d904bcca02b0df4f22580e9
|
||||
#: ../../plugins.rst:181 ../../plugins.rst:184 ../../plugins.rst:185
|
||||
#: cf0ebefd743246dd9db1b37a8c6a43a8
|
||||
msgid "static_generator"
|
||||
msgstr "static_generator"
|
||||
|
||||
#: ../../plugins.rst:174 1b2fbadf156644429e66ad2e64d26658
|
||||
#: ../../plugins.rst:181 1b2fbadf156644429e66ad2e64d26658
|
||||
msgid ""
|
||||
"invoked before a static file is read in StaticGenerator.generate_context;"
|
||||
" use if code needs to do something before every static file is added to "
|
||||
"the staticfiles list."
|
||||
msgstr "在StaticGenerator.generate_context读取静态文件前调用,若代码需要在每个静态文件加入静态文件列表前进行一些修改,就可以使用此信号。"
|
||||
"invoked before a static file is read in StaticGenerator.generate_context; use if code needs to "
|
||||
"do something before every static file is added to the staticfiles list."
|
||||
msgstr ""
|
||||
"在StaticGenerator.generate_context读取静态文件前调用,若代码需要在每个静态文件加入静态文件列表前"
|
||||
"进行一些修改,就可以使用此信号。"
|
||||
|
||||
#: ../../plugins.rst:177 654377fe53434f77b3ba294b5689d1d4
|
||||
#: ../../plugins.rst:184 654377fe53434f77b3ba294b5689d1d4
|
||||
msgid "static_generator_init"
|
||||
msgstr "static_generator_init"
|
||||
|
||||
#: ../../plugins.rst:177 e9b3cbbde7a6443a81d025d1a4fe6145
|
||||
#: ../../plugins.rst:184 e9b3cbbde7a6443a81d025d1a4fe6145
|
||||
msgid "invoked in the StaticGenerator.__init__"
|
||||
msgstr "在StaticGenerator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:178 202be739e43444f48f122d3e5f657a45
|
||||
#: ../../plugins.rst:185 202be739e43444f48f122d3e5f657a45
|
||||
msgid "static_generator_finalized"
|
||||
msgstr "static_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:178 06080672fd614d39a79aa6d3a783087f
|
||||
#: ../../plugins.rst:185 06080672fd614d39a79aa6d3a783087f
|
||||
msgid "invoked at the end of StaticGenerator.generate_context"
|
||||
msgstr "在StaticGenerator.generate_context的最后调用"
|
||||
|
||||
#: ../../plugins.rst:179 ce174fb4533143518c13b16ab6dbe4c8
|
||||
#: ../../plugins.rst:186 ce174fb4533143518c13b16ab6dbe4c8
|
||||
msgid "content_object_init"
|
||||
msgstr "content_object_init"
|
||||
|
||||
#: ../../plugins.rst:179 5089a38bad1447cab62f350df8e76f31
|
||||
#: ../../plugins.rst:186 5089a38bad1447cab62f350df8e76f31
|
||||
msgid "content_object"
|
||||
msgstr "content_object"
|
||||
|
||||
#: ../../plugins.rst:179 d105f652be424f5cad8bfaf7be69ec4b
|
||||
#: ../../plugins.rst:186 d105f652be424f5cad8bfaf7be69ec4b
|
||||
msgid "invoked at the end of Content.__init__"
|
||||
msgstr "在Content.__init__的最后调用"
|
||||
|
||||
#: ../../plugins.rst:180 dbda8a11bca744a4ba5fc51d044f1d6e
|
||||
#: ../../plugins.rst:187 dbda8a11bca744a4ba5fc51d044f1d6e
|
||||
msgid "content_written"
|
||||
msgstr "content_written"
|
||||
|
||||
#: ../../plugins.rst:180 c8ba95ebcc2e4c79ae79717a730fe504
|
||||
#: ../../plugins.rst:187 c8ba95ebcc2e4c79ae79717a730fe504
|
||||
msgid "path, context"
|
||||
msgstr "path, context"
|
||||
|
||||
#: ../../plugins.rst:180 6d9caed8fa24400a86f8ede1c3ecb260
|
||||
#: ../../plugins.rst:187 6d9caed8fa24400a86f8ede1c3ecb260
|
||||
msgid "invoked each time a content file is written."
|
||||
msgstr "每一次内容文件写入后调用。"
|
||||
|
||||
#: ../../plugins.rst:181 73a4265b050c4b32be186bb2cec59f30
|
||||
#: ../../plugins.rst:188 73a4265b050c4b32be186bb2cec59f30
|
||||
msgid "feed_generated"
|
||||
msgstr "feed_generated"
|
||||
|
||||
#: ../../plugins.rst:181 78fa3603986f417286f2e7440f5aff57
|
||||
#: ../../plugins.rst:188 78fa3603986f417286f2e7440f5aff57
|
||||
msgid "context, feed"
|
||||
msgstr "context, feed"
|
||||
|
||||
#: ../../plugins.rst:181 13dcd9e5fb2f408db72b87b88877596b
|
||||
#: ../../plugins.rst:188 13dcd9e5fb2f408db72b87b88877596b
|
||||
msgid ""
|
||||
"invoked each time a feed gets generated. Can be used to modify a feed "
|
||||
"object before it gets written."
|
||||
"invoked each time a feed gets generated. Can be used to modify a feed object before it gets "
|
||||
"written."
|
||||
msgstr "每个feed生成前调用。可以用于在feed写入前修改之。"
|
||||
|
||||
#: ../../plugins.rst:183 3a959768d5704e459940cbfcf8e1459c
|
||||
#: ../../plugins.rst:190 3a959768d5704e459940cbfcf8e1459c
|
||||
msgid "feed_written"
|
||||
msgstr "feed_written"
|
||||
|
||||
#: ../../plugins.rst:183 86844bee049a445e87db283bdf325338
|
||||
#: ../../plugins.rst:190 86844bee049a445e87db283bdf325338
|
||||
msgid "path, context, feed"
|
||||
msgstr "path, context, feed"
|
||||
|
||||
#: ../../plugins.rst:183 e79185da7cb54bf5aa59a46846222391
|
||||
#: ../../plugins.rst:190 e79185da7cb54bf5aa59a46846222391
|
||||
msgid "invoked each time a feed file is written."
|
||||
msgstr "每一个feed文件写入后调用。"
|
||||
|
||||
#: ../../plugins.rst:188 0fe0539bad1c4fcbbebbdaa98d328ee9
|
||||
#: ../../plugins.rst:195 0fe0539bad1c4fcbbebbdaa98d328ee9
|
||||
msgid ""
|
||||
"Avoid ``content_object_init`` signal if you intend to read ``summary`` or"
|
||||
" ``content`` properties of the content object. That combination can "
|
||||
"result in unresolved links when :ref:`ref-linking-to-internal-content` "
|
||||
"(see `pelican-plugins bug #314`_). Use ``_summary`` and ``_content`` "
|
||||
"properties instead, or, alternatively, run your plugin at a later stage "
|
||||
"(e.g. ``all_generators_finalized``)."
|
||||
"Avoid ``content_object_init`` signal if you intend to read ``summary`` or ``content`` properties "
|
||||
"of the content object. That combination can result in unresolved links when :ref:`ref-linking-to-"
|
||||
"internal-content` (see `pelican-plugins bug #314`_). Use ``_summary`` and ``_content`` "
|
||||
"properties instead, or, alternatively, run your plugin at a later stage (e.g. "
|
||||
"``all_generators_finalized``)."
|
||||
msgstr ""
|
||||
"请避免使用 ``content_object_init`` 信号读取content对象的 ``summary`` 或 ``content`` "
|
||||
"属性,这可能导致在 :ref:`ref-linking-to-internal-content` 时无法解析链接(请参阅 `pelican-"
|
||||
"plugins bug #314`_ )。请改用 ``_summary`` 和 ``_content`` 属性,或者就在后续阶段再运行插件(例如 "
|
||||
"请避免使用 ``content_object_init`` 信号读取content对象的 ``summary`` 或 ``content`` 属性,这可能"
|
||||
"导致在 :ref:`ref-linking-to-internal-content` 时无法解析链接(请参阅 `pelican-plugins bug "
|
||||
"#314`_ )。请改用 ``_summary`` 和 ``_content`` 属性,或者就在后续阶段再运行插件(例如 "
|
||||
"``all_generators_finalized`` 时)。"
|
||||
|
||||
#: ../../plugins.rst:197 77ca681d0d7a4a9ea42f7eebf683f024
|
||||
#: ../../plugins.rst:204 77ca681d0d7a4a9ea42f7eebf683f024
|
||||
msgid ""
|
||||
"After Pelican 3.2, signal names were standardized. Older plugins may "
|
||||
"need to be updated to use the new names:"
|
||||
"After Pelican 3.2, signal names were standardized. Older plugins may need to be updated to use "
|
||||
"the new names:"
|
||||
msgstr "Pelican3.2之后,信号名都进行了标准化,较老的插件可能需要进行更新:"
|
||||
|
||||
#: ../../plugins.rst:201 c83f9215c5964ba49cb5ed849c777495
|
||||
#: ../../plugins.rst:208 c83f9215c5964ba49cb5ed849c777495
|
||||
msgid "Old name"
|
||||
msgstr "旧名称"
|
||||
|
||||
#: ../../plugins.rst:201 167435de345b443fa51c27b355121e14
|
||||
#: ../../plugins.rst:208 167435de345b443fa51c27b355121e14
|
||||
msgid "New name"
|
||||
msgstr "新名称"
|
||||
|
||||
#: ../../plugins.rst:203 bcdf136cbb2c4dedbd90f6e56f584c6b
|
||||
#: ../../plugins.rst:210 bcdf136cbb2c4dedbd90f6e56f584c6b
|
||||
msgid "article_generate_context"
|
||||
msgstr "article_generate_context"
|
||||
|
||||
#: ../../plugins.rst:204 60fe5b91f4a54f0997f93d927b0d81c4
|
||||
#: ../../plugins.rst:211 60fe5b91f4a54f0997f93d927b0d81c4
|
||||
msgid "article_generate_finalized"
|
||||
msgstr "article_generate_finalized"
|
||||
|
||||
#: ../../plugins.rst:205 31252537627f4042b7f7b4e0a4a33aeb
|
||||
#: ../../plugins.rst:212 31252537627f4042b7f7b4e0a4a33aeb
|
||||
msgid "article_generate_preread"
|
||||
msgstr "article_generate_preread"
|
||||
|
||||
#: ../../plugins.rst:206 719da4844a0a4b6fbb2cf2d9b7e51deb
|
||||
#: ../../plugins.rst:213 719da4844a0a4b6fbb2cf2d9b7e51deb
|
||||
msgid "pages_generate_context"
|
||||
msgstr "pages_generate_context"
|
||||
|
||||
#: ../../plugins.rst:207 f7c865fd6824473aad024fc606235b48
|
||||
#: ../../plugins.rst:214 f7c865fd6824473aad024fc606235b48
|
||||
msgid "pages_generate_preread"
|
||||
msgstr "pages_generate_preread"
|
||||
|
||||
#: ../../plugins.rst:208 74c47460bacf4fd68f2536580efb1480
|
||||
#: ../../plugins.rst:215 74c47460bacf4fd68f2536580efb1480
|
||||
msgid "pages_generator_finalized"
|
||||
msgstr "pages_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:209 b403e7f978c24d989d99587579f31d3c
|
||||
#: ../../plugins.rst:216 b403e7f978c24d989d99587579f31d3c
|
||||
msgid "pages_generator_init"
|
||||
msgstr "pages_generator_init"
|
||||
|
||||
#: ../../plugins.rst:210 94e5184530c94cc48d00fd819fffd649
|
||||
#: ../../plugins.rst:217 94e5184530c94cc48d00fd819fffd649
|
||||
msgid "static_generate_context"
|
||||
msgstr "static_generate_context"
|
||||
|
||||
#: ../../plugins.rst:211 00ca2c730ad840f584d3f9dd30daf0cd
|
||||
#: ../../plugins.rst:218 00ca2c730ad840f584d3f9dd30daf0cd
|
||||
msgid "static_generate_preread"
|
||||
msgstr "static_generate_preread"
|
||||
|
||||
#: ../../plugins.rst:215 f8044e028ccd4d64954e24375a739cd2
|
||||
#: ../../plugins.rst:222 f8044e028ccd4d64954e24375a739cd2
|
||||
msgid "Recipes"
|
||||
msgstr "具体使用方法举例"
|
||||
|
||||
#: ../../plugins.rst:217 0c441d12047240199025f2d3ac954167
|
||||
#: ../../plugins.rst:224 0c441d12047240199025f2d3ac954167
|
||||
msgid ""
|
||||
"We eventually realised some of the recipes to create plugins would be "
|
||||
"best shared in the documentation somewhere, so here they are!"
|
||||
"We eventually realised some of the recipes to create plugins would be best shared in the "
|
||||
"documentation somewhere, so here they are!"
|
||||
msgstr "下面分享了一些创建插件的具体方法,请享用!"
|
||||
|
||||
#: ../../plugins.rst:221 bb96f2da7b3340cb9ed56ee1ad59796b
|
||||
#: ../../plugins.rst:228 bb96f2da7b3340cb9ed56ee1ad59796b
|
||||
msgid "How to create a new reader"
|
||||
msgstr "如何创建一个新的reader"
|
||||
|
||||
#: ../../plugins.rst:223 49dbbbd2c5ca4798a1b9d67b48630d36
|
||||
#: ../../plugins.rst:230 49dbbbd2c5ca4798a1b9d67b48630d36
|
||||
msgid ""
|
||||
"One thing you might want is to add support for your very own input "
|
||||
"format. While it might make sense to add this feature in Pelican core, we"
|
||||
" wisely chose to avoid this situation and instead have the different "
|
||||
"readers defined via plugins."
|
||||
msgstr "你可能需要添加对输入文件格式的特殊支持。这似乎可以作为Pelican核心的一个功能,但我们选择避免将此功能放在核心中,而是通过插件实现不同的reader。"
|
||||
"One thing you might want is to add support for your very own input format. While it might make "
|
||||
"sense to add this feature in Pelican core, we wisely chose to avoid this situation and instead "
|
||||
"have the different readers defined via plugins."
|
||||
msgstr ""
|
||||
"你可能需要添加对输入文件格式的特殊支持。这似乎可以作为Pelican核心的一个功能,但我们选择避免将此功"
|
||||
"能放在核心中,而是通过插件实现不同的reader。"
|
||||
|
||||
#: ../../plugins.rst:228 af8936c711204a0aa7c85835124065c5
|
||||
#: ../../plugins.rst:235 af8936c711204a0aa7c85835124065c5
|
||||
msgid ""
|
||||
"The rationale behind this choice is mainly that plugins are really easy "
|
||||
"to write and don't slow down Pelican itself when they're not active."
|
||||
msgstr "做出这个决定主要是因为实现这样的格式支持插件非常容易,而且这样在不需要此功能时也不会影响Pelican自身的速度。"
|
||||
"The rationale behind this choice is mainly that plugins are really easy to write and don't slow "
|
||||
"down Pelican itself when they're not active."
|
||||
msgstr ""
|
||||
"做出这个决定主要是因为实现这样的格式支持插件非常容易,而且这样在不需要此功能时也不会影响Pelican自"
|
||||
"身的速度。"
|
||||
|
||||
#: ../../plugins.rst:231 11dac8bd71994c18a289086ec95a0273
|
||||
#: ../../plugins.rst:238 11dac8bd71994c18a289086ec95a0273
|
||||
msgid "No more talking — here is an example::"
|
||||
msgstr "多说无益,下面是一个具体例子:"
|
||||
|
||||
#: ../../plugins.rst:267 f6bf903ae8de4ac183ecea699de568dc
|
||||
#: ../../plugins.rst:274 f6bf903ae8de4ac183ecea699de568dc
|
||||
msgid "Adding a new generator"
|
||||
msgstr "添加新的generator"
|
||||
|
||||
#: ../../plugins.rst:269 50d39b45550446a493a6d5d6eb971103
|
||||
#: ../../plugins.rst:276 50d39b45550446a493a6d5d6eb971103
|
||||
msgid ""
|
||||
"Adding a new generator is also really easy. You might want to have a look"
|
||||
" at :doc:`internals` for more information on how to create your own "
|
||||
"generator."
|
||||
msgstr "添加一个generator也非常简单,你可能会想要看一看 :doc:`internals` ,其中有关于如何创建generator的内容。"
|
||||
"Adding a new generator is also really easy. You might want to have a look at :doc:`internals` "
|
||||
"for more information on how to create your own generator."
|
||||
msgstr ""
|
||||
"添加一个generator也非常简单,你可能会想要看一看 :doc:`internals` ,其中有关于如何创建generator的"
|
||||
"内容。"
|
||||
|
||||
#: ../../plugins.rst:283 1b4bc8c2b02645dd81b06ffdbd759c36
|
||||
#: ../../plugins.rst:290 1b4bc8c2b02645dd81b06ffdbd759c36
|
||||
msgid "Adding a new writer"
|
||||
msgstr "添加新的writer"
|
||||
|
||||
#: ../../plugins.rst:285 ac526121b895429d8412605bca594684
|
||||
#: ../../plugins.rst:292 ac526121b895429d8412605bca594684
|
||||
msgid ""
|
||||
"Adding a writer will allow you to output additional file formats to disk,"
|
||||
" or change how the existing formats are written to disk. Note that only "
|
||||
"one writer will be active at a time, so be sure to either subclass the "
|
||||
"built-in Writer, or completely re-implement it."
|
||||
msgstr "添加writer可以让你将其他文件格式输出到磁盘,或者可以改变现有格式写入磁盘的方式。请注意,一次只能启用一个writer,因此请确保继承了内置的Writer,并且完全重新实现之。"
|
||||
"Adding a writer will allow you to output additional file formats to disk, or change how the "
|
||||
"existing formats are written to disk. Note that only one writer will be active at a time, so be "
|
||||
"sure to either subclass the built-in Writer, or completely re-implement it."
|
||||
msgstr ""
|
||||
"添加writer可以让你将其他文件格式输出到磁盘,或者可以改变现有格式写入磁盘的方式。请注意,一次只能"
|
||||
"启用一个writer,因此请确保继承了内置的Writer,并且完全重新实现之。"
|
||||
|
||||
#: ../../plugins.rst:290 4335016710cd417ca9b8068cb7a45d51
|
||||
#: ../../plugins.rst:297 4335016710cd417ca9b8068cb7a45d51
|
||||
msgid "Here is a basic example of how to set up your own writer::"
|
||||
msgstr "下面是启用你的自定义writer的一个基本例子:"
|
||||
|
||||
#: ../../plugins.rst:310 c65b371d4bf740c49dfe190407c9af69
|
||||
#: ../../plugins.rst:317 c65b371d4bf740c49dfe190407c9af69
|
||||
msgid "Using Plugins to Inject Content"
|
||||
msgstr "使用插件添加内容"
|
||||
|
||||
#: ../../plugins.rst:312 9f180f86d09f43d7aff4607bb7deb6f1
|
||||
#: ../../plugins.rst:319 9f180f86d09f43d7aff4607bb7deb6f1
|
||||
msgid ""
|
||||
"You can programmatically inject articles or pages using plugins. This can"
|
||||
" be useful if you plan to fetch articles from an API, for example."
|
||||
"You can programmatically inject articles or pages using plugins. This can be useful if you plan "
|
||||
"to fetch articles from an API, for example."
|
||||
msgstr "可以通过插件以可编程的方式添加文章或页面。如果你打算从某些API获取文章,这就会很有用。"
|
||||
|
||||
#: ../../plugins.rst:315 a65dd6bb4d0e48438dcf6d545bfaa053
|
||||
#: ../../plugins.rst:322 a65dd6bb4d0e48438dcf6d545bfaa053
|
||||
msgid ""
|
||||
"Following is a simple example of how one can build a plugin that injects "
|
||||
"a custom article, using the ``article_generator_pretaxonomy`` signal::"
|
||||
msgstr "下面是一个简单的示例,说明了如何使用 ``article_generator_pretaxonomy`` 信号构建一个添加自定义文章的插件:"
|
||||
"Following is a simple example of how one can build a plugin that injects a custom article, using "
|
||||
"the ``article_generator_pretaxonomy`` signal::"
|
||||
msgstr ""
|
||||
"下面是一个简单的示例,说明了如何使用 ``article_generator_pretaxonomy`` 信号构建一个添加自定义文章"
|
||||
"的插件:"
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue