From b5e20d7f6d8520bb277c7c261eed8c33a53ae4de Mon Sep 17 00:00:00 2001 From: GeorgeHu <43069137+GeorgeHu6@users.noreply.github.com> Date: Tue, 3 Feb 2026 19:11:45 +0800 Subject: [PATCH 01/15] docs: Update Chinese translation (#3559) --- docs/locale/zh_CN/LC_MESSAGES/faq.po | 95 +++--- docs/locale/zh_CN/LC_MESSAGES/settings.po | 371 ++++++++++++---------- docs/locale/zh_CN/LC_MESSAGES/sphinx.po | 26 +- docs/locale/zh_CN/LC_MESSAGES/tips.po | 146 +++++---- 4 files changed, 354 insertions(+), 284 deletions(-) diff --git a/docs/locale/zh_CN/LC_MESSAGES/faq.po b/docs/locale/zh_CN/LC_MESSAGES/faq.po index f63513ea..f0738365 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/faq.po +++ b/docs/locale/zh_CN/LC_MESSAGES/faq.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PELICAN 4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-07 16:25+0800\n" -"PO-Revision-Date: 2024-06-27 19:00+0800\n" +"POT-Creation-Date: 2026-02-02 10:32+0800\n" +"PO-Revision-Date: 2026-02-02 10:32+0800\n" "Last-Translator: GeorgeHu \n" "Language: zh_CN\n" "Language-Team: \n" @@ -16,7 +16,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.17.0\n" #: ../../faq.rst:2 84467b3ab4b8411589855b3130e14406 msgid "Frequently Asked Questions (FAQ)" @@ -143,8 +143,9 @@ msgid "" " or add new templates, via the ``THEME_TEMPLATES_OVERRIDES`` variable. " "For example, to override the page template, you can define the location " "for your templates like this::" -msgstr "当然可以,覆盖部分模板文件或是添加一些模板文件都是可以的,使用 ``THEME_TEMPLATES_OVERRIDES`` 变量即可。" -"例如,若需要覆盖page的模板,可以向这样定义你自己的模板文件位置:" +msgstr "" +"当然可以,覆盖部分模板文件或是添加一些模板文件都是可以的,使用 ``THEME_TEMPLATES_OVERRIDES`` " +"变量即可。例如,若需要覆盖page的模板,可以向这样定义你自己的模板文件位置:" #: ../../faq.rst:77 a96870f0cad74996bec2469ea0c2e9e1 msgid "" @@ -198,51 +199,59 @@ msgid "" "(e.g., ``base.html``), the ``if`` statement should instead be::" msgstr "如果您想在其他模板(例如 ``base.html`` )中获取此元数据,则 ``if`` 语句应改为:" -#: ../../faq.rst:116 b78a678a165d40f4823fac2b19bcafc1 +#: ../../faq.rst:117 22fb499d05e041c4bea55515c5428685 +msgid "" +"Because the colon symbol (``:``) is used as a separator, be aware that " +"metadata field names *containing* a colon will probably not work." +msgstr "因为冒号 (``:``) 已经用作分隔符,字段名称包含冒号的元数据可能不会起作用。" + +#: ../../faq.rst:121 b78a678a165d40f4823fac2b19bcafc1 msgid "" "How do I make my output folder structure identical to my content " "hierarchy?" msgstr "如何使得输出目录的结构和content目录的结构保持一致?" -#: ../../faq.rst:118 851d1019c070482991667cc024063d29 +#: ../../faq.rst:123 851d1019c070482991667cc024063d29 msgid "Try these settings::" msgstr "可以尝试如下配置:" -#: ../../faq.rst:125 5195876e3f364a838d72b16c568263bc +#: ../../faq.rst:130 5195876e3f364a838d72b16c568263bc msgid "How do I assign custom templates on a per-page basis?" msgstr "如何为某个页面指定某个模板?" -#: ../../faq.rst:127 2ddd3cf1fbf048b1819bcfc9b3691a12 +#: ../../faq.rst:132 2ddd3cf1fbf048b1819bcfc9b3691a12 msgid "" "It's as simple as adding an extra line of metadata to any page or article" " that you want to have its own template. For example, this is how it " "would be handled for content in reST format::" msgstr "这非常简单,在任何页面或者文章中,都可以通过多添加一行元数据来指定特定模板。例如,在reST中,使用:" -#: ../../faq.rst:133 6f5eb40b4a5e4f83ab9d1cb48fefad57 +#: ../../faq.rst:138 6f5eb40b4a5e4f83ab9d1cb48fefad57 msgid "For content in Markdown format::" msgstr "对于Markdown,则使用:" -#: ../../faq.rst:137 2e28d1bf074c437eb5017bf6f345bf71 +#: ../../faq.rst:142 2e28d1bf074c437eb5017bf6f345bf71 msgid "" "Then just make sure your theme contains the relevant template file (e.g. " "``template_name.html``). If you just want to add a new custom template to" " an existing theme, you can also provide it in a directory specified by " "``THEME_TEMPLATES_OVERRIDES`` (see :ref:`settings/themes`)." msgstr "" +"接着只要确保主题中有相对应的模板文件 (e.g. ``template_name.html``)。如果只是需要把一个自定义" +"模板加到已有主题中,可以将其放在 ``THEME_TEMPLATES_OVERRIDES`` 指定的目录中 (详见 :ref:`settings/themes`)。" -#: ../../faq.rst:142 675e77f99f3c42bb8715c84a97c7a064 +#: ../../faq.rst:147 675e77f99f3c42bb8715c84a97c7a064 msgid "How can I override the generated URL of a specific page or article?" msgstr "如何重写某一个页面或文章生成的URL?" -#: ../../faq.rst:144 7e518b99b29d4787addc732d57e94ed1 +#: ../../faq.rst:149 7e518b99b29d4787addc732d57e94ed1 msgid "" "Include ``url`` and ``save_as`` metadata in any pages or articles that " "you want to override the generated URL. Here is an example page in reST " "format::" msgstr "在任意页面或文章中都可以添加 ``url`` 和 ``save_as`` 元数据,这样就可以重写URL了。下面以reST格式为例:" -#: ../../faq.rst:153 903306ecaed3483591b4ed2dcba3d183 +#: ../../faq.rst:158 903306ecaed3483591b4ed2dcba3d183 msgid "" "With this metadata, the page will be written to " "``override/url/index.html`` and Pelican will use the URL " @@ -251,18 +260,18 @@ msgstr "" "有了这样的元数据,此页面会保存为 ``override/url/index.html`` ,Pelican会将 ``override/url/``" " 作为链接到此页面的URL。" -#: ../../faq.rst:157 d80d84fcb6844e25a8452e29c4113181 +#: ../../faq.rst:162 d80d84fcb6844e25a8452e29c4113181 msgid "How can I use a static page as my home page?" msgstr "如何使用一个静态页面作为主页?" -#: ../../faq.rst:159 e17a2e2dd9014109888bab9286ee607c +#: ../../faq.rst:164 e17a2e2dd9014109888bab9286ee607c msgid "" "The override feature mentioned above can be used to specify a static page" " as your home page. The following Markdown example could be stored in " "``content/pages/home.md``::" msgstr "上一个问题中提到的特性可以用于实现此需求。下面例子中的Markdown文件保存为 ``content/pages/home.md`` :" -#: ../../faq.rst:169 b99ba0ca8656416cbdc38f3fa263b7eb +#: ../../faq.rst:174 b99ba0ca8656416cbdc38f3fa263b7eb msgid "" "If the original blog index is still wanted, it can then be saved in a " "different location by setting ``INDEX_SAVE_AS = 'blog_index.html'`` for " @@ -271,11 +280,11 @@ msgstr "" "如果仍需要原来的博客主页(即 ``'index'`` 直接模板),可以通过设置 ``INDEX_SAVE_AS = " "'blog_index.html'`` 将其存储在其他位置。" -#: ../../faq.rst:174 fca4725a57dd451fb3b0fb9df78f69b5 +#: ../../faq.rst:179 fca4725a57dd451fb3b0fb9df78f69b5 msgid "What if I want to disable feed generation?" msgstr "可以禁用订阅源生成吗?" -#: ../../faq.rst:176 e9c08140e2ed44f189a7a156db027a3e +#: ../../faq.rst:181 e9c08140e2ed44f189a7a156db027a3e msgid "" "To disable feed generation, all feed settings should be set to ``None``. " "All but three feed settings already default to ``None``, so if you want " @@ -285,19 +294,19 @@ msgstr "" "要禁用订阅源,所有订阅源相关的配置都应被设为 ``None`` 。其中有三项设置默认为 ``None`` " ",因此如果要彻底不生成订阅源,你只需要指定下面这些设置:" -#: ../../faq.rst:186 7820a481af4c4f44a40fb3ae80768a1d +#: ../../faq.rst:191 7820a481af4c4f44a40fb3ae80768a1d msgid "" "The word ``None`` should not be surrounded by quotes. Please note that " "``None`` and ``''`` are not the same thing." msgstr "``None`` 两侧不需要加引号。请注意 ``None`` 和 ``''`` 不是同一个东西。" -#: ../../faq.rst:190 4fa2ffbf1c274ec396a0d756762c260d +#: ../../faq.rst:195 4fa2ffbf1c274ec396a0d756762c260d msgid "" "I'm getting a warning about feeds generated without SITEURL being set " "properly" msgstr "Pelican警告说由于SITEURL设置不正确,无法正常生成订阅源" -#: ../../faq.rst:192 8d52f14f6b03476897dfb15c188a961a +#: ../../faq.rst:197 8d52f14f6b03476897dfb15c188a961a msgid "" "`RSS and Atom feeds require all URL links to be absolute " "`_. In order to " @@ -308,17 +317,17 @@ msgstr "" "`_ " "。为了使得Pelican能正确生成链接,你需要将站点的 ``SITEURL`` 设置为完整路径。" -#: ../../faq.rst:197 1412ceb735d44a30b58db3241248e7ec +#: ../../faq.rst:202 1412ceb735d44a30b58db3241248e7ec msgid "" "Feeds are still generated when this warning is displayed, but links " "within may be malformed and thus the feed may not validate." msgstr "虽然Pelican提出了警告,但是仍会生成订阅源,但其中的链接可能是无效的,这会导致订阅源不可用。" -#: ../../faq.rst:201 20cadccc527e4ebda08eac9ed34f5055 +#: ../../faq.rst:206 20cadccc527e4ebda08eac9ed34f5055 msgid "Can I force Atom feeds to show only summaries instead of article content?" msgstr "可以让Atom订阅源只显示摘要,不显示文章内容吗?" -#: ../../faq.rst:203 9c45ba2ec5c6402e86e89661b943d1ad +#: ../../faq.rst:208 9c45ba2ec5c6402e86e89661b943d1ad msgid "" "Instead of having to open a separate browser window to read articles, the" " overwhelming majority of folks who use feed readers prefer to read " @@ -335,11 +344,11 @@ msgstr "" " ``content`` " "字段,因此Pelican在发布RSS时默认只包含摘要(当然也可以设置为包含文章内容)。Pelican在订阅源生成上的如此行为就可以让用户自行选择订阅类型:包含了完整内容的Atom或是只包含摘要的RSS。" -#: ../../faq.rst:214 bf0d4ca837f74d9ab6618db6306c6a70 +#: ../../faq.rst:219 bf0d4ca837f74d9ab6618db6306c6a70 msgid "Is Pelican only suitable for blogs?" msgstr "Pelican只适合用于博客吗?" -#: ../../faq.rst:216 49697f375cfc49b08f5d0c2297d15028 +#: ../../faq.rst:221 49697f375cfc49b08f5d0c2297d15028 msgid "" "No. Pelican can be easily configured to create and maintain any type of " "static site. This may require a little customization of your theme and " @@ -349,13 +358,13 @@ msgid "" "tag-related pages via::" msgstr "不是的。Pelican可以方便地用于创建维护任何静态站点,为此你需要对主题和配置做一些定制。例如,如果要为你的产品构建一个宣传网站,即不需要使用标签特性,从主题中移除与标签相关的HTML代码即可。另外,还可以通过下面的设置来禁用标签相关页面的生成:" -#: ../../faq.rst:226 0a59dd7209554237912579b362d07788 +#: ../../faq.rst:231 0a59dd7209554237912579b362d07788 msgid "" "Why does Pelican always write all HTML files even with content caching " "enabled?" msgstr "启用内容缓存后,为什么Pelican仍会每次都写入所有HTML文件?" -#: ../../faq.rst:228 6291b82d02fc4450a79d1200b5d04f62 +#: ../../faq.rst:233 6291b82d02fc4450a79d1200b5d04f62 msgid "" "In order to reliably determine whether the HTML output is different " "before writing it, a large part of the generation environment including " @@ -368,7 +377,7 @@ msgid "" "reliable." msgstr "为了确定HTML输出确实和之前的不同,模板上下文、插件等很多生成环境都需要保存并比较某种哈希值(对于不可哈希的内容类型还需要进行一些额外处理)。另外,由于插件、分页等内容的存在,输出的HTML很可能会与之前不同。因此,考虑到处理时间和存储空间,每次都重新写入全部HTML会更快更可靠。" -#: ../../faq.rst:237 5cc5e1361f914c92b0670030f0c83f5d +#: ../../faq.rst:242 5cc5e1361f914c92b0670030f0c83f5d msgid "" "However, this means that the modification time of the files changes every" " time, so a ``rsync`` based upload will transfer them even if their " @@ -380,11 +389,11 @@ msgstr "" "上传时会把没有变化的内容也进行上传。一个简便的解决方法就是给 ``rsync`` 加上 ``--checksum`` " "选项,这会比Pelican在生成时进行校验更快。" -#: ../../faq.rst:244 b24c40be89b94f3b980cbbda38d46115 +#: ../../faq.rst:249 b24c40be89b94f3b980cbbda38d46115 msgid "How to process only a subset of all articles?" msgstr "如何只处理一部分文章?" -#: ../../faq.rst:246 fa34a90481f44ace83ee16401543ce09 +#: ../../faq.rst:251 fa34a90481f44ace83ee16401543ce09 msgid "" "It is often useful to process only e.g. 10 articles for debugging " "purposes. This can be achieved by explicitly specifying only the " @@ -395,11 +404,11 @@ msgstr "" "简便起见,在调试时可能只需要处理几篇文章。可以直接在配置项 ``ARTICLE_PATHS`` 中添加需要处理文章的文件名。可以通过像 ``cd " "content; find -name '*.md' | head -n 10`` 这样的命令获取文章文件名的列表。" -#: ../../faq.rst:252 0fa566e3aa084cb9b04e0cee32684222 +#: ../../faq.rst:257 0fa566e3aa084cb9b04e0cee32684222 msgid "My tag cloud is missing/broken since I upgraded Pelican" msgstr "在升级Pelican后,标签云消失或不可用了" -#: ../../faq.rst:254 0bd1304a12c24f048b227c68391b148c +#: ../../faq.rst:259 0bd1304a12c24f048b227c68391b148c msgid "" "In an ongoing effort to streamline Pelican, tag cloud generation has been" " moved out of Pelican core and into a separate `plugin " @@ -410,11 +419,11 @@ msgstr "" "`_ 中。查看 :ref:`plugins` " "文档获取更多关于Pelican插件系统的信息。" -#: ../../faq.rst:260 1833dfba94c74f4bb9e9f0a112ed3e0f +#: ../../faq.rst:265 1833dfba94c74f4bb9e9f0a112ed3e0f msgid "Since I upgraded Pelican my pages are no longer rendered" msgstr "升级Pelican后,一些页面没有被渲染" -#: ../../faq.rst:262 576e5c2338ba4c43a51bb562301ad0c2 +#: ../../faq.rst:267 576e5c2338ba4c43a51bb562301ad0c2 msgid "" "Pages were available to themes as lowercase ``pages`` and uppercase " "``PAGES``. To bring this inline with the :ref:`templates-variables` " @@ -426,15 +435,15 @@ msgstr "" "variables` 一节中的内容保持一致,大写的 ``PAGES`` 被删除了。只要将主题中的 ``PAGES`` 替换为 ``pages`` " ",问题即可解决。例如将原先的:" -#: ../../faq.rst:269 355512b9f6b34ece9b6baed128b2ca4d +#: ../../faq.rst:274 355512b9f6b34ece9b6baed128b2ca4d msgid "with something like::" msgstr "替换为:" -#: ../../faq.rst:274 99ef769943fe41c4a37ca951e905b2ba +#: ../../faq.rst:279 99ef769943fe41c4a37ca951e905b2ba msgid "How can I stop Pelican from trying to parse my static files as content?" -msgstr "如何避免让Pelican将我的静态文件解析为内容文件?(译者注:例如要将一个HTML文件作为静态文件)?" +msgstr "如何避免让Pelican将我的静态文件解析为内容文件?(译者注:例如要将一个HTML文件作为静态文件)" -#: ../../faq.rst:276 4efb20c5b82d41afb07151599fa189dd +#: ../../faq.rst:281 4efb20c5b82d41afb07151599fa189dd msgid "" "Pelican's article and page generators run before it's static generator. " "That means if you use a setup similar to the default configuration, where" @@ -447,7 +456,7 @@ msgstr "" "配置项中,所有以有效内容文件后缀结尾的文件( ``.html`` 、 ``.rst`` 、 ``.md`` " "等)都会被视为文章或者页面,而不是静态文件。" -#: ../../faq.rst:282 d959eb6a67fe440caa70105e1692bf93 +#: ../../faq.rst:287 d959eb6a67fe440caa70105e1692bf93 msgid "" "To circumvent this issue either use the appropriate ``*_EXCLUDES`` " "setting or disable the offending reader via ``READERS`` if you don't need" @@ -456,11 +465,11 @@ msgstr "" "为了避免这个问题,使用合适的 ``*_EXCLUDES`` 配置,在必要时还可以通过 ``READERS`` " "配置项来直接禁用产生问题的reader。" -#: ../../faq.rst:286 5e64dc4b6fad4e7ea07278f5a2529e89 +#: ../../faq.rst:291 5e64dc4b6fad4e7ea07278f5a2529e89 msgid "Why is [arbitrary Markdown syntax] not supported?" msgstr "为什么不是所有的Markdown语法都支持?" -#: ../../faq.rst:288 6872a70ec1434c41a78d465271761c69 +#: ../../faq.rst:293 6872a70ec1434c41a78d465271761c69 msgid "" "Pelican does not directly handle Markdown processing and instead " "delegates that task to the Python-Markdown_ project, the core of which " diff --git a/docs/locale/zh_CN/LC_MESSAGES/settings.po b/docs/locale/zh_CN/LC_MESSAGES/settings.po index ef07e611..ef52fc73 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/settings.po +++ b/docs/locale/zh_CN/LC_MESSAGES/settings.po @@ -7,8 +7,8 @@ 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-02-02 10:32+0800\n" +"PO-Revision-Date: 2026-02-02 10:32+0800\n" "Last-Translator: GeorgeHu \n" "Language: zh_CN\n" "Language-Team: \n" @@ -138,8 +138,9 @@ msgid "" "Extra configuration settings for the docutils publisher (applicable only " "to reStructuredText). See `Docutils Configuration`_ settings for more " "details. The default is ``{}`` with no extra configuration settings." -msgstr "docutils的额外配置项(只针对reStructuredText有效)。在 `Docutils 配置`_ 设置中查看更多信息。" -"默认为 ``{}`` ,即不做任何额外配置。" +msgstr "" +"docutils的额外配置项(只针对reStructuredText有效)。在 `Docutils 配置`_ 设置中查看更多信息。默认为 " +"``{}`` ,即不做任何额外配置。" #: ../../settings.rst:86 841018ef5c0c410c92bc7780acf25291 msgid "" @@ -176,8 +177,9 @@ msgid "" " also includes a list of extensions you may want to include. See `Jinja " "Environment documentation`_. The default is ``{'extensions': [], " "'trim_blocks': True, 'lstrip_blocks': True}``." -msgstr "一个字典,用于配置自定义Jinja2环境变量。这其中也包含了要使用的扩展列表。详见 `Jinja环境文档`_ 。" -"本项设置默认为 ``{'extensions': [], 'trim_blocks': True, 'lstrip_blocks': True}`` 。" +msgstr "" +"一个字典,用于配置自定义Jinja2环境变量。这其中也包含了要使用的扩展列表。详见 `Jinja环境文档`_ 。本项设置默认为 " +"``{'extensions': [], 'trim_blocks': True, 'lstrip_blocks': True}`` 。" #: ../../settings.rst:111 b0e2be83c4684482a75198372a093d96 msgid "" @@ -207,8 +209,9 @@ msgid "" "A dictionary of custom Jinja2 tests you want to use. The dictionary " "should map test names to test functions. See: `Jinja custom tests " "documentation`_. The default is ``{}``." -msgstr "一个字典,自定义了要使用的Jinja测试。字典中应该是测试名到测试函数的映射。详见: `Jinja自定义测试文档`_ 。" -"本项设置默认为 ``{}`` 。" +msgstr "" +"一个字典,自定义了要使用的Jinja测试。字典中应该是测试名到测试函数的映射。详见: `Jinja自定义测试文档`_ 。本项设置默认为 " +"``{}`` 。" #: ../../settings.rst:139 06c6769420a744ea9fc27fc3e930bfcb msgid "" @@ -245,8 +248,9 @@ msgid "" "directories, and ``['__pycache__']`` would ignore Python 3's bytecode " "caches." msgstr "" -"通配符模式的列表。匹配到其中任一个模式,或是 ``watchfiles.DefaultFilter`` 中设置了隐藏的文件和目录都会被忽略。" -"例如,默认的 ``['**/.*']`` 可以用于忽略任何隐藏文件与目录, ``['__pycache__']`` 则可以忽略Python3的字节码缓存文件。" +"通配符模式的列表。匹配到其中任一个模式,或是 ``watchfiles.DefaultFilter`` " +"中设置了隐藏的文件和目录都会被忽略。例如,默认的 ``['**/.*']`` 可以用于忽略任何隐藏文件与目录, " +"``['__pycache__']`` 则可以忽略Python3的字节码缓存文件。" #: ../../settings.rst:171 6d3691b43e9741bd97f11cf56ddd89ff msgid "" @@ -336,7 +340,9 @@ msgid "" "Controls the extension that will be used by the SourcesGenerator. " "Defaults to ``.text``. If not a valid string the default value will be " "used. The default is ``'.text'``." -msgstr "控制SourcesGenerator使用的扩展名。默认为 ``.text`` 。如果设置的值是无效的,会使用默认值。本项配置默认为 ``'.text'`` 。" +msgstr "" +"控制SourcesGenerator使用的扩展名。默认为 ``.text`` 。如果设置的值是无效的,会使用默认值。本项配置默认为 " +"``'.text'`` 。" #: ../../settings.rst:246 5763cdeffac14fb4a4403b534251e8e2 msgid "The list of plugins to load. See :ref:`plugins`. The default is ``None``." @@ -378,8 +384,10 @@ msgid "" "and in ``PAGE_PATHS`` or ``ARTICLE_PATHS``. Pelican's default settings " "include the \"images\" directory here. The default is ``['images']``." msgstr "" -"用于查找静态文件的目录列表(相对于 ``PATH`` 目录)。静态文件会原封不动地拷贝到输出目录中。文章、页面以及其他的内容源文件都会被跳过,因此一个目录可以安全地同时出现在此选项以及" -" ``PAGE_PATHS`` 或 ``ARTICLE_PATHS`` 中。Pelican默认会将 \"images\" 目录包含在此选项中。本项配置默认为 ``['images']`` 。" +"用于查找静态文件的目录列表(相对于 ``PATH`` " +"目录)。静态文件会原封不动地拷贝到输出目录中。文章、页面以及其他的内容源文件都会被跳过,因此一个目录可以安全地同时出现在此选项以及 " +"``PAGE_PATHS`` 或 ``ARTICLE_PATHS`` 中。Pelican默认会将 \"images\" " +"目录包含在此选项中。本项配置默认为 ``['images']`` 。" #: ../../settings.rst:279 562736e3c91442bbb062e85e63d6f1f9 msgid "" @@ -400,9 +408,10 @@ msgstr "" "如果此选项设为False, ``STATIC_PATHS`` " "中的内容源文件将不会被忽略,也会像静态文件一样被原封不动地拷贝。此项设置是为了给3.5版本前的Pelican进行向后兼容的。若某个目录同时出现在了" " ``STATIC_PATHS`` 和 ``ARTICLE_PATHS`` 中,或 ``STATIC_PATHS`` 和 " -"``PAGE_PATHS`` 中时才会生效。如果你是想将站点的源文件发布出去的话,请考虑使用 ``OUTPUT_SOURCES`` 。本项配置默认为 ``True`` 。" +"``PAGE_PATHS`` 中时才会生效。如果你是想将站点的源文件发布出去的话,请考虑使用 ``OUTPUT_SOURCES`` " +"。本项配置默认为 ``True`` 。" -#: ../../settings.rst:294 a4a2ef0dfd6442fb889bf9bfe33688 +#: ../../settings.rst:294 a4a2ef0dfd6442fb889bf9bfe33688ee msgid "" "Create links instead of copying files. If the content and output " "directories are on the same device, then create hard links. Falls back " @@ -431,7 +440,8 @@ msgid "" "via: ``python -m pip install typogrify``. The default is ``False``." msgstr "" "若此项设置为True,一些显示上的改进将通过 `Typogrify `_" -" 库合并到生成的HTML中。可以通过 ``python -m pip install typogrify`` 进行安装。本项配置默认为 ``False`` 。" +" 库合并到生成的HTML中。可以通过 ``python -m pip install typogrify`` 进行安装。本项配置默认为 " +"``False`` 。" #: ../../settings.rst:315 f4a976dc583346eebd71cedbbd43839c msgid "" @@ -449,9 +459,10 @@ msgid "" "default, no filter is omitted (in other words, all filters get applied). " "This setting requires that Typogrify version 2.1.0 or later is installed." " The default is ``[]``." -msgstr "要忽略的Typogrify过滤器列表。可用值包括: ``'amp'`` 、 ``'smartypants'`` 、 ``'caps'`` 、 " -"``'initial_quotes'`` 、 ``'widont'`` 。默认不忽略任何过滤器。本项配置需要2.1.0或以上版本的Typogrify。" -"本项配置默认为 ``[]`` 。" +msgstr "" +"要忽略的Typogrify过滤器列表。可用值包括: ``'amp'`` 、 ``'smartypants'`` 、 ``'caps'`` 、 " +"``'initial_quotes'`` 、 ``'widont'`` " +"。默认不忽略任何过滤器。本项配置需要2.1.0或以上版本的Typogrify。本项配置默认为 ``[]`` 。" #: ../../settings.rst:329 8b9d3479e18c407090a4aac6a1dcafdf msgid "" @@ -467,7 +478,8 @@ msgstr "" "此设置用于设置Typogrify的Smartypants过滤器,控制过滤器如何解析多个破折号/连字符/减号。单个ASCII破折号字符 " "(``-``) 始终被视为连字符。设为 ``default`` 时不处理短破折号,并会将双连字符转换为长破折号;设为 ``oldschool`` " "时会将两个 ( ``--`` ) 和三个 ( ``--`` ) 连字符分别呈现为短破折号和长破折号;设为 " -"``oldschool_inverted`` 时则会将两个连字符转换为长破折号,而将三个连字符转换为短破折号。本项配置默认为 ``'default'`` " +"``oldschool_inverted`` 时则会将两个连字符转换为长破折号,而将三个连字符转换为短破折号。本项配置默认为 " +"``'default'`` " #: ../../settings.rst:340 44489695c0bb4c75ba04e6d23b17a6b7 msgid "" @@ -508,7 +520,6 @@ msgstr "" ":ref:`reading_only_modified_content` 。本项配置默认为 ``True`` 。" #: ../../settings.rst:367 c29c4ca7127741d49a164b7dff038232 -#, python-brace-format msgid "" "Regular expression that is used to parse internal links. Default syntax " "when linking to internal files, tags, etc., is to enclose the identifier," @@ -527,24 +538,26 @@ msgid "" "blocks. See :ref:`internal_pygments_options` for a list of supported " "options. The default is ``{}``." msgstr "" -"reStructuredText代码块的默认Pygments设置列表。请参阅 " -":ref:`internal_pygments_options` 查看支持选项列表。本项配置默认为 ``{}`` 。" +"reStructuredText代码块的默认Pygments设置列表。请参阅 :ref:`internal_pygments_options` " +"查看支持选项列表。本项配置默认为 ``{}`` 。" #: ../../settings.rst:382 aa2425b88dea4351bf184f127a5965de msgid "" "If ``True``, saves content in caches. See " ":ref:`reading_only_modified_content` for details about caching. The " "default is ``False``." -msgstr "若设为 ``True`` ,会将内容保存在缓存中。有关缓存请参阅 :ref:`reading_only_modified_content` 。" -"本项配置默认为 ``False`` 。" +msgstr "" +"若设为 ``True`` ,会将内容保存在缓存中。有关缓存请参阅 :ref:`reading_only_modified_content` " +"。本项配置默认为 ``False`` 。" #: ../../settings.rst:388 fe1ca91d569e4c2584b0dd3907761f40 msgid "" "If set to ``'reader'``, save only the raw content and metadata returned " "by readers. If set to ``'generator'``, save processed content objects. " "The default is ``'reader'``." -msgstr "若设为 ``reader`` ,则只保存reader返回的原始内容和元数据。若设为 ``generator`` ,则保存处理过的内容对象。" -"本项配置默认为 ``'reader'`` 。" +msgstr "" +"若设为 ``reader`` ,则只保存reader返回的原始内容和元数据。若设为 ``generator`` " +",则保存处理过的内容对象。本项配置默认为 ``'reader'`` 。" #: ../../settings.rst:394 9fc3e0a091d0493cb1172bb1c3bde79d msgid "Directory in which to store cache files. The default is ``'cache'``." @@ -560,12 +573,12 @@ msgstr "若设为 ``True`` ,则使用gzip对缓存文件进行解压缩。本 msgid "Controls how files are checked for modifications." msgstr "调整判定文件是否修改的方式" -#: ../../settings.rst:405 ../../settings.rst:1448 +#: ../../settings.rst:405 ../../settings.rst:1445 #: 18648953d9c040c8bd0b98d212509bbf msgid "If set to ``'mtime'``, the modification time of the file is checked." msgstr "若设为 ``mtime`` ,则检查文件的修改时间。" -#: ../../settings.rst:407 ../../settings.rst:1450 +#: ../../settings.rst:407 ../../settings.rst:1447 #: e5596360b86d44ef81b01bb259b4b189 msgid "" "If set to a name of a function provided by the ``hashlib`` module, e.g. " @@ -779,8 +792,9 @@ msgid "" "The location we will save the page. This value has to be the same as " "PAGE_URL or you need to use a rewrite in your server config. The default " "is ``'pages/{slug}.html'``." -msgstr "页面的保存位置。除非在服务器上设置了重写规则,否则此项设置必须和PAGE_URL一致。" -"本项配置默认为 ``'pages/{slug}.html'`` 。" +msgstr "" +"页面的保存位置。除非在服务器上设置了重写规则,否则此项设置必须和PAGE_URL一致。本项配置默认为 " +"``'pages/{slug}.html'`` 。" #: ../../settings.rst:550 6596ed1c997349bf94a503bdaa8b9e68 #, python-brace-format @@ -985,8 +999,9 @@ msgid "" " be set to ``title`` to use the \"Title:\" metadata tag or ``basename`` " "to use the article's file name when creating the slug. The default is " "``'title'``." -msgstr "自动生成slug所依赖的内容。可以指定为元数据标签 ``title`` ,也可以使用文章源文件的文件名 ``basename`` 。" -"本项配置默认为 ``'title'`` 。" +msgstr "" +"自动生成slug所依赖的内容。可以指定为元数据标签 ``title`` ,也可以使用文章源文件的文件名 ``basename`` 。本项配置默认为" +" ``'title'`` 。" #: ../../settings.rst:698 161c36590f2b40a3a4d9dab57848fba7 msgid "" @@ -1001,8 +1016,9 @@ msgstr "" msgid "" "Preserve uppercase characters in slugs. Set ``True`` to keep uppercase " "characters from ``SLUGIFY_SOURCE`` as-is. The default is ``False``." -msgstr "指定是否保留slug中的大写字母。若设为 ``True`` ,则会原样保留 ``SLUGIFY_SOURCE`` 中的大写字母。" -"本项配置默认为 ``False`` 。" +msgstr "" +"指定是否保留slug中的大写字母。若设为 ``True`` ,则会原样保留 ``SLUGIFY_SOURCE`` 中的大写字母。本项配置默认为 " +"``False`` 。" #: ../../settings.rst:709 ea3e23a38ffe465e8fef398b69940b87 msgid "" @@ -1016,8 +1032,7 @@ msgid "" "default is::" msgstr "" "指定生成文章和页面slug时要进行的正则表达式替换。指定的是一对对 ``(from, to)`` " -"(from为要替换的内容,to为替换进去的内容),列表中的各对替换规则是按序执行且忽略大小写的。默认的替换会删除非字母非数字的字符并将内部空格替换为连字符。除此之外,slug会将所有字符转换为小写ASCII字符,并删除所有前导和末尾空格。这有利于现有URL的向后兼容。" -"本项配置默认如下:" +"(from为要替换的内容,to为替换进去的内容),列表中的各对替换规则是按序执行且忽略大小写的。默认的替换会删除非字母非数字的字符并将内部空格替换为连字符。除此之外,slug会将所有字符转换为小写ASCII字符,并删除所有前导和末尾空格。这有利于现有URL的向后兼容。本项配置默认如下:" #: ../../settings.rst:726 4ed665fd61124d7199e5d3a336a6490e msgid "" @@ -1282,75 +1297,75 @@ msgstr "" msgid "" "The domain prepended to feed URLs. Since feed URLs should always be " "absolute, it is highly recommended to define this (e.g., " -"\"https://feeds.example.com\"). If you have already explicitly defined " -"SITEURL (see above) and want to use the same domain for your feeds, you " -"can just set: ``FEED_DOMAIN = SITEURL``. The default is ``None``, which " -"uses the base URL \"/\"." +"\"https://feeds.example.com\"). The default is ``SITEURL``." msgstr "" "指定要附加到订阅源URL前面的域名。因为订阅源URL应该是绝对的,所以强烈推荐定义此设置项(例如 " -"https://feeds.example.com )。若SITEURL已经显式地定义了,并且希望使用相同地URL,就可以直接设置 " -"``FEED_DOMAIN = SITEURL`` 。本项配置默认为 ``None`` ,即使用基础URL \"/\" 。" +"https://feeds.example.com )。本项配置默认为 ``SITEURL`` 。" -#: ../../settings.rst:979 7a7143a49149452d999c2084cc0266e6 +#: ../../settings.rst:976 7a7143a49149452d999c2084cc0266e6 msgid "" "The location to save the Atom feed. The default is ``None``, for no Atom " "feed." msgstr "指定Atom订阅源的存储位置。本项配置默认为 ``None`` ,即不使用Atom订阅源。" -#: ../../settings.rst:984 2fd2426a582247f8a375940ecbd0f96a +#: ../../settings.rst:981 2fd2426a582247f8a375940ecbd0f96a msgid "" "Relative URL of the Atom feed. If not set, ``FEED_ATOM`` is used both for" " save location and URL. The default is ``None``." -msgstr "Atom订阅源的相对URL。如果未设置此项,会将 ``FEED_ATOM`` 同时用于存储位置和URL。" -"本项配置默认为 ``None`` 。" +msgstr "Atom订阅源的相对URL。如果未设置此项,会将 ``FEED_ATOM`` 同时用于存储位置和URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:989 c4758a4ce8f94850ba4567250259741d +#: ../../settings.rst:986 c4758a4ce8f94850ba4567250259741d msgid "" "The location to save the RSS feed. The default is ``None``, for no RSS " "feed." msgstr "RSS订阅源的存储位置。本项配置默认为 ``None`` ,即不使用RSS订阅源。" -#: ../../settings.rst:993 737caf1d58854aa3b86820243fc80403 +#: ../../settings.rst:990 737caf1d58854aa3b86820243fc80403 msgid "" "Relative URL of the RSS feed. If not set, ``FEED_RSS`` is used both for " "save location and URL. The default is ``None``." msgstr "RSS订阅源的相对URL。如果未设置此项,会将 ``FEED_RSS`` 同时用于存储位置和URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:998 28942938054b490c8dd5ca8367d87ea9 +#: ../../settings.rst:995 28942938054b490c8dd5ca8367d87ea9 msgid "" "The location to save the all-posts Atom feed: this feed will contain all " "posts regardless of their language. The default is " "``'feeds/all.atom.xml'``." msgstr "存储all-posts Atom订阅源的文件位置:其中会包含所有语言的帖子。本项配置默认为 ``'feeds/all.atom.xml'`` 。" -#: ../../settings.rst:1003 f4e7fbd9297743ccaadafa11c7cfb1e1 +#: ../../settings.rst:1000 f4e7fbd9297743ccaadafa11c7cfb1e1 msgid "" "Relative URL of the all-posts Atom feed. If not set, ``FEED_ALL_ATOM`` is" " used both for save location and URL. The default is ``None``." -msgstr "all-posts Atom订阅源的相对URL。如果未设置此项,会将 ``FEED_ALL_ATOM`` 同时用于存储位置和URL。" -"本项配置默认为 ``None`` 。" +msgstr "" +"all-posts Atom订阅源的相对URL。如果未设置此项,会将 ``FEED_ALL_ATOM`` 同时用于存储位置和URL。本项配置默认为" +" ``None`` 。" -#: ../../settings.rst:1008 eaacfd07bdb94dd2a9c6792a1f036807 +#: ../../settings.rst:1005 eaacfd07bdb94dd2a9c6792a1f036807 msgid "" "The location to save the the all-posts RSS feed: this feed will contain " "all posts regardless of their language. The default is ``None``, for no " "all-posts RSS feed." -msgstr "存储all-posts RSS订阅源的文件位置:其中会包含所有语言的帖子。本项配置默认为 ``None`` ,即不使用all-posts RSS订阅源。" +msgstr "" +"存储all-posts RSS订阅源的文件位置:其中会包含所有语言的帖子。本项配置默认为 ``None`` ,即不使用all-posts " +"RSS订阅源。" -#: ../../settings.rst:1014 fe17f05439064eea8fb3dad8255cd467 +#: ../../settings.rst:1011 fe17f05439064eea8fb3dad8255cd467 msgid "" "Relative URL of the all-posts RSS feed. If not set, ``FEED_ALL_RSS`` is " "used both for save location and URL. The default is ``None``." -msgstr "all-posts RSS订阅源的相对URL。如果未设置此项,会将 ``FEED_ALL_RSS`` 同时用于存储位置和URL。本项配置默认为 ``None`` 。" +msgstr "" +"all-posts RSS订阅源的相对URL。如果未设置此项,会将 ``FEED_ALL_RSS`` 同时用于存储位置和URL。本项配置默认为 " +"``None`` 。" -#: ../../settings.rst:1019 c4758a4ce8f94850ba4567250259741d +#: ../../settings.rst:1016 c4758a4ce8f94850ba4567250259741d #, python-brace-format msgid "" "The location to save the category Atom feeds. [2]_ The default is " "``'feeds/{slug}.atom.xml'``." msgstr "category Atom订阅源的存储位置。 [2]_ 本项配置默认为 ``'feeds/{slug}.atom.xml'`` 。" -#: ../../settings.rst:1024 d31bcd45f3ee47e4a316ac3f765c527d +#: ../../settings.rst:1021 d31bcd45f3ee47e4a316ac3f765c527d #, python-brace-format msgid "" "Relative URL of the category Atom feeds, including the ``{slug}`` " @@ -1360,14 +1375,14 @@ msgstr "" "category Atom订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 " "``CATEGORY_FEED_ATOM`` 同时用于存储位置和URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1030 fabfac75a52f48029a8147f62289c252 +#: ../../settings.rst:1027 fabfac75a52f48029a8147f62289c252 #, python-brace-format msgid "" "The location to save the category RSS feeds, including the ``{slug}`` " "placeholder. [2]_ The default is ``None``, for no RSS feed." msgstr "category RSS订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_ 本项配置默认为 ``None`` ,即不使用RSS订阅源。" -#: ../../settings.rst:1035 fabfac75a52f48029a8147f62289c252 +#: ../../settings.rst:1032 fabfac75a52f48029a8147f62289c252 #, python-brace-format msgid "" "Relative URL of the category RSS feeds, including the ``{slug}`` " @@ -1377,14 +1392,16 @@ msgstr "" "category RSS订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 " "``CATEGORY_FEED_RSS`` 同时用于存储位置和URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1041 28942938054b490c8dd5ca8367d87ea9 +#: ../../settings.rst:1038 28942938054b490c8dd5ca8367d87ea9 #, python-brace-format msgid "" "The location to save the author Atom feeds. [2]_ The default is " "``'feeds/{slug}.atom.xml'``." -msgstr "author Atom订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_ 本项配置默认为 ``'feeds/{slug}.atom.xml'`` 。" +msgstr "" +"author Atom订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_ 本项配置默认为 " +"``'feeds/{slug}.atom.xml'`` 。" -#: ../../settings.rst:1046 fde52f62d95a4bad85a5a1b49eed6170 +#: ../../settings.rst:1043 fde52f62d95a4bad85a5a1b49eed6170 #, python-brace-format msgid "" "Relative URL of the author Atom feeds, including the ``{slug}`` " @@ -1394,14 +1411,14 @@ msgstr "" "author Atom订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 " "``AUTHOR_FEED_ATOM`` 同时用于存储位置和URL。本项配置默认为 ``None`` ,即不使用。" -#: ../../settings.rst:1052 c4758a4ce8f94850ba4567250259741d +#: ../../settings.rst:1049 c4758a4ce8f94850ba4567250259741d #, python-brace-format msgid "" "The location to save the author RSS feeds. [2]_ The default is " "``'feeds/{slug}.rss.xml'``." msgstr "author RSS订阅源的存储位置。 [2]_ 本项配置默认为 ``'feeds/{slug}.rss.xml'`` 。" -#: ../../settings.rst:1057 367ef87d541c45ffaf65e8d8b1469f1a +#: ../../settings.rst:1054 367ef87d541c45ffaf65e8d8b1469f1a #, python-brace-format msgid "" "Relative URL of the author RSS feeds, including the ``{slug}`` " @@ -1411,37 +1428,38 @@ msgstr "" "author RSS订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 ``AUTHOR_FEED_RSS`` " "同时用于存储位置和URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1063 b1159e07c8184831b6dcfd308cd23439 +#: ../../settings.rst:1060 b1159e07c8184831b6dcfd308cd23439 #, python-brace-format msgid "" "The location to save the tag Atom feed, including the ``{slug}`` " "placeholder. [2]_ The default is ``None``, for no tag feed." msgstr "tag Atom订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_ 本项配置默认为 ``None`` ,即不使用tag feed。" -#: ../../settings.rst:1068 d744ca82b48d4e9298f2ca19252aedec +#: ../../settings.rst:1065 d744ca82b48d4e9298f2ca19252aedec #, python-brace-format msgid "" "Relative URL of the tag Atom feed, including the ``{slug}`` placeholder. " "[2]_ The default is ``None``." msgstr "tag Atom订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 本项配置默认为 ``None`` 。" -#: ../../settings.rst:1073 b1159e07c8184831b6dcfd308cd23439 +#: ../../settings.rst:1070 b1159e07c8184831b6dcfd308cd23439 #, python-brace-format msgid "" "Relative URL to output the tag RSS feed, including the ``{slug}`` " "placeholder. If not set, ``TAG_FEED_RSS`` is used both for save location " "and URL. The default is ``None``, for no tag feed." -msgstr "tag RSS订阅源的相对URL,其中包含 ``{slug}`` 。如果未设置,会将 ``TAG_FEED_RSS`` 同时用于存储位置和URL。" -"本项配置默认为 ``None`` ,即不使用tag feed。" +msgstr "" +"tag RSS订阅源的相对URL,其中包含 ``{slug}`` 。如果未设置,会将 ``TAG_FEED_RSS`` " +"同时用于存储位置和URL。本项配置默认为 ``None`` ,即不使用tag feed。" -#: ../../settings.rst:1079 c8f29653c4f3423b8dec9905fa1de6f2 +#: ../../settings.rst:1076 c8f29653c4f3423b8dec9905fa1de6f2 msgid "" "Maximum number of items allowed in a feed. Setting to ``None`` will cause" " the feed to contains every article. 100 if not specified. The default is" " ``100``." msgstr "单个订阅源中允许包含的最多元素数量。若设为 ``None`` 表示不做上限;若不指定,默认上限为100。" -#: ../../settings.rst:1084 27393055cbb846bba21699d9a59502c2 +#: ../../settings.rst:1081 27393055cbb846bba21699d9a59502c2 msgid "" "Only include item summaries in the ``description`` tag of RSS feeds. If " "set to ``False``, the full content will be included instead. This setting" @@ -1450,28 +1468,28 @@ msgstr "" "仅在RSS订阅源的 ``description`` 标签中包含项目摘要。若设为 ``False`` ,则将包含完整内容。此项设置不会影响Atom " "feed,只针对RSS feed。本项配置默认为 ``True`` 。" -#: ../../settings.rst:1090 2c53416e07e34cc9998718fc5e82cc12 +#: ../../settings.rst:1087 2c53416e07e34cc9998718fc5e82cc12 msgid "" "If set to ``True``, ``?ref=feed`` will be appended to links in generated " "feeds for the purpose of referrer tracking. The default is ``False``." msgstr "若设为 ``True`` ,会将 ``?ref=feed`` 附到生成的链接中,以便追踪引用。本项配置默认为 ``False`` 。" -#: ../../settings.rst:1093 7f647c4c65494b93bb6d1c3ef4b39af6 +#: ../../settings.rst:1090 7f647c4c65494b93bb6d1c3ef4b39af6 msgid "" "If you don't want to generate some or any of these feeds, set the above " "variables to ``None``." msgstr "若你不想要生成某些订阅源,将对应变量设为 ``None`` 即可。" -#: ../../settings.rst:1096 372a88d4b1044ba491c1547e90014c73 +#: ../../settings.rst:1093 372a88d4b1044ba491c1547e90014c73 #, python-brace-format msgid "``{slug}`` is replaced by name of the category / author / tag." msgstr "``{slug}`` 会分别用分类名/作者名/标签名来替换。" -#: ../../settings.rst:1100 9913cc3370754eda888a2594a73ce4da +#: ../../settings.rst:1097 9913cc3370754eda888a2594a73ce4da msgid "Pagination" msgstr "分页" -#: ../../settings.rst:1102 caf94bfd47344208a34f6b10225646a1 +#: ../../settings.rst:1099 caf94bfd47344208a34f6b10225646a1 msgid "" "The default behaviour of Pelican is to list all the article titles along " "with a short description on the index page. While this works well for " @@ -1479,46 +1497,50 @@ msgid "" "probably benefit from paginating this list." msgstr "默认情况下,Pelican会把所有文章以简短描述的形式展示在首页上。虽然这对中小型网站效果不错,但对于拥有大量文章的网站来说可能需要将此列表进行分页。" -#: ../../settings.rst:1107 2667020362fe4d23a84b1d25b24863c3 +#: ../../settings.rst:1104 2667020362fe4d23a84b1d25b24863c3 msgid "You can use the following settings to configure the pagination." msgstr "你可以使用下面的设置来配置分页。" -#: ../../settings.rst:1111 656911c7bc2145b0bd1ff10d5373d7dc +#: ../../settings.rst:1108 656911c7bc2145b0bd1ff10d5373d7dc msgid "" "The minimum number of articles allowed on the last page. Use this when " "you don't want the last page to only contain a handful of articles. The " "default is ``0``." -msgstr "最后一页允许的最小文章数。当不希望最后一页仅包含少数文章时,请使用此选项。(译者注:当最后一页达不到此最小文章数时,会被合并到前一页)" -"本项配置默认为 ``0`` 。" +msgstr "" +"最后一页允许的最小文章数。当不希望最后一页仅包含少数文章时,请使用此选项。(译者注:当最后一页达不到此最小文章数时,会被合并到前一页)本项配置默认为" +" ``0`` 。" -#: ../../settings.rst:1117 030af02515a84a13925108ab06457c0b +#: ../../settings.rst:1114 030af02515a84a13925108ab06457c0b msgid "" "The maximum number of articles to include on a page, not including " "orphans. False to disable pagination. The default is ``False``." -msgstr "一个页面上包含的最大文章数,不包括孤立文章(译者注:当发生上一条设置选项中提到的合并时,最后一页显然会超过此最大文章数)。设为False会禁用分页。" -"本项配置默认为 ``False`` 。" +msgstr "" +"一个页面上包含的最大文章数,不包括孤立文章(译者注:当发生上一条设置选项中提到的合并时,最后一页显然会超过此最大文章数)。设为False会禁用分页。本项配置默认为" +" ``False`` 。" -#: ../../settings.rst:1122 478c5db91b16485b81ea4523ae70b6f1 +#: ../../settings.rst:1119 478c5db91b16485b81ea4523ae70b6f1 #, python-brace-format msgid "" "The templates to use pagination with, and the number of articles to " "include on a page. If this value is ``None``, it defaults to " "``DEFAULT_PAGINATION``. The default is ``{'index': None, 'tag': None, " "'category': None, 'author': None}``." -msgstr "指定哪些模板需要启用分页,以及对应的单页面文章数量。若设为 ``None`` ,则默认值为 ``DEFAULT_PAGINATION`` 。" -"本项配置默认为 ``{'index': None, 'tag': None, 'category': None, 'author': None}`` 。" +msgstr "" +"指定哪些模板需要启用分页,以及对应的单页面文章数量。若设为 ``None`` ,则默认值为 ``DEFAULT_PAGINATION`` " +"。本项配置默认为 ``{'index': None, 'tag': None, 'category': None, 'author': " +"None}`` 。" -#: ../../settings.rst:1128 631c92f55fca4dd4acff9348397bdead +#: ../../settings.rst:1125 631c92f55fca4dd4acff9348397bdead msgid "" "A set of patterns that are used to determine advanced pagination output. " "The default is::" msgstr "一组匹配模式,用于高级分页输出。本项配置默认如下:" -#: ../../settings.rst:1138 319e228179c2404dace7b1374e30a558 +#: ../../settings.rst:1135 319e228179c2404dace7b1374e30a558 msgid "Using Pagination Patterns" msgstr "使用分页模式" -#: ../../settings.rst:1140 7c7876166cba4db0bc8ca7c6ceb1f828 +#: ../../settings.rst:1137 7c7876166cba4db0bc8ca7c6ceb1f828 msgid "" "By default, pages subsequent to ``.../foo.html`` are created as " "``.../foo2.html``, etc. The ``PAGINATION_PATTERNS`` setting can be used " @@ -1528,7 +1550,7 @@ msgstr "" "默认情况下,连续页面的URL会如此编码:第一页为 ``.../foo.html`` ,后一页为 ``.../foo2.html`` " "。``PAGINATION_PATTERNS`` 就是用于修改这个编页规则的,其中是一些三元组:" -#: ../../settings.rst:1146 b96115cbd30a454e98427c2f568c9d9f +#: ../../settings.rst:1143 b96115cbd30a454e98427c2f568c9d9f #, python-brace-format msgid "" "For ``page_url`` and ``page_save_as``, you may use a number of variables." @@ -1546,7 +1568,7 @@ msgstr "" "相同,只不过会截去末尾的 ``/index`` (如果有的话)。 ``{number}`` 则等于页码。(译者注: " "``minimum_page`` 意味到达该页面数后开始使用此条规则)" -#: ../../settings.rst:1153 0513d4b59b6443a592d6c47abf6ffd13 +#: ../../settings.rst:1150 0513d4b59b6443a592d6c47abf6ffd13 msgid "" "For example, if you want to leave the first page unchanged, but place " "subsequent pages at ``.../page/2/`` etc, you could set " @@ -1555,52 +1577,54 @@ msgstr "" "举个例子,如果你想要保持第一面保持不变,但后续页面都以 ``.../page/2/`` 的形式出现,你可以如此设置 " "``PAGINATION_PATTERNS`` :" -#: ../../settings.rst:1163 a7e53284e5344eb5bab04206293349e4 +#: ../../settings.rst:1160 a7e53284e5344eb5bab04206293349e4 msgid "" "If you want a pattern to apply to the last page in the list, use ``-1`` " "as the ``minimum_page`` value::" msgstr "如果你想指定最后一面制定规则,将 ``minimum_page`` 的值设为 ``-1`` 即可:" -#: ../../settings.rst:1169 ee7ce86e8f1749e686233ec4a999dcc9 +#: ../../settings.rst:1166 ee7ce86e8f1749e686233ec4a999dcc9 msgid "Translations" msgstr "翻译" -#: ../../settings.rst:1171 66ba1c80957b4e84a265bbf1cfac36e5 +#: ../../settings.rst:1168 66ba1c80957b4e84a265bbf1cfac36e5 msgid "" "Pelican offers a way to translate articles. See the :doc:`Content " "` section for more information." msgstr "Pelican为文章翻译提供了展示方法。详见 :doc:`创作内容 ` 。" -#: ../../settings.rst:1176 27cab75cf2344a8c8d1573700e1f35ca +#: ../../settings.rst:1173 27cab75cf2344a8c8d1573700e1f35ca msgid "The default language to use. The default is ``'en'``." msgstr "指定默认语言。本项配置默认为 ``'en'`` 。" -#: ../../settings.rst:1180 2db269f9350e48098e8e06643b77a107 +#: ../../settings.rst:1177 2db269f9350e48098e8e06643b77a107 msgid "" "The metadata attribute(s) used to identify which articles are " "translations of one another. May be a string or a collection of strings. " "Set to ``None`` or ``False`` to disable the identification of " "translations. The default is ``'slug'``." -msgstr "指定用于标识不同翻译是同一篇文章的元数据。可以是一个或多个字符串。要禁用对文章翻译的识别,将此项设为 ``None`` 或 ``False`` 。" -"本项配置默认为 ``'slug'`` 。" +msgstr "" +"指定用于标识不同翻译是同一篇文章的元数据。可以是一个或多个字符串。要禁用对文章翻译的识别,将此项设为 ``None`` 或 ``False`` " +"。本项配置默认为 ``'slug'`` 。" -#: ../../settings.rst:1187 bfa4d3e17c6f42ac9ddeb79fd2131943 +#: ../../settings.rst:1184 bfa4d3e17c6f42ac9ddeb79fd2131943 msgid "" "The metadata attribute(s) used to identify which pages are translations " "of one another. May be a string or a collection of strings. Set to " "``None`` or ``False`` to disable the identification of translations. The " "default is ``'slug'``." -msgstr "指定用于标识不同翻译是同一个页面的元数据。可以是一个或多个字符串。要禁用对页面翻译的识别,将此项设为 ``None`` 或 ``False`` 。" -"本项配置默认为 ``'slug'`` 。" +msgstr "" +"指定用于标识不同翻译是同一个页面的元数据。可以是一个或多个字符串。要禁用对页面翻译的识别,将此项设为 ``None`` 或 ``False`` " +"。本项配置默认为 ``'slug'`` 。" -#: ../../settings.rst:1194 2ae8d30c65cb460194294c5a5de14f02 +#: ../../settings.rst:1191 2ae8d30c65cb460194294c5a5de14f02 #, python-brace-format msgid "" "The location to save the Atom feed for translations. [3]_ The default is " "``'feeds/all-{lang}.atom.xml'``." msgstr "指定各翻译Atom订阅源的存储位置。 [3]_ 本项配置默认为 ``'feeds/all-{lang}.atom.xml'`` 。" -#: ../../settings.rst:1199 bc09f3717a8a497680abc66b70745d0f +#: ../../settings.rst:1196 bc09f3717a8a497680abc66b70745d0f #, python-brace-format msgid "" "Relative URL of the Atom feed for translations, including the ``{lang}`` " @@ -1610,13 +1634,13 @@ msgstr "" "指定各翻译Atom feed的含有 ``{lang}`` 的相对URL。 [3]_ " "若未设置此项,``TRANSLATION_FEED_ATOM`` 会同时用于存储位置和URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1205 1049b8c5e754466684e120afb2f7d281 +#: ../../settings.rst:1202 1049b8c5e754466684e120afb2f7d281 msgid "" "Where to put the RSS feed for translations. The default is ``None``, " "meaning no RSS feed." msgstr "指定各翻译RSS订阅源的存储位置。本项配置默认为 ``None`` ,即无RSS feed。" -#: ../../settings.rst:1210 625b105c73764fce865b2504e811e055 +#: ../../settings.rst:1207 625b105c73764fce865b2504e811e055 #, python-brace-format msgid "" "Relative URL of the RSS feed for translations, including the ``{lang}`` " @@ -1626,28 +1650,28 @@ msgstr "" "文章或页面不同翻译在RSS订阅源中的相对路径,其中含有 ``{lang}``。 [3]_ " "若未设置此项,``TRANSLATION_FEED_RSS`` 会同时用于存储位置和URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1214 088e79d226f0487fafc14494179cabcf +#: ../../settings.rst:1211 088e79d226f0487fafc14494179cabcf #, python-brace-format msgid "{lang} is the language code" msgstr "{lang} 为语言代码" -#: ../../settings.rst:1217 4376232e5a294aca906df56af2f49303 +#: ../../settings.rst:1214 4376232e5a294aca906df56af2f49303 msgid "Ordering content" msgstr "内容的排列顺序" -#: ../../settings.rst:1221 41cf2c63929d4eeeae7bfdee85e8d084 +#: ../../settings.rst:1218 41cf2c63929d4eeeae7bfdee85e8d084 msgid "" "Order archives by newest first by date. (False: orders by date with older" " articles first.) The default is ``True``." msgstr "若设为True,日期较新的会排在前面;若设为False,则日期较旧的会排在前面。本项配置默认为 ``True`` 。" -#: ../../settings.rst:1226 3f3709e077b3416f8c3640dfc4432e38 +#: ../../settings.rst:1223 3f3709e077b3416f8c3640dfc4432e38 msgid "" "Reverse the category order. (True: lists by reverse alphabetical order; " "default lists alphabetically.) The default is ``False``." msgstr "若设为True,分类会按字典序逆序排列;若设为False,则按字典序顺序排列。本项配置默认为 ``False`` 。" -#: ../../settings.rst:1231 ff8d745b1884450185d26b1f7d645a5f +#: ../../settings.rst:1228 ff8d745b1884450185d26b1f7d645a5f msgid "" "Defines how the articles (``articles_page.object_list`` in the template) " "are sorted. Valid options are: metadata as a string (use ``reversed-`` " @@ -1658,32 +1682,33 @@ msgid "" "``'reversed-date'``, will sort articles by date in reverse order (i.e., " "newest article comes first). The default is ``'reversed-date'``." msgstr "" -"定义文章(模板中的 ``articles_page.object_list`` " -")的排序方式。有效选项包括:字符串形式的元数据(使用前缀 ``reversed-`` 来指定逆序)、特殊选项 ``'basename'`` " +"定义文章(模板中的 ``articles_page.object_list`` )的排序方式。有效选项包括:字符串形式的元数据(使用前缀 " +"``reversed-`` 来指定逆序)、特殊选项 ``'basename'`` " "(不带路径的文件名)、或是一个可以从文章中提取排序键的自定义函数。例如,将选项值设为 ``'date'`` ,文章就会以时间顺序排列文章。默认值为" " ``'reversed-date'`` ,即以日期逆序排列,即新文章在前、旧文章在后。本项配置默认为 ``'reversed-date'`` 。" -#: ../../settings.rst:1242 c2de8ca998954143a3a21d52f57a4e17 +#: ../../settings.rst:1239 c2de8ca998954143a3a21d52f57a4e17 msgid "" "Defines how the pages (``pages`` variable in the template) are sorted. " "Options are same as ``ARTICLE_ORDER_BY``. The default value, " "``'basename'`` will sort pages by their basename. The default is " "``'basename'``." msgstr "" -"定义页面(模板中的 ``pages`` 变量)的排序顺序。有效选项和 ``ARTICLE_ORDER_BY`` 中的相同。本项配置默认为 ``'basename'`` 。" +"定义页面(模板中的 ``pages`` 变量)的排序顺序。有效选项和 ``ARTICLE_ORDER_BY`` 中的相同。本项配置默认为 " +"``'basename'`` 。" -#: ../../settings.rst:1250 6a345fb283734251b7acad72b7c4cf51 +#: ../../settings.rst:1247 6a345fb283734251b7acad72b7c4cf51 msgid "Themes" msgstr "主题" -#: ../../settings.rst:1252 6498842c51bb40548a640a7d419909bf +#: ../../settings.rst:1249 6498842c51bb40548a640a7d419909bf msgid "" "Creating Pelican themes is addressed in a dedicated section (see :ref" ":`theming-pelican`). However, here are the settings that are related to " "themes." msgstr "创建Pelican主题在单独的一节中讲解(参见 :ref:`theming-pelican` )。此处讲解和主题有关的配置项。" -#: ../../settings.rst:1258 bb35f8335e4142f5b69a61115ab790e5 +#: ../../settings.rst:1255 bb35f8335e4142f5b69a61115ab790e5 msgid "" "Theme to use to produce the output. Can be a relative or absolute path to" " a theme folder, or the name of a default theme or a theme installed via " @@ -1692,16 +1717,16 @@ msgstr "" "用于产生输出的主题。可以是到达要使用主题的文件夹的相对或绝对路径,或是主题的名称(默认主题或通过 :doc:`pelican-themes` " "安装的主题)。默认主题为 \"notmyidea\" 。" -#: ../../settings.rst:1264 3d47fbf73e7a4188a877619ef4cbed77 +#: ../../settings.rst:1261 3d47fbf73e7a4188a877619ef4cbed77 msgid "" "Destination directory in the output path where Pelican will place the " "files collected from `THEME_STATIC_PATHS`. Default is `theme`. The " "default is ``'theme'``." msgstr "" -"Pelican从 `THEME_STATIC_PATHS` 中发现主题要使用的静态文件,此设置项指定这些静态文件在输出路径中的目录。" -"本项配置默认为 ``'theme'`` 。" +"Pelican从 `THEME_STATIC_PATHS` 中发现主题要使用的静态文件,此设置项指定这些静态文件在输出路径中的目录。本项配置默认为" +" ``'theme'`` 。" -#: ../../settings.rst:1270 c0b9021df19241fab6b6f90983248f9c +#: ../../settings.rst:1267 c0b9021df19241fab6b6f90983248f9c msgid "" "Static theme paths you want to copy. Default value is `static`, but if " "your theme has other static paths, you can put them here. If files or " @@ -1710,10 +1735,10 @@ msgid "" "``['static']``." msgstr "" "要复制的静态主题路径。默认值为 `static` " -",但如果你的主题有其他静态路径,也可以将其放在此处。此项设置中若包含了相同名称的文件或目录,前面的会被后面的覆盖。" -"本项配置默认为 ``['static']`` 。" +",但如果你的主题有其他静态路径,也可以将其放在此处。此项设置中若包含了相同名称的文件或目录,前面的会被后面的覆盖。本项配置默认为 " +"``['static']`` 。" -#: ../../settings.rst:1277 117f2d4711394bf39c50303d6b24c06b +#: ../../settings.rst:1274 117f2d4711394bf39c50303d6b24c06b msgid "" "A list of paths you want Jinja2 to search for templates before searching " "the theme's ``templates/`` directory. Allows for overriding individual " @@ -1722,11 +1747,11 @@ msgid "" "first, then the theme's ``templates/``. The default is ``[]``." msgstr "" "在搜索主题的 ``templates/`` " -"目录前,Jinja2会先搜索此设置项中的路径。可以使用此设置项覆盖主题中的某些模板文件,以尽量避免修改现有主题。" -"Jinja2会先搜索 ``THEME_TEMPLATES_OVERRIDES`` 配置的文件,再搜索主题中的 ``templates/`` 目录。" -"本项配置默认为 ``[]`` 。" +"目录前,Jinja2会先搜索此设置项中的路径。可以使用此设置项覆盖主题中的某些模板文件,以尽量避免修改现有主题。Jinja2会先搜索 " +"``THEME_TEMPLATES_OVERRIDES`` 配置的文件,再搜索主题中的 ``templates/`` 目录。本项配置默认为 " +"``[]`` 。" -#: ../../settings.rst:1283 3f686a923ffa4a468df172f04146e388 +#: ../../settings.rst:1280 3f686a923ffa4a468df172f04146e388 #, python-brace-format, python-format msgid "" "You can also extend templates from the theme using the ``{% extends %}`` " @@ -1734,26 +1759,26 @@ msgid "" "example:" msgstr "利用 ``{% extends %}`` 指令中的 ``!theme`` 前缀也可以用于从主题扩展模板,如下例所示:" -#: ../../settings.rst:1292 35121540d2254f698cbf9538d00cf5bd +#: ../../settings.rst:1289 35121540d2254f698cbf9538d00cf5bd msgid "Specify the CSS file you want to load. The default is ``'main.css'``." msgstr "指定需要加载的CSS文件。本项配置默认为 ``'main.css'`` 。" -#: ../../settings.rst:1294 533f2b3f18864e7ca68bfcb5d6961fe1 +#: ../../settings.rst:1291 533f2b3f18864e7ca68bfcb5d6961fe1 msgid "" "By default, two themes are available. You can specify them using the " "``THEME`` setting or by passing the ``-t`` option to the ``pelican`` " "command:" msgstr "默认情况下,有两个主题可供选择。可以使用 ``THEME`` 选项指定,或是在 ``pelican`` 命令中使用 ``-t`` 选项的参数传入。" -#: ../../settings.rst:1297 f1ea5d4700ca4f1091d6ee798596cff7 +#: ../../settings.rst:1294 f1ea5d4700ca4f1091d6ee798596cff7 msgid "notmyidea" msgstr "notmyidea(默认值)" -#: ../../settings.rst:1298 9b7be83a91ab4de7bd6d7a30dbcef939 +#: ../../settings.rst:1295 9b7be83a91ab4de7bd6d7a30dbcef939 msgid "simple (a synonym for \"plain text\" :)" msgstr "simple(即“plain text”)" -#: ../../settings.rst:1300 3ac1546ab1144586825809c12f4abc78 +#: ../../settings.rst:1297 3ac1546ab1144586825809c12f4abc78 msgid "" "There are a number of other themes available at " "https://github.com/getpelican/pelican-themes. Pelican comes with :doc" @@ -1762,107 +1787,107 @@ msgstr "" "还有很多主题可以在 https://github.com/getpelican/pelican-themes 上下载。Pelican使用一个称为 " ":doc:`pelican-themes` 的小脚本来管理主题。" -#: ../../settings.rst:1304 f1b29806557540ddaefe6bc035a48459 +#: ../../settings.rst:1301 f1b29806557540ddaefe6bc035a48459 msgid "" "You can define your own theme, either by starting from scratch or by " "duplicating and modifying a pre-existing theme. Here is :doc:`a guide on " "how to create your theme `." msgstr "你还可以创建自己的主题,可以从头开始,也可以在已有主题的基础上修改。请参看 :doc:`主题 ` 文档。" -#: ../../settings.rst:1308 47a8dd97888b440aabbea22aee72630a +#: ../../settings.rst:1305 47a8dd97888b440aabbea22aee72630a msgid "Following are example ways to specify your preferred theme::" msgstr "下面是几个指定某个主题的例子:" -#: ../../settings.rst:1319 3f51b49bed124af39ae67bf60c8384f8 +#: ../../settings.rst:1316 3f51b49bed124af39ae67bf60c8384f8 msgid "" "The built-in ``simple`` theme can be customized using the following " "settings." msgstr "内置的 ``simple`` 主题可以使用以下设置项进行自定义。" -#: ../../settings.rst:1323 08d86196410f482e803c69d85078652a +#: ../../settings.rst:1320 08d86196410f482e803c69d85078652a msgid "The URL of the stylesheet to use. The default is ``None``." msgstr "要使用的样式表的URL。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1325 369beaeb61fd4e4f843d8174b666c0a7 +#: ../../settings.rst:1322 369beaeb61fd4e4f843d8174b666c0a7 msgid "" "The built-in ``notmyidea`` theme can make good use of the following " "settings. Feel free to use them in your themes as well." msgstr "下面的一下选项可以很好地作用于内置的 ``notmyidea`` 主题。当然在其他主题中你也可以尽情尝试这些选项。" -#: ../../settings.rst:1330 7f647c4c65494b93bb6d1c3ef4b39af6 +#: ../../settings.rst:1327 7f647c4c65494b93bb6d1c3ef4b39af6 msgid "A subtitle to appear in the header. The default is ``None``." msgstr "页面顶部要显示的副标题。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1334 49eda3f428d7490bb78e081bbc941e64 +#: ../../settings.rst:1331 49eda3f428d7490bb78e081bbc941e64 msgid "" "Pelican can handle Disqus comments. Specify the Disqus sitename " "identifier here. The default is ``None``." msgstr "可以在Pelican中使用Disqus的评论系统,此设置项用于设置Disqus的站点标识符。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1339 a52590c6150e459495608626cf47cbc8 +#: ../../settings.rst:1336 a52590c6150e459495608626cf47cbc8 msgid "" "Your GitHub URL (if you have one). It will then use this information to " "create a GitHub ribbon. The default is ``None``." msgstr "指定你的GitHub URL(如果有的话),此信息将被用于创建GitHub标记。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1344 7a1fab7bd7d248aca77d6cebb71415fb +#: ../../settings.rst:1341 7a1fab7bd7d248aca77d6cebb71415fb msgid "" "Put any desired analytics scripts in this setting in ``publishconf.py``. " "Example:" msgstr "在 ``publishconf.py`` 中设置此项,用于指定想要使用的统计分析脚本。如下例:" -#: ../../settings.rst:1356 f0fd9392aa0544248ae3ecfa505cbd50 +#: ../../settings.rst:1353 f0fd9392aa0544248ae3ecfa505cbd50 msgid "The default is ``None``." msgstr "默认为 ``None``" -#: ../../settings.rst:1360 5f3cf76b56694fa88318f38e06dfb9d9 +#: ../../settings.rst:1357 5f3cf76b56694fa88318f38e06dfb9d9 msgid "" "A list of tuples (Title, URL) for additional menu items to appear at the " "beginning of the main menu. The default is ``None``." msgstr "指定 (标题, URL) 元组的列表,用于指定额外的菜单项,会添加在菜单栏的开头。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1365 23402de55a8d4b9a99f81aa3cbfd334f +#: ../../settings.rst:1362 23402de55a8d4b9a99f81aa3cbfd334f msgid "" "A list of tuples (Title, URL) for links to appear on the header. The " "default is ``None``." msgstr "指定 (标题, URL) 元组的列表,用于指定要展示在顶部的链接。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1370 55e5a965cc1f45eea43a064d8c93c758 +#: ../../settings.rst:1367 55e5a965cc1f45eea43a064d8c93c758 msgid "" "A list of tuples (Title, URL) to appear in the \"social\" section. The " "default is ``None``." msgstr "指定 (标题, URL) 元组的列表,用于指定要展示在“social”部分的内容。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1375 2b60264917b1429b9252029724038ed9 +#: ../../settings.rst:1372 2b60264917b1429b9252029724038ed9 msgid "" "Allows for adding a button to articles to encourage others to tweet about" " them. Add your Twitter username if you want this button to appear. The " "default is ``None``." msgstr "允许在文章中添加按钮,以便其他人在tweet上引用。如果希望显示此按钮,在此项中设置你的Twitter用户名。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1381 f625d19e9cfc481f90ba05c050829ef3 +#: ../../settings.rst:1378 f625d19e9cfc481f90ba05c050829ef3 msgid "" "Allows override of the name of the links widget. If not specified, " "defaults to \"links\". The default is ``None``." msgstr "指定用于覆盖“links”部分的名称,若不指定,默认设为 “links”。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1386 54cd361f2d6c44ec8b8838f2364f9c7f +#: ../../settings.rst:1383 54cd361f2d6c44ec8b8838f2364f9c7f msgid "" "Allows override of the name of the \"social\" widget. If not specified, " "defaults to \"social\". The default is ``None``." msgstr "指定用于覆盖“social”部分的名称。若不指定,默认设为 “social”。本项配置默认为 ``None`` 。" -#: ../../settings.rst:1389 16874b8a80b149578efba9c45a78a9c7 +#: ../../settings.rst:1386 16874b8a80b149578efba9c45a78a9c7 msgid "" "In addition, you can use the \"wide\" version of the ``notmyidea`` theme " "by adding the following to your configuration::" msgstr "另外,你可以使用 ``notmyidea`` 主题的“宽屏”版本,在配置文件中添加下面这行配置即可:" -#: ../../settings.rst:1396 9d24e75fc67d4b98a06bbe832f7cd947 +#: ../../settings.rst:1393 9d24e75fc67d4b98a06bbe832f7cd947 msgid "Logging" msgstr "日志" -#: ../../settings.rst:1398 9ddaf0c25b314e609b7de6873b2cfbcf +#: ../../settings.rst:1395 9ddaf0c25b314e609b7de6873b2cfbcf msgid "" "Sometimes, a long list of warnings may appear during site generation. " "Finding the **meaningful** error message in the middle of tons of " @@ -1872,7 +1897,7 @@ msgstr "" "在站点生成过程中有时可能会出现一堆警告信息。在这一大堆日志输出中寻找 **有意义** " "的错误消息是非常棘手的。为了过滤掉多余的日志消息,可以在Pelican中指定 ``LOG_FILTER`` 设置。" -#: ../../settings.rst:1403 4c3ea89d86e846f3b38f146060f19c53 +#: ../../settings.rst:1400 4c3ea89d86e846f3b38f146060f19c53 msgid "" "``LOG_FILTER`` should be a list of tuples ``(level, msg)``, each of them " "being composed of the logging level (up to ``warning``) and the message " @@ -1882,43 +1907,43 @@ msgstr "" "``LOG_FILTER`` 是元组 ``(level, msg)`` ,level指定日志记录等级(最高为 ``warning`` " "),msg指定要忽略的消息。将想要隐藏的日志消息添加到此列表中就可以将他们过滤掉。" -#: ../../settings.rst:1408 ../../settings.rst:1416 +#: ../../settings.rst:1405 ../../settings.rst:1413 #: b62320cd110548f08cdc2b9ff52953d5 msgid "For example::" msgstr "例如:" -#: ../../settings.rst:1413 8a81ee82a14e4571852d1b955568028a +#: ../../settings.rst:1410 8a81ee82a14e4571852d1b955568028a msgid "" "It is possible to filter out messages by a template. Check out source " "code to obtain a template." msgstr "用模板字符串指定要过滤的消息也是可以的。具体的消息种类请查看源码。" -#: ../../settings.rst:1423 880baed291ff4f63836986b7c9082825 +#: ../../settings.rst:1420 880baed291ff4f63836986b7c9082825 msgid "" "Silencing messages by templates is a dangerous feature. It is possible to" " unintentionally filter out multiple message types with the same template" " (including messages from future Pelican versions). Proceed with caution." msgstr "通过模板过滤忽略消息是一个危险的功能。 使用同一模板可能会无意中过滤掉多种消息类型(包括来自新版本Pelican的消息),请谨慎行事。" -#: ../../settings.rst:1429 988048d34b0340beb22f11922ce0959a +#: ../../settings.rst:1426 988048d34b0340beb22f11922ce0959a msgid "This option does nothing if ``--debug`` is passed." msgstr "当使用了 ``--debug`` 参数,此项设置就不会起作用。" -#: ../../settings.rst:1435 e1b3e06d5d29428ba28f2842124a7dcc +#: ../../settings.rst:1432 e1b3e06d5d29428ba28f2842124a7dcc msgid "Reading only modified content" msgstr "只读取修改过的内容" -#: ../../settings.rst:1437 ff9209b75d1645c8b5af8941525fead0 +#: ../../settings.rst:1434 ff9209b75d1645c8b5af8941525fead0 msgid "" "To speed up the build process, Pelican can optionally read only articles " "and pages with modified content." msgstr "为了加速网站构建过程,Pelican能够只读取修改过内容的文章和页面。" -#: ../../settings.rst:1440 5aee5c450b2047bea84e436894c179ef +#: ../../settings.rst:1437 5aee5c450b2047bea84e436894c179ef msgid "When Pelican is about to read some content source file:" msgstr "当Pelican准备读取内容源文件时,会执行下面的规则:" -#: ../../settings.rst:1442 0aca4765447b49308b5a52b22a74d16a +#: ../../settings.rst:1439 0aca4765447b49308b5a52b22a74d16a msgid "" "The hash or modification time information for the file from a previous " "build are loaded from a cache file if ``LOAD_CONTENT_CACHE`` is ``True``." @@ -1929,24 +1954,24 @@ msgstr "" ",则从缓存文件中加载上一次构建时文件的哈希值或修改时间。这些缓存的文件存储在 ``CACHE_PATH`` " "所指定的目录中。若文件是新的,在缓存文件中没有记录,则照常读取。" -#: ../../settings.rst:1446 b8bb9d616a2d41b484ec5440fa09e57a +#: ../../settings.rst:1443 b8bb9d616a2d41b484ec5440fa09e57a msgid "The file is checked according to ``CHECK_MODIFIED_METHOD``:" msgstr "文件会以 ``CHECK_MODIFIED_METHOD`` 设置的方式检查:" -#: ../../settings.rst:1452 fb6105f54c80491c80f99b8b447c5a4b +#: ../../settings.rst:1449 fb6105f54c80491c80f99b8b447c5a4b msgid "" "If set to anything else or the necessary information about the file " "cannot be found in the cache file, the content is read as usual." msgstr "如果设置为其他任何值或在缓存文件中无法找到有关该文件的必要信息,则将照常读取内容。" -#: ../../settings.rst:1455 c46fe5fc65a44157b02b9e26befcefc6 +#: ../../settings.rst:1452 c46fe5fc65a44157b02b9e26befcefc6 msgid "" "If the file is considered unchanged, the content data saved in a previous" " build corresponding to the file is loaded from the cache, and the file " "is not read." msgstr "如果Pelican认为文件没有更改过,会直接从上一次构建的对应文件中加载内容,源文件就不会被读取。" -#: ../../settings.rst:1458 0d597148978d4d228fc55b546d77ba97 +#: ../../settings.rst:1455 0d597148978d4d228fc55b546d77ba97 msgid "" "If the file is considered changed, the file is read and the new " "modification information and the content data are saved to the cache if " @@ -1955,7 +1980,7 @@ msgstr "" "若Pelican认为文件更改过了,则会读取源文件;若 ``CACHE_CONTENT`` 设为了 ``True`` " ",Pelican还会将修改后的信息以及内容数据存入缓存。" -#: ../../settings.rst:1462 e1c91fa9ecf84419a4e34e3fa0951b56 +#: ../../settings.rst:1459 e1c91fa9ecf84419a4e34e3fa0951b56 msgid "" "If ``CONTENT_CACHING_LAYER`` is set to ``'reader'`` (the default), the " "raw content and metadata returned by a reader are cached. If this setting" @@ -1970,7 +1995,7 @@ msgstr "" ",则缓存处理过后的内容对象。缓存已处理的内容对象可能会和插件(因为可能会跳过一些与读取相关的信号)与 ``WITH_FUTURE_DATES`` " "的功能(因为已处理内容对象的 ``draft`` 状态不会改变)冲突。" -#: ../../settings.rst:1470 d46b39637a86497eb38667c8ecf9bf66 +#: ../../settings.rst:1467 d46b39637a86497eb38667c8ecf9bf66 msgid "" "Checking modification times is faster than comparing file hashes, but it " "is not as reliable because ``mtime`` information can be lost, e.g., when " @@ -1982,7 +2007,7 @@ msgstr "" "``rsync`` 命令时没有开启 ``mtime`` 保留模式。(rsync可以通过指定 ``--archive`` 标志启用 " "``mtime`` 保留模式)" -#: ../../settings.rst:1476 3ef54978b60c4fcb9f2b0dc625797b74 +#: ../../settings.rst:1473 3ef54978b60c4fcb9f2b0dc625797b74 msgid "" "The cache files are Python pickles, so they may not be readable by " "different versions of Python as the pickle format often changes. If such " @@ -1994,7 +2019,7 @@ msgstr "" "pickles,因此不同版本的Python由于pickle文件格式变化可能无法读取缓存。如果遇到此类错误,会自动以新格式重新构建缓存。另外,当 " "``GZIP_CACHE`` 设置发生变化后,缓存也会自动重建。" -#: ../../settings.rst:1482 40fb13c9fe444d109c9014ce4f294f92 +#: ../../settings.rst:1479 40fb13c9fe444d109c9014ce4f294f92 msgid "" "The ``--ignore-cache`` command-line option is useful when the whole cache" " needs to be regenerated, such as when making modifications to the " @@ -2007,7 +2032,7 @@ msgstr "" "命令行选项,例如当需要修改会影响缓存内容的设置项时,或是调试时,都可以使用 ``--ignore-cache`` 。若 " "``AUTORELOAD_IGNORE_CACHE`` 设为了 ``True`` ,修改设置文件时会自动忽略缓存。" -#: ../../settings.rst:1488 05ea098bd1b34660878cc598cf9c639c +#: ../../settings.rst:1485 05ea098bd1b34660878cc598cf9c639c msgid "" "Note that even when using cached content, all output is always written, " "so the modification times of the generated ``*.html`` files will always " @@ -2017,7 +2042,7 @@ msgstr "" "需要注意的是,即使使用了缓存的内容,最终的输出文件也始终会进行重新写入,因此生成的 ``*.html`` 文件的修改时间始终会变化。所以,基于 " "``rsync`` 进行上传时,可以考虑使用 ``--checksum`` 选项。" -#: ../../settings.rst:1495 358bf9edd2594e2fa3db87aae3703994 +#: ../../settings.rst:1492 358bf9edd2594e2fa3db87aae3703994 msgid "Example settings" msgstr "配置示例" diff --git a/docs/locale/zh_CN/LC_MESSAGES/sphinx.po b/docs/locale/zh_CN/LC_MESSAGES/sphinx.po index 860cbcb2..320d41f2 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/sphinx.po +++ b/docs/locale/zh_CN/LC_MESSAGES/sphinx.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PELICAN 4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-24 19:06+0800\n" -"PO-Revision-Date: 2024-06-27 19:00+0800\n" +"POT-Creation-Date: 2026-02-02 10:32+0800\n" +"PO-Revision-Date: 2026-02-02 10:32+0800\n" "Last-Translator: GeorgeHu \n" "Language: zh_CN\n" "Language-Team: \n" @@ -16,30 +16,34 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.15.0\n" +"Generated-By: Babel 2.17.0\n" -#: ../../_templates/page.html:68 697aead398874e06aa15cfd74d134745 +#: ../../_templates/page.html:13 d28434a1f790406f866556f17fe43bea +msgid "Skip to content" +msgstr "" + +#: ../../_templates/page.html:68 11a1e7e70c0542dcb853ce6d667b4b13 msgid "Back to top" msgstr "返回顶部" -#: ../../_templates/page.html:101 f91a64e54aae49c2bd09a944ea693193 +#: ../../_templates/page.html:121 b65dfb48967147f688c1d2166a0d3e60 msgid "Next" msgstr "下一节" -#: ../../_templates/page.html:113 6c3ad069077b4e2cb6e1f77cc2962881 +#: ../../_templates/page.html:133 44ccbbca34f24a5fb1083bcda42d2399 msgid "Previous" msgstr "前一节" -#: ../../_templates/page.html:116 e83e03d0b50c4065a9f87db25a23b3ee +#: ../../_templates/page.html:136 fd17897083a54a929cff164a233bd4d7 msgid "Home" msgstr "首页" -#: ../../_templates/page.html:129 1d0fdb4c0b4e420283101ba5c21ac985 +#: ../../_templates/page.html:149 17589e72a0364f6b8532d40aea593ad7 #, python-format msgid "Copyright © %(copyright)s" msgstr "Copyright © %(copyright)s" -#: ../../_templates/page.html:133 0a35c662e6574da48f7ac5c6b2c82874 +#: ../../_templates/page.html:153 6603e5fc982d4b8b8ba3145dcf098be9 #, python-format msgid "" "Copyright © %(copyright)s, Justin Mayer, Alexis Metaireau, and " "contributors" -#: ../../_templates/page.html:141 07b89372db484251bfcd3b54e0845bf0 +#: ../../_templates/page.html:161 757352d714c74c48ad540604822a210e #, python-format msgid "Last updated on %(last_updated)s" msgstr "最后更新于 %(last_updated)s" -#: ../../_templates/page.html:187 2eb9f1b479a7405290a91d8e1962f265 +#: ../../_templates/page.html:207 6b07f3b7330d47a3976e765b14da9ad1 msgid "On this page" msgstr "本页目录" diff --git a/docs/locale/zh_CN/LC_MESSAGES/tips.po b/docs/locale/zh_CN/LC_MESSAGES/tips.po index a65edf13..2b59a8bd 100644 --- a/docs/locale/zh_CN/LC_MESSAGES/tips.po +++ b/docs/locale/zh_CN/LC_MESSAGES/tips.po @@ -7,8 +7,8 @@ msgid "" msgstr "" "Project-Id-Version: PELICAN 4\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-11-07 16:25+0800\n" -"PO-Revision-Date: 2024-06-27 19:00+0800\n" +"POT-Creation-Date: 2026-02-02 10:32+0800\n" +"PO-Revision-Date: 2026-02-02 10:32+0800\n" "Last-Translator: GeorgeHu \n" "Language: zh_CN\n" "Language-Team: zh_CN \n" @@ -16,7 +16,7 @@ msgstr "" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" -"Generated-By: Babel 2.16.0\n" +"Generated-By: Babel 2.17.0\n" #: ../../tips.rst:2 9c4618aaecd44b0d93537cb760e227fa msgid "Tips" @@ -26,7 +26,7 @@ msgstr "小技巧" msgid "Here are some tips about Pelican that you might find useful." msgstr "以下是一些实用的小技巧。" -#: ../../tips.rst:7 ../../tips.rst:309 95bea35d0347495bb551fe9486bcd29d +#: ../../tips.rst:7 ../../tips.rst:319 95bea35d0347495bb551fe9486bcd29d #: b64b7ed713b64f588ea7488c6d0b0441 msgid "Custom 404 Pages" msgstr "自定义404页面" @@ -373,11 +373,11 @@ msgstr "" "``\"publishconf.py\"`` 。" #: ../../tips.rst:211 ../../tips.rst:216 ../../tips.rst:223 ../../tips.rst:227 -#: ../../tips.rst:231 ../../tips.rst:237 ../../tips.rst:243 -#: 073e18d8ae29406eb05040d4e3a9ae60 7d43e6cfb091410ebec7464da05b61b4 -#: 8837cc8935f148fb80f05cc5d3d53629 b2da1f7640f948039230cd835c49accd -#: bfe3d052cdc443bb81fed82e77acf3c1 c93816e00a254ef69c69f05833e8762b -#: ee35302c7e034070af1d234ab919c32a +#: ../../tips.rst:231 ../../tips.rst:237 ../../tips.rst:243 ../../tips.rst:249 +#: 073e18d8ae29406eb05040d4e3a9ae60 6932c9139d4f4da7a34601a9d78ee622 +#: 7d43e6cfb091410ebec7464da05b61b4 8837cc8935f148fb80f05cc5d3d53629 +#: b2da1f7640f948039230cd835c49accd bfe3d052cdc443bb81fed82e77acf3c1 +#: c93816e00a254ef69c69f05833e8762b ee35302c7e034070af1d234ab919c32a msgid "string" msgstr "string" @@ -386,11 +386,12 @@ msgid "``requirements``" msgstr "``requirements``" #: ../../tips.rst:216 ../../tips.rst:223 ../../tips.rst:227 ../../tips.rst:231 -#: ../../tips.rst:237 ../../tips.rst:243 ../../tips.rst:249 -#: 197d6ee11fce4a50996a0c458cfdbdad 2086d667b9b1475cb0f002924cdfde12 -#: 25e940621f5b48c9af487d898d7f93cf 5664232c9fdd46c7b8278b8ecef8e3b1 +#: ../../tips.rst:237 ../../tips.rst:243 ../../tips.rst:249 ../../tips.rst:255 +#: ../../tips.rst:261 197d6ee11fce4a50996a0c458cfdbdad +#: 2086d667b9b1475cb0f002924cdfde12 25e940621f5b48c9af487d898d7f93cf +#: 3052432fbf5d420d8f6adbadb908e6f0 5664232c9fdd46c7b8278b8ecef8e3b1 #: 6693126a0da74c61b67e14ca8e535ec3 7f8a93a2048140748fa73537bfae2a54 -#: 85fd40a29f31490bb23b20f05e574aaa +#: 85fd40a29f31490bb23b20f05e574aaa 9d02d6e4689b4b55bdf832e18b0ed4bb msgid "No" msgstr "否" @@ -429,46 +430,60 @@ msgid "" "``\"https://github.com/seanh/sidecar.git\"``" msgstr "要使用的自定义主题的GitHub仓库URL,例如: ``\"https://github.com/seanh/sidecar.git\"``" -#: ../../tips.rst:227 d94f331173334fb2a84b1caadffb72df +#: ../../tips.rst:227 ../../tips.rst:231 919c0e36e8ff40bcbcc4480081b49ce5 +#: d94f331173334fb2a84b1caadffb72df msgid "``\"\"``" msgstr "``\"\"``" -#: ../../tips.rst:231 44ceb2743481486b95c1c739d543f15d +#: ../../tips.rst:231 921a2ae610a84349a5654e204ba6b034 +msgid "``theme-checkout``" +msgstr "``theme-checkout``" + +#: ../../tips.rst:231 7815b328b5f94ca496107881f5bb8aab +msgid "" +"Git ref (branch, tag or commit) of the theme repo to checkout. This can " +"be used to pin the version of your theme. If not specified defaults to " +"the theme repo's default branch." +msgstr "" +"主题仓库要checkout的Git引用 (branch, tag 或 commit)。这可以用于固定主题的版本。若未指定," +"使用仓库的默认branch。" + +#: ../../tips.rst:237 44ceb2743481486b95c1c739d543f15d msgid "``python``" msgstr "``python``" -#: ../../tips.rst:231 4b5cddab44d24c7c8560e16991b784c7 +#: ../../tips.rst:237 4b5cddab44d24c7c8560e16991b784c7 msgid "" "The version of Python to use to build the site, for example: ``\"3.12\"``" " (to use the most recent version of Python 3.12, this is faster) or " "``\"3.12.1\"`` (to use an exact version, slower)" msgstr "构建站点时使用的Python版本,例如: ``\"3.12\"`` 或 ``\"3.12.1\"``" -#: ../../tips.rst:231 919c0e36e8ff40bcbcc4480081b49ce5 +#: ../../tips.rst:237 919c0e36e8ff40bcbcc4480081b49ce5 msgid "``\"3.12\"``" msgstr "``\"3.12\"``" -#: ../../tips.rst:237 842af56c539f4a74a97c7a5b1525eb35 +#: ../../tips.rst:243 842af56c539f4a74a97c7a5b1525eb35 msgid "``siteurl``" msgstr "``siteurl``" -#: ../../tips.rst:237 7fc0777d6e174d6f8d757926a61aa3c8 +#: ../../tips.rst:243 7fc0777d6e174d6f8d757926a61aa3c8 msgid "" "The base URL of your web site (Pelican's ``SITEURL`` setting). If not " "passed this will default to the URL of your GitHub Pages site, which is " "correct in most cases." msgstr "站点的基URL,会用于配置项 ``SITEURL`` 。若未指定,默认值为GitHub Pages站点的URL,这适用于大部分情况。" -#: ../../tips.rst:237 ../../tips.rst:243 082f65333e224d71817b82b1e4f515c4 +#: ../../tips.rst:243 ../../tips.rst:249 082f65333e224d71817b82b1e4f515c4 #: 3d786e828a4745db849bdb8f47738db8 msgid "The URL of your GitHub Pages site." msgstr "GitHub Pages站点的URL" -#: ../../tips.rst:243 e5adb69f985547b7b3cc2bd3f31d4cc3 +#: ../../tips.rst:249 e5adb69f985547b7b3cc2bd3f31d4cc3 msgid "``feed_domain``" msgstr "``feed_domain``" -#: ../../tips.rst:243 c88f037c9f1f4148bef6347228257f7d +#: ../../tips.rst:249 c88f037c9f1f4148bef6347228257f7d msgid "" "The domain to be prepended to feed URLs (Pelican's ``FEED_DOMAIN`` " "setting). If not passed this will default to the URL of your GitHub Pages" @@ -477,72 +492,89 @@ msgstr "" "订阅源URL前要附加的域名,会用于配置项 ``FEED_DOMAIN`` 。若未指定,默认值为GitHub " "Pages站点的URL,这适用于大部分情况。" -#: ../../tips.rst:249 358c5aa434cd4ad09beab02df88413d5 +#: ../../tips.rst:255 358c5aa434cd4ad09beab02df88413d5 msgid "``deploy``" msgstr "``deploy``" -#: ../../tips.rst:249 b8748aeace5a448d9382e225be98f90c +#: ../../tips.rst:255 b8748aeace5a448d9382e225be98f90c msgid "" "This is used to determine whether you will deploy the site or not to " "GitHub Pages. This is most useful if you want to test a change to your " "website in a pull request before deploying those change." msgstr "此项配置用于表示是否要将站点部署至GitHub Pages。当对站点做了更改,并且在正式部署前进行测试,就可以用到此项。" -#: ../../tips.rst:249 034006b9b71b4cb486f230b8aad873ce +#: ../../tips.rst:255 ../../tips.rst:261 034006b9b71b4cb486f230b8aad873ce msgid "bool" msgstr "bool" -#: ../../tips.rst:249 078ac613a8b74703af98c75bb5a007c1 +#: ../../tips.rst:255 078ac613a8b74703af98c75bb5a007c1 msgid "``true``" msgstr "``true``" -#: ../../tips.rst:257 e63cf881e3204be8b52ee5d8635ba4cf +#: ../../tips.rst:261 842af56c539f4a74a97c7a5b1525eb35 +msgid "``stork``" +msgstr "``stork``" + +#: ../../tips.rst:261 b8748aeace5a448d9382e225be98f90c +msgid "" +"This is used to determine whether Stork will be installed on the runner " +"to be able to build a site with Stork search enabled" +msgstr "" +"此配置项用于指定是否要在runner中安装Stork搜索。" + +#: ../../tips.rst:261 358c5aa434cd4ad09beab02df88413d5 +msgid "``false``" +msgstr "``false``" + +#: ../../tips.rst:267 e63cf881e3204be8b52ee5d8635ba4cf msgid "Testing Your Build in a GitHub Pull Request" msgstr "在Github拉取请求时进行测试" -#: ../../tips.rst:259 a2f6bd3420eb46a08f54efda35a6eaf4 +#: ../../tips.rst:269 a2f6bd3420eb46a08f54efda35a6eaf4 msgid "" "If you want to test your build in a pull request before deploying to " "GitHub, your workflow might look something like this:" msgstr "如果想在正式部署到 GitHub 前在PR中进行测试,下面是一个可用的 workflow 示例" -#: ../../tips.rst:288 84393693279741efa82c5ee6b27cbd28 +#: ../../tips.rst:298 84393693279741efa82c5ee6b27cbd28 msgid "" "The ``on`` section of the workflow defines the events that will trigger " "the workflow. In this example, the workflow will run on pushes to the " "main branch, pull requests to the main branch, and manual runs of the " "workflow." -msgstr "工作流的 ``on`` 部分定义了工作流的触发器。在此示例中,工作流将在main分支收到push、有PR提起到主分支以及" -"手动运行工作流时执行。" +msgstr "工作流的 ``on`` 部分定义了工作流的触发器。在此示例中,工作流将在main分支收到push、有PR提起到主分支以及手动运行工作流时执行。" -#: ../../tips.rst:290 cd3c13b2af974a32aa4291d07fc11e9c +#: ../../tips.rst:300 cd3c13b2af974a32aa4291d07fc11e9c msgid "" "``workflow_dispatch`` defines the deploy boolean to be true by default. " "This means that if you run the workflow manually, it will deploy the " "site." msgstr "``workflow_dispatch`` 将 deploy 的默认值设为 true。也就是说当手动运行工作流时,更改的内容就会正式部署。" -#: ../../tips.rst:292 5402cd211d5b4aa8a244c916bb381a5b +#: ../../tips.rst:302 5402cd211d5b4aa8a244c916bb381a5b msgid "" "The ``deploy`` input for the job is using a set of standard GitHub " "workflow variables to control when ``deploy`` will either be true or " "false (you can customize this to your needs)." -msgstr "job中的 ``deploy`` 使用了一些 GitHub workflow 变量来计算 ``deploy`` 值为 true 还是 false(您可以根据需要自定义)。" +msgstr "" +"job中的 ``deploy`` 使用了一些 GitHub workflow 变量来计算 ``deploy`` 值为 true 还是 " +"false(您可以根据需要自定义)。" -#: ../../tips.rst:294 d084908e3a0749f0b802b43626cfe2c4 +#: ../../tips.rst:304 d084908e3a0749f0b802b43626cfe2c4 msgid "" "In this example, the ``deploy`` will be true if the event is a push to " "the main branch (or merging into main from a PR) or a manual run of the " "workflow. If the event is a pull request, the ``deploy`` will be false " "and it will only build an artifact for the site." -msgstr "在此示例中,如果触发事件是推送到主分支(或从 PR 合并到主分支)或手动运行工作流,则 deploy 将为 true;" -"如果触发事件只是Pull Request,则 ``deploy`` 将为 false,并且此时只会为站点构建一个artifact。" +msgstr "" +"在此示例中,如果触发事件是推送到主分支(或从 PR 合并到主分支)或手动运行工作流,则 deploy 将为 true;如果触发事件只是Pull " +"Request,则 ``deploy`` 将为 false,并且此时只会为站点构建一个artifact。" -#: ../../tips.rst:297 85e70fc3faa04208979f7bbe92b025ef +#: ../../tips.rst:307 85e70fc3faa04208979f7bbe92b025ef msgid "\"Insecure content\" warnings from browsers" msgstr "浏览器报“不安全的内容(Insecure content)”警告" -#: ../../tips.rst:299 34f7075cf31f416da2aeb529c616d97d +#: ../../tips.rst:309 34f7075cf31f416da2aeb529c616d97d msgid "" "If your site uses ``https://`` and is broken because the browser is " "blocking network requests (for example for CSS files) due to \"insecure " @@ -553,7 +585,7 @@ msgstr "" "时,可能会损坏,无法正常显示,这是由于浏览器阻拦了一些对“不安全内容”的网络请求。可能的原因之一是GitHub Pages给你的站点生成了 " "``http://`` URL。" -#: ../../tips.rst:303 47271df82577424c8e2c31a9e76a553a +#: ../../tips.rst:313 47271df82577424c8e2c31a9e76a553a msgid "" "To fix this go into your site repo's settings and enable the **Enforce " "HTTPS** setting: go to **Settings → Pages** and check **Enforce HTTPS**. " @@ -564,7 +596,7 @@ msgstr "" "**Enforce HTTPS** ,接着再重新执行工作流以重新部署站点。也可以尝试通过配置 ``siteurl`` 与 " "``feed_domain`` 解决问题。" -#: ../../tips.rst:311 e69189ef4a8440fb8940d8012b4f19d6 +#: ../../tips.rst:321 e69189ef4a8440fb8940d8012b4f19d6 msgid "" "GitHub Pages will display the custom 404 page described above, as noted " "in the relevant `GitHub docs " @@ -573,11 +605,11 @@ msgstr "" "如果按前述进行配置,GitHub Pages是能够正确显示自定义的404页面的,相关内容在 `GitHub的文档中 " "`_ 也有提到。" -#: ../../tips.rst:315 1b8c2457f44a4d61a033363830b8bd90 +#: ../../tips.rst:325 1b8c2457f44a4d61a033363830b8bd90 msgid "Update your site on each commit" msgstr "在每次commit后都更新站点" -#: ../../tips.rst:317 476dbdb670924c02a962e78d6a7854c1 +#: ../../tips.rst:327 476dbdb670924c02a962e78d6a7854c1 msgid "" "To automatically update your Pelican site on each commit, you can create " "a post-commit hook. For example, you can add the following to " @@ -586,11 +618,11 @@ msgstr "" "要想在每次commit后自动更新Pelican站点,你可以创建一个post-commit钩子。例如,可以将下面的内容保存为 " "``.git/hooks/post-commit`` :" -#: ../../tips.rst:324 36dc5f05eaf84573acada36c59d8d2fc +#: ../../tips.rst:334 36dc5f05eaf84573acada36c59d8d2fc msgid "Copy static files to the root of your site" msgstr "将静态文件拷贝到站点根目录" -#: ../../tips.rst:326 4a0722ad68e944ee80e6378259cc1dd6 +#: ../../tips.rst:336 4a0722ad68e944ee80e6378259cc1dd6 msgid "" "To use a `custom domain `_ with GitHub Pages, you need to put the " @@ -605,11 +637,11 @@ msgstr "" ")添加到站点根目录的 ``CNAME`` 文件中。为此,请创建 ``content/extra/`` 目录,并在里面添加一个 ``CNAME`` " "文件。然后使用Pelican的 ``STATIC_PATHS`` 来告诉Pelican将此文件复制到输出目录:" -#: ../../tips.rst:337 8ad906848762400d9e2462034d151a16 +#: ../../tips.rst:347 8ad906848762400d9e2462034d151a16 msgid "Note: use forward slashes, ``/``, even on Windows." msgstr "请注意:务必使用正斜杠 ``/`` ,在Windows上也是。" -#: ../../tips.rst:339 7b109f4944064382babc9158567c8e82 +#: ../../tips.rst:349 7b109f4944064382babc9158567c8e82 msgid "" "You can also use the ``EXTRA_PATH_METADATA`` mechanism to place a " "``favicon.ico`` or ``robots.txt`` at the root of any site." @@ -617,17 +649,17 @@ msgstr "" "利用 ``EXTRA_PATH_METADATA`` 机制,你可以将 ``favicon.ico`` 或 ``robots.txt`` " "也拷贝到站点的根目录下。" -#: ../../tips.rst:343 678eea0644b5400496ad9173d05368d5 +#: ../../tips.rst:353 678eea0644b5400496ad9173d05368d5 msgid "How to add YouTube or Vimeo Videos" msgstr "如何添加YouTube或Vimeo视频" -#: ../../tips.rst:345 ca57b327dd6b432d82cdc91193bde6bb +#: ../../tips.rst:355 ca57b327dd6b432d82cdc91193bde6bb msgid "" "The easiest way is to paste the embed code of the video from these sites " "directly into your source content." msgstr "最简单的方法是将这些网站的视频嵌入代码直接粘贴到您的源内容文件中。" -#: ../../tips.rst:348 0a4f27e2edbe494ab52f73595646986e +#: ../../tips.rst:358 0a4f27e2edbe494ab52f73595646986e msgid "" "Alternatively, you can also use Pelican plugins like ``liquid_tags``, " "``pelican_youtube``, or ``pelican_vimeo`` to embed videos in your " @@ -636,7 +668,7 @@ msgstr "" "或者,您还可以使用例如 ``liquid_tags`` 、``pelican_youtube`` 或 ``pelican_vimeo`` " "等Pelican插件将视频嵌入。" -#: ../../tips.rst:351 e73517b72da347738421784b776b1f1c +#: ../../tips.rst:361 e73517b72da347738421784b776b1f1c msgid "" "Moreover, markup languages like reST and Markdown have plugins that let " "you embed videos in the markup. You can use `reST video directive " @@ -647,31 +679,31 @@ msgstr "" "`_ 或者 `Markdown的mdx_video插件 " "`_ 。" -#: ../../tips.rst:358 b9d27cda716048b2ab7c13646d7faf09 +#: ../../tips.rst:368 b9d27cda716048b2ab7c13646d7faf09 msgid "Develop Locally Using SSL" msgstr "在本地使用SSL进行开发" -#: ../../tips.rst:360 50df9ec072aa47eabbae132fd8f5cb68 +#: ../../tips.rst:370 50df9ec072aa47eabbae132fd8f5cb68 msgid "Here's how you can set up your local pelican server to support SSL." msgstr "以下描述了如何在本地Pelican服务器上配置SSL。" -#: ../../tips.rst:362 9b5045375a874c4d9c29f7109f05c539 +#: ../../tips.rst:372 9b5045375a874c4d9c29f7109f05c539 msgid "" "First, create a self-signed certificate and key using ``openssl`` (this " "creates ``cert.pem`` and ``key.pem``)::" msgstr "首先,通过 ``openssl`` 创建自签名的证书和密钥,这会生成 ``cert.pem`` 和 ``key.pem`` 文件:" -#: ../../tips.rst:366 2f1cfa536fc540f69d671f8a118769d7 +#: ../../tips.rst:376 2f1cfa536fc540f69d671f8a118769d7 msgid "" "And use this command to launch the server (the server starts within your " "``output`` directory)::" msgstr "接着使用下面的命令来开启服务器(此服务器会在 ``output`` 目录下开启):" -#: ../../tips.rst:370 029ea2b0e4fe4b0f814158ae33e3a8ff +#: ../../tips.rst:380 029ea2b0e4fe4b0f814158ae33e3a8ff msgid "If you are using ``develop-server.sh``, add this to the top::" msgstr "如果你使用的是 ``develop-server.sh`` 脚本,在脚本的开头添加:" -#: ../../tips.rst:375 c2784fdd9fdb433799d57f903d0e49d8 +#: ../../tips.rst:385 c2784fdd9fdb433799d57f903d0e49d8 msgid "and modify the ``pelican.server`` line as follows::" msgstr "然后修改按照下述修改 ``pelican.server`` 一行:" From 8b4d7475ea9ee7f998f482ce6fc1f5267e12a73d Mon Sep 17 00:00:00 2001 From: Chris Rose Date: Wed, 31 Dec 2025 08:45:17 -0800 Subject: [PATCH 02/15] dev: Switch from PDM to standard dev-dependencies PDM supports this specification (per https://pdm-project.org/latest/usage/dependency/#add-development-only-dependencies) and this lets other frontends (uv, baby!) make use of the same dependencies. --- pyproject.toml | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 09fcbdb6..f6cb125b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -59,24 +59,7 @@ pelican-plugins = "pelican.plugins._utils:list_plugins" pelican-quickstart = "pelican.tools.pelican_quickstart:main" pelican-themes = "pelican.tools.pelican_themes:main" -[tool.autopub] -project-name = "Pelican" -git-username = "botpub" -git-email = "52496925+botpub@users.noreply.github.com" -changelog-file = "docs/changelog.rst" -changelog-header = "###############" -version-header = "=" - -[tool.pdm] -ignore_package_warnings = ["sphinx"] - -[tool.pdm.scripts] -docbuild = "invoke docbuild" -docserve = "invoke docserve" -lint = "invoke lint" -test = "invoke tests" - -[tool.pdm.dev-dependencies] +[dependency-groups] dev = [ "BeautifulSoup4>=4.13.3", "jinja2>=3.1.2", @@ -100,6 +83,23 @@ dev = [ "tomli>=2.0.1; python_version < \"3.11\"", ] +[tool.autopub] +project-name = "Pelican" +git-username = "botpub" +git-email = "52496925+botpub@users.noreply.github.com" +changelog-file = "docs/changelog.rst" +changelog-header = "###############" +version-header = "=" + +[tool.pdm] +ignore_package_warnings = ["sphinx"] + +[tool.pdm.scripts] +docbuild = "invoke docbuild" +docserve = "invoke docserve" +lint = "invoke lint" +test = "invoke tests" + [tool.pdm.build] source-includes = [ "CONTRIBUTING.rst", From 4444f99c179e44984eef905617e9cfd34b639df0 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Thu, 19 Feb 2026 22:58:11 +0000 Subject: [PATCH 03/15] Don't render 'By' if no authors --- pelican/themes/simple/templates/index.html | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pelican/themes/simple/templates/index.html b/pelican/themes/simple/templates/index.html index 97caac6a..5eabc244 100644 --- a/pelican/themes/simple/templates/index.html +++ b/pelican/themes/simple/templates/index.html @@ -11,11 +11,13 @@
{{ article.summary }}

Published:

+ {%- if article.authors %}
By {% for author in article.authors %} {{ author }} {% endfor %}
+ {%- endif %}
{% endfor %} From d9b76ac0e7c348c198d0a1ff00ab467624f812c0 Mon Sep 17 00:00:00 2001 From: nkr <42086312+nkr0@users.noreply.github.com> Date: Tue, 7 Oct 2025 03:06:13 +0200 Subject: [PATCH 04/15] Use a city closer to the equator and that does not use daylight savings in tests --- pelican/tests/test_utils.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/pelican/tests/test_utils.py b/pelican/tests/test_utils.py index 95bf197a..2d370c64 100644 --- a/pelican/tests/test_utils.py +++ b/pelican/tests/test_utils.py @@ -64,8 +64,13 @@ class TestUtils(LoggedTestCase): date_hour_z = utils.SafeDatetime( year=2012, month=11, day=22, hour=22, minute=11, tzinfo=timezone.utc ) - date_hour_est = utils.SafeDatetime( - year=2012, month=11, day=22, hour=22, minute=11, tzinfo=ZoneInfo("EST") + date_hour_wib = utils.SafeDatetime( + year=2012, + month=11, + day=22, + hour=22, + minute=11, + tzinfo=ZoneInfo("Asia/Jakarta"), ) date_hour_sec = utils.SafeDatetime( year=2012, month=11, day=22, hour=22, minute=11, second=10 @@ -79,14 +84,14 @@ class TestUtils(LoggedTestCase): second=10, tzinfo=timezone.utc, ) - date_hour_sec_est = utils.SafeDatetime( + date_hour_sec_wib = utils.SafeDatetime( year=2012, month=11, day=22, hour=22, minute=11, second=10, - tzinfo=ZoneInfo("EST"), + tzinfo=ZoneInfo("Asia/Jakarta"), ) date_hour_sec_frac_z = utils.SafeDatetime( year=2012, @@ -108,10 +113,10 @@ class TestUtils(LoggedTestCase): "22.11.2012": date, "22.11.2012 22:11": date_hour, "2012-11-22T22:11Z": date_hour_z, - "2012-11-22T22:11-0500": date_hour_est, + "2012-11-22T22:11+0700": date_hour_wib, "2012-11-22 22:11:10": date_hour_sec, "2012-11-22T22:11:10Z": date_hour_sec_z, - "2012-11-22T22:11:10-0500": date_hour_sec_est, + "2012-11-22T22:11:10+0700": date_hour_sec_wib, "2012-11-22T22:11:10.123Z": date_hour_sec_frac_z, } From e78a555fff7e3474a759fdcf40df6debc1788f62 Mon Sep 17 00:00:00 2001 From: Justin Mayer Date: Mon, 30 Mar 2026 10:59:20 +0200 Subject: [PATCH 05/15] fix: Appease linter --- pelican/themes/simple/templates/index.html | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pelican/themes/simple/templates/index.html b/pelican/themes/simple/templates/index.html index 5eabc244..100a7200 100644 --- a/pelican/themes/simple/templates/index.html +++ b/pelican/themes/simple/templates/index.html @@ -12,11 +12,11 @@

Published:

{%- if article.authors %} -
By - {% for author in article.authors %} - {{ author }} - {% endfor %} -
+
By + {% for author in article.authors %} + {{ author }} + {% endfor %} +
{%- endif %}
From c495634138bba98d0e64cfcea0ad7b60ec74dbfe Mon Sep 17 00:00:00 2001 From: Jan Date: Mon, 30 Mar 2026 11:03:31 +0200 Subject: [PATCH 06/15] Add `SSH_PORT` to `sftp_upload` in Makefile template --- pelican/tools/templates/Makefile.jinja2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/tools/templates/Makefile.jinja2 b/pelican/tools/templates/Makefile.jinja2 index 67571b47..467b1976 100644 --- a/pelican/tools/templates/Makefile.jinja2 +++ b/pelican/tools/templates/Makefile.jinja2 @@ -128,7 +128,7 @@ ssh_upload: publish {% set upload = upload + ["sftp_upload"] %} sftp_upload: publish - printf 'put -r $(OUTPUTDIR)/*' | sftp $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) + printf 'put -r $(OUTPUTDIR)/*' | sftp -P $(SSH_PORT) $(SSH_USER)@$(SSH_HOST):$(SSH_TARGET_DIR) {% set upload = upload + ["rsync_upload"] %} rsync_upload: publish From 862ac78310d45532f582ee76c2210d26e734e194 Mon Sep 17 00:00:00 2001 From: Sam Bull Date: Mon, 30 Mar 2026 12:04:55 +0100 Subject: [PATCH 07/15] Add `page_content` block for better template inheritance --- pelican/themes/simple/templates/page.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pelican/themes/simple/templates/page.html b/pelican/themes/simple/templates/page.html index 0eefc7e3..4096e7a4 100644 --- a/pelican/themes/simple/templates/page.html +++ b/pelican/themes/simple/templates/page.html @@ -20,7 +20,7 @@ {% import 'translations.html' as translations with context %} {{ translations.translations_for(page) }} - {{ page.content }} + {% block page_content %}{{ page.content }}{% endblock page_content %} {% if page.modified %}