Debian Codegraph @

docs/locale/zh_CN/LC_MESSAGES/settings.po

raw
1 # SOME DESCRIPTIVE TITLE.
2 # Copyright (C) 2010–2024
3 # This file is distributed under the same license as the PELICAN package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, 2024.
5 #
6 msgid ""
7 msgstr ""
8 "Project-Id-Version: PELICAN 4\n"
9 "Report-Msgid-Bugs-To: \n"
10 "POT-Creation-Date: 2024-06-27 16:18+0800\n"
11 "PO-Revision-Date: 2024-06-26 19:00+0800\n"
12 "Last-Translator: GeorgeHu <[email protected]>\n"
13 "Language: zh_CN\n"
14 "Language-Team: \n"
15 "Plural-Forms: nplurals=1; plural=0;\n"
16 "MIME-Version: 1.0\n"
17 "Content-Type: text/plain; charset=utf-8\n"
18 "Content-Transfer-Encoding: 8bit\n"
19 "Generated-By: Babel 2.15.0\n"
20
21 #: ../../settings.rst:2 53029e75034c46d4b54eae3cd205fe2e
22 msgid "Settings"
23 msgstr "设置"
24
25 #: ../../settings.rst:4 dd0b07017437474b99116d1c1927af95
26 msgid ""
27 "Pelican is configurable thanks to a settings file you can pass to the "
28 "command line::"
29 msgstr "可以通过命令行给Pelican传入配置文件:"
30
31 #: ../../settings.rst:9 df860abc6301440b89366f2898aabd6f
32 msgid ""
33 "If you used the ``pelican-quickstart`` command, your primary settings "
34 "file will be named ``pelicanconf.py`` by default."
35 msgstr "如果使用的是 ``pelican-quickstart`` 命令,默认的主配置文件时 ``pelicanconf.py`` 。"
36
37 #: ../../settings.rst:12 a7b47b4379934afcb2bfd9f5425c4a6c
38 msgid ""
39 "You can also specify settings via ``-e`` / ``--extra-settings`` option "
40 "flags. It will override default settings as well as any defined within "
41 "the setting file. Note that values must follow JSON notation::"
42 msgstr ""
43 "通过 ``-e`` / ``--extra-settings`` "
44 "选项,可以直接指定一些配置来覆盖配置文件中的设置。需要注意的是,选项值必须时JSON格式的:"
45
46 #: ../../settings.rst:18 16437361edd74b8fb84dcde3da35baa3
47 msgid ""
48 "Environment variables can also be used here but must be escaped "
49 "appropriately::"
50 msgstr "可以在命令中使用环境变量,但是需要正确地进行转义:"
51
52 #: ../../settings.rst:24 71a1194ecd1b4a519877818ad172a44f
53 msgid ""
54 "When experimenting with different settings (especially the metadata ones)"
55 " caching may interfere and the changes may not be visible. In such cases "
56 "disable caching with ``LOAD_CONTENT_CACHE = False`` or use the "
57 "``--ignore-cache`` command-line switch."
58 msgstr ""
59 "在尝试不同的设置(特别是尝试元数据)时,受缓存的干扰,对设置的更改可能不会生效。在这种情况下,指定 ``LOAD_CONTENT_CACHE = "
60 "False`` 设置或 ``--ignore-cache`` 命令行选项即可。"
61
62 #: ../../settings.rst:29 3362ac7659744fab9649c7d4edec7456
63 msgid ""
64 "Settings are configured in the form of a Python module (a file). There is"
65 " an `example settings file "
66 "<https://raw.githubusercontent.com/getpelican/pelican/main/samples/pelican.conf.py>`_"
67 " available for reference."
68 msgstr ""
69 "设置以Python模块(一个文件)的形式。 `示例配置文件 "
70 "<https://raw.githubusercontent.com/getpelican/pelican/main/samples/pelican.conf.py>`_"
71 " 可供您参考。"
72
73 #: ../../settings.rst:34 fd01256fff0d40319c6bd55c3e3d1f8d
74 msgid ""
75 "To see a list of current settings in your environment, including both "
76 "default and any customized values, run the following command (append one "
77 "or more specific setting names as arguments to see values for those "
78 "settings only)::"
79 msgstr "要查看当前环境下的配置,同时查看默认的或是自定义的配置值,执行下面的命令(在后面以参数的形式添加一个或多个指定的配置名称,可以单独查看指定的配置项):"
80
81 #: ../../settings.rst:40 fd4f9ceda04c4b119adf0e6e3226842d
82 msgid ""
83 "All the setting identifiers must be set in all-caps, otherwise they will "
84 "not be processed. Setting values that are numbers (5, 20, etc.), booleans"
85 " (True, False, None, etc.), dictionaries, or tuples should *not* be "
86 "enclosed in quotation marks. All other values (i.e., strings) *must* be "
87 "enclosed in quotation marks."
88 msgstr ""
89 "所有设置的键(设置中的变量名)都必须是大写的,否则会被无视。配置值可能是数值(5、20等)、布尔值(True、False、None等)、字典或者元组。这些值应该以Python值的形式存在,"
90 " *不* 需要用引号引起来。除此之外的其他配置值(例如字符串) *必须* 用引号引起来。"
91
92 #: ../../settings.rst:46 aece462c39674aa68651567ca58ac940
93 msgid ""
94 "Unless otherwise specified, settings that refer to paths can be either "
95 "absolute or relative to the configuration file. The settings you define "
96 "in the configuration file will be passed to the templates, which allows "
97 "you to use your settings to add site-wide content."
98 msgstr "除非另有指定,设置中指定的路径可以是绝对路径,也可以是相对于配置文件的相对路径。设置中配置的东西会传递到网站模板中,这使得可以在配置文件中添加在整个站点中都能使用的内容。"
99
100 #: ../../settings.rst:51 b3de78704bd34981bce53c625e7181ce
101 msgid "Here is a list of settings for Pelican:"
102 msgstr "下面是Pelican设置项的列表:"
103
104 #: ../../settings.rst:55 4a3728c3d465496b903ad3bafef32da9
105 msgid "Basic settings"
106 msgstr "基础设置"
107
108 #: ../../settings.rst:59 74ac50f3d3d847148d37db0c2f4dcb1a
109 msgid ""
110 "When you don't specify a category in your post metadata, set this setting"
111 " to ``True``, and organize your articles in subfolders, the subfolder "
112 "will become the category of your post. If set to ``False``, "
113 "``DEFAULT_CATEGORY`` will be used as a fallback."
114 msgstr ""
115 "当您没有在推文中指定元数据categroy时,若本项设置设为了 ``True`` "
116 ",并且文章也是通过子文件夹进行分类管理的,那么这些子文件夹的名称就会作为发布内容的分类。若本项设为了 ``False`` ,会使用配置项 "
117 "``DEFAULT_CATEGORY`` 作为默认分类。"
118
119 #: ../../settings.rst:66 6fd89e4093cf42f7b7a15d12b806ae39
120 msgid "The default category to fall back on."
121 msgstr "默认的分类"
122
123 #: ../../settings.rst:70 dce02cdf67434cc385bf4c1a0ab92931
124 msgid ""
125 "Whether to display pages on the menu of the template. Templates may or "
126 "may not honor this setting."
127 msgstr "指定是否将“页面”显示在模板的菜单中。模板可能不会遵循此项。"
128
129 #: ../../settings.rst:75 830ab9b9933b488193d4b8afd85e6a31
130 msgid ""
131 "Whether to display categories on the menu of the template. Templates may "
132 "or not honor this setting."
133 msgstr "指定是否将“分类”显示在模板的菜单中。模板可能不会遵循此项。"
134
135 #: ../../settings.rst:80 01ef16e7f3d7423b96ee3b57b0173ebc
136 msgid ""
137 "Extra configuration settings for the docutils publisher (applicable only "
138 "to reStructuredText). See `Docutils Configuration`_ settings for more "
139 "details."
140 msgstr "docutils的额外配置项(只针对reStructuredText有效)。在 `Docutils 配置`_ 设置中查看更多信息。"
141
142 #: ../../settings.rst:85 f7a9532b08ac43b4a61bd175ec91d66b
143 msgid ""
144 "Delete the output directory, and **all** of its contents, before "
145 "generating new files. This can be useful in preventing older, unnecessary"
146 " files from persisting in your output. However, **this is a destructive "
147 "setting and should be handled with extreme care.**"
148 msgstr ""
149 "在生成新文件前删除输出目录和其中 **所有** 的内容。这可以避免一些老的无用的文件一直存在于输出目录中。但是, "
150 "**此项配置是具有破坏性的,请谨慎使用** 。"
151
152 #: ../../settings.rst:92 ff8c5e50c9ac40bb85e8384fcad6617e
153 msgid ""
154 "A list of filenames that should be retained and not deleted from the "
155 "output directory. One use case would be the preservation of version "
156 "control data."
157 msgstr "一个文件名的列表,包含了应该保留,不从输出目录中删除的文件。可以用于版本控制数据的保留。"
158
159 #: ../../settings.rst:95 ../../settings.rst:110 ../../settings.rst:136
160 #: 7ee367e15d2549a5889dee6f67f9d5bf 8befd4f04dcf4f638e6a50972cf62f0e
161 #: c5a4d3b37cd94412a6f37c8ad0dae8e1
162 msgid "Example::"
163 msgstr "例子:"
164
165 #: ../../settings.rst:101 b188b54ab9bf46898663261c6b0bdbf9
166 msgid ""
167 "A dictionary of custom Jinja2 environment variables you want to use. This"
168 " also includes a list of extensions you may want to include. See `Jinja "
169 "Environment documentation`_."
170 msgstr "一个字典,用于您想要用的自定义的Jinja2环境变量。这其中也包含了要使用的扩展列表。详见 `Jinja环境文档`_ "
171
172 #: ../../settings.rst:107 57cdaaf600bf4c2aa461094e99584b54
173 msgid ""
174 "A dictionary of custom Jinja2 filters you want to use. The dictionary "
175 "should map the filtername to the filter function."
176 msgstr "一个字典,存放自定义的Jinja2过滤器。此字典中应该是过滤器名称到过滤器函数的映射。"
177
178 #: ../../settings.rst:118 31c28dcad1a2433784678692606c7407
179 msgid "See: `Jinja custom filters documentation`_."
180 msgstr "详见: `Jinja自定义过滤器文档`_ 。"
181
182 #: ../../settings.rst:122 33098b212ebb4c769d9a7e8e35e22f71
183 msgid ""
184 "A dictionary of custom objects to map into the Jinja2 global environment "
185 "namespace. The dictionary should map the global name to the global "
186 "variable/function. See: `Jinja global namespace documentation`_."
187 msgstr ""
188 "一个字典,可以将自定义对象映射到Jinja2的全局环境命名空间中。字典中应该是全局名称到全局变量/函数的映射。详见: "
189 "`Jinja全局命名空间文档`_ 。"
190
191 #: ../../settings.rst:128 9d07d4c867f644dbad534da8c17805eb
192 msgid ""
193 "A dictionary of custom Jinja2 tests you want to use. The dictionary "
194 "should map test names to test functions. See: `Jinja custom tests "
195 "documentation`_."
196 msgstr "一个字典,自定义了要使用的Jinja测试。字典中应该是测试名到测试函数的映射。详见: `Jinja自定义测试文档`_ 。"
197
198 #: ../../settings.rst:133 68fca89155b84571bf16ccc9e2d4d2f2
199 msgid ""
200 "A list of tuples containing the logging level (up to ``warning``) and the"
201 " message to be ignored."
202 msgstr "一个以元组为元素的列表,元组中包含日志等级(最高到 ``warning``)和要忽略的消息。"
203
204 #: ../../settings.rst:142 2052888dbd6c4eb58148d383c23e6670
205 msgid ""
206 "A dictionary of file extensions / Reader classes for Pelican to process "
207 "or ignore."
208 msgstr "一个字典,记录了文件扩展名到Reader类的映射。可以据此让Pelican按照指定规则处理或忽略某些文件。"
209
210 #: ../../settings.rst:145 5f70a62f7360438eb733791964a66c80
211 msgid "For example, to avoid processing .html files, set::"
212 msgstr "例如,下面的配置可以让Pelican忽略 .html的文件不处理:"
213
214 #: ../../settings.rst:149 2d665ed99679489fb6a06fbd30754d6b
215 msgid "To add a custom reader for the ``foo`` extension, set::"
216 msgstr "为扩展名为 ``foo`` 的文件添加自定义的reader:"
217
218 #: ../../settings.rst:155 726d7ea5aa2540139b82d68adf424a99
219 msgid ""
220 "A list of glob patterns. Files and directories matching any of these "
221 "patterns will be ignored by the processor. For example, the default "
222 "``['.#*']`` will ignore emacs lock files, and ``['__pycache__']`` would "
223 "ignore Python 3's bytecode caches."
224 msgstr ""
225 "通配符模式的列表。任何匹配上的文件和目录都会被忽略。例如,默认的 ``['.#*']`` 可以忽略emacs的锁定文件, "
226 "``['__pycache__']`` 则可以忽略Python3的字节码缓存文件。"
227
228 #: ../../settings.rst:162 39fdbf56f4314015b8c61c7473b7046f
229 msgid ""
230 "Extra configuration settings for the Markdown processor. Refer to the "
231 "Python Markdown documentation's `Options section <https://python-"
232 "markdown.github.io/reference/#markdown>`_ for a complete list of "
233 "supported options. The ``extensions`` option will be automatically "
234 "computed from the ``extension_configs`` option."
235 msgstr ""
236 "对Markdown处理器的额外配置。可以参考Python Markdown文档的 `选项章节 <https://python-"
237 "markdown.github.io/reference/#markdown>`_ ,查看可用选项的完整列表。其中的 "
238 "``extensions_configs`` 选项会用于自动计算 ``extensions`` 选项。"
239
240 #: ../../settings.rst:168 bcabc42f8a1143f28d39d928a84e5c80
241 msgid "Defaults to::"
242 msgstr "默认值为:"
243
244 #: ../../settings.rst:180 dfb5d9dcf9034218a44c38fa5d94b6e4
245 msgid ""
246 "The dictionary defined in your settings file will replace this default "
247 "one."
248 msgstr "配置文件中的字典会覆盖默认设置。"
249
250 #: ../../settings.rst:185 57124bf26ff24273a9fda76782a551e0
251 msgid ""
252 "Where to output the generated files. This should correspond to your web "
253 "server's virtual host root directory."
254 msgstr "输出生成文件的位置。此项配置应该和web服务器虚拟主机的根目录有关。"
255
256 #: ../../settings.rst:190 61cce052ae5549f98e48a9da9548b1d4
257 msgid ""
258 "Path to content directory to be processed by Pelican. If undefined, and "
259 "content path is not specified via an argument to the ``pelican`` command,"
260 " Pelican will use the current working directory."
261 msgstr "待Pelican处理的文件目录的路径。如果没有定义,也没有在 ``pelican`` 命令中通过参数指定,Pelican会默认使用当前工作目录。"
262
263 #: ../../settings.rst:196 770d207912f24f7b989208ef921d761c
264 msgid ""
265 "A list of directories and files to look at for pages, relative to "
266 "``PATH``."
267 msgstr "此列表中的目录和文件会被视为页面,路径是相对于 ``PATH`` 的。"
268
269 #: ../../settings.rst:200 6c39a2bdec444b59b7564f15c161483e
270 msgid ""
271 "A list of directories to exclude when looking for pages in addition to "
272 "``ARTICLE_PATHS``."
273 msgstr "除了 ``ARTICLE_PATHS`` 中的文件不会被视为页面外,此选项中也可指定不被视为页面的文件目录。"
274
275 #: ../../settings.rst:205 ec472b45d27448538a216960335cede9
276 msgid ""
277 "A list of directories and files to look at for articles, relative to "
278 "``PATH``."
279 msgstr "此列表中的目录和文件会被视为文章,路径是相对于 ``PATH`` 的。"
280
281 #: ../../settings.rst:210 7d45d3e60d0c4c0e8c75fafc6ee0bf1a
282 msgid ""
283 "A list of directories to exclude when looking for articles in addition to"
284 " ``PAGE_PATHS``."
285 msgstr "除了 ``PAGE_PATHS`` 中的文件不会被视为文章外,此选项中也可指定不被视为文章的文件目录。"
286
287 #: ../../settings.rst:215 4b3fb145ed814ff49262ce0ad20f711a
288 msgid ""
289 "Set to True if you want to copy the articles and pages in their original "
290 "format (e.g. Markdown or reStructuredText) to the specified "
291 "``OUTPUT_PATH``."
292 msgstr ""
293 "如果你想要将文章和页面以源格式(例如Markdown或reStructuredText)复制一份到 ``OUTPUT_PATH`` "
294 "目录中,就将此项设为True。"
295
296 #: ../../settings.rst:220 4da18483b371405facd124c3e345594c
297 msgid ""
298 "Controls the extension that will be used by the SourcesGenerator. "
299 "Defaults to ``.text``. If not a valid string the default value will be "
300 "used."
301 msgstr "控制会被SourcesGenerator使用的扩展名。默认为 ``.text`` 。如果设置的值是无效的,会使用默认值。"
302
303 #: ../../settings.rst:225 86076613fd6d438ab908d53be5422f06
304 msgid "The list of plugins to load. See :ref:`plugins`."
305 msgstr "要加载的插件列表。详见 :ref:`插件<plugins>` 。"
306
307 #: ../../settings.rst:229 208cbbef07c742a3906f604c97a4d332
308 msgid "A list of directories where to look for plugins. See :ref:`plugins`."
309 msgstr "查找插件的目录列表。详见 :ref:`插件<plugins>` 。"
310
311 #: ../../settings.rst:233 265efbdef95744759fea79fd41a4003f
312 msgid "Your site name"
313 msgstr "站点名称"
314
315 #: ../../settings.rst:237 d57d6f99c06b4776b31acc033c97f67b
316 msgid ""
317 "Base URL of your web site. Not defined by default, so it is best to "
318 "specify your SITEURL; if you do not, feeds will not be generated with "
319 "properly-formed URLs. If your site is available via HTTPS, this setting "
320 "should begin with ``https://`` — otherwise use ``http://``. Then append "
321 "your domain, with no trailing slash at the end. Example: ``SITEURL = "
322 "'https://example.com'``"
323 msgstr ""
324 "网站的基URL。此选项没有默认值,因此最好是指定一下SITEURL;如果不指定,feeds就无法正确生成URL。如果站点使用了HTTPS,那么此项设定最好以"
325 " ``https://`` 开头;否则使用 ``http://`` 即可。在协议后面接着就是域名,不要以斜杠结尾。一个例子: ``SITEURL "
326 "= 'https://example.com'`` "
327
328 #: ../../settings.rst:246 d4dd07a95a904806812b20ff3ec3049b
329 msgid ""
330 "A list of directories (relative to ``PATH``) in which to look for static "
331 "files. Such files will be copied to the output directory without "
332 "modification. Articles, pages, and other content source files will "
333 "normally be skipped, so it is safe for a directory to appear both here "
334 "and in ``PAGE_PATHS`` or ``ARTICLE_PATHS``. Pelican's default settings "
335 "include the \"images\" directory here."
336 msgstr ""
337 "用于查找静态文件的目录列表。静态文件会原封不动地拷贝到输出目录中。文章、页面以及其他的内容源文件都会被跳过,因此一个目录可以安全地同时出现在此选项以及"
338 " ``PAGE_PATHS`` 或 ``ARTICLE_PATHS`` 中。Pelican默认会将 \"images\" 目录包含在此选项中。"
339
340 #: ../../settings.rst:255 fc85f34c9d9640f48e0c739cc2787847
341 msgid "A list of directories to exclude when looking for static files."
342 msgstr "此选项列表中的目录都会在搜索静态文件时排除在外。"
343
344 #: ../../settings.rst:259 ff6eb957bf36419d8a6a376d3232c117
345 msgid ""
346 "If set to False, content source files will not be skipped when copying "
347 "files found in ``STATIC_PATHS``. This setting is for backward "
348 "compatibility with Pelican releases before version 3.5. It has no effect"
349 " unless ``STATIC_PATHS`` contains a directory that is also in "
350 "``ARTICLE_PATHS`` or ``PAGE_PATHS``. If you are trying to publish your "
351 "site's source files, consider using the ``OUTPUT_SOURCES`` setting "
352 "instead."
353 msgstr ""
354 "如果此选项设为False, ``STATIC_PATHS`` "
355 "中的内容源文件将不会被忽略,也会像静态文件一样被原封不动地拷贝。此项设置是为了给3.5版本前的Pelican进行向后兼容的。若某个目录同时出现在了"
356 " ``STATIC_PATHS`` 和 ``ARTICLE_PATHS`` 中,或 ``STATIC_PATHS`` 和 "
357 "``PAGE_PATHS`` 中时才会生效。如果你是想将站点的源文件发布出去的话,请考虑使用 ``OUTPUT_SOURCES`` 设置。"
358
359 #: ../../settings.rst:268 bf1a395929034faca5de2bf94514f5e3
360 msgid ""
361 "Create links instead of copying files. If the content and output "
362 "directories are on the same device, then create hard links. Falls back "
363 "to symbolic links if the output directory is on a different filesystem. "
364 "If symlinks are created, don't forget to add the ``-L`` or ``--copy-"
365 "links`` option to rsync when uploading your site."
366 msgstr ""
367 "为静态文件创建链接而不是复制文件本身。如果内容和输出目录位于同一设备上,则创建硬链接;如果输出目录位于不同的文件系统上,则回退至符号链接。若创建了符号链接,使用rsync上传网站时需要添加-L或"
368 "--copy-links选项。"
369
370 #: ../../settings.rst:276 c1931f5e9644460bb528a831fdd41a59
371 msgid ""
372 "If set to ``True``, and ``STATIC_CREATE_LINKS`` is ``False``, compare "
373 "mtimes of content and output files, and only copy content files that are "
374 "newer than existing output files."
375 msgstr ""
376 "当此项设为 ``True`` 且 ``STATIC_CREATE_LINKS`` 设为 ``False`` "
377 "时才会生效,此时会比较mtime,只有在当前文件更新时才会执行拷贝。"
378
379 #: ../../settings.rst:282 60d680a3b3f44bd6b4461c92057e4471
380 msgid ""
381 "If set to True, several typographical improvements will be incorporated "
382 "into the generated HTML via the `Typogrify "
383 "<https://pypi.org/project/typogrify/>`_ library, which can be installed "
384 "via: ``python -m pip install typogrify``"
385 msgstr ""
386 "若此项设置为True,一些显示上的改进将通过 `Typogrify <https://pypi.org/project/typogrify/>`_"
387 " 库合并到生成的HTML中。可以通过 ``python -m pip install typogrify`` 进行安装。"
388
389 #: ../../settings.rst:289 db77faf7956845d1a2d4ff9150138017
390 msgid ""
391 "A list of tags for Typogrify to ignore. By default Typogrify will ignore "
392 "``pre`` and ``code`` tags. This requires that Typogrify version 2.0.4 or "
393 "later is installed"
394 msgstr ""
395 "指定Typogrify要忽略的标签列表。默认情况下,Typogrify将忽略 ``pre`` 和 ``code`` "
396 "标签此项特性需要安装高于2.0.4版本的Typogrify。"
397
398 #: ../../settings.rst:295 8fddf3800e844a189677f113252bee04
399 msgid ""
400 "This setting controls how Typogrify sets up the Smartypants filter to "
401 "interpret multiple dash/hyphen/minus characters. A single ASCII dash "
402 "character (``-``) is always rendered as a hyphen. The ``default`` setting"
403 " does not handle en-dashes and converts double-hyphens into em-dashes. "
404 "The ``oldschool`` setting renders both en-dashes and em-dashes when it "
405 "sees two (``--``) and three (``---``) hyphen characters, respectively. "
406 "The ``oldschool_inverted`` setting turns two hyphens into an em-dash and "
407 "three hyphens into an en-dash."
408 msgstr ""
409 "此设置用于设置Typogrify的Smartypants过滤器,控制过滤器如何解析多个破折号/连字符/减号。单个ASCII破折号字符 "
410 "(``-``) 始终被视为连字符。设为 ``default`` 时不处理短破折号,并会将双连字符转换为长破折号;设为 ``oldschool`` "
411 "时会将两个 ( ``--`` ) 和三个 ( ``--`` ) 连字符分别呈现为短破折号和长破折号;设为 "
412 "``oldschool_inverted`` 时则会将两个连字符转换为长破折号,而将三个连字符转换为短破折号。"
413
414 #: ../../settings.rst:306 c110b209965c448c8e3ca4109edfa0d6
415 msgid ""
416 "When creating a short summary of an article, this will be the default "
417 "length (measured in words) of the text created. This only applies if "
418 "your content does not otherwise specify a summary. Setting to ``None`` "
419 "will cause the summary to be a copy of the original content."
420 msgstr ""
421 "当未给文章或页面书写摘要时,会自动创建摘要,此设置指定了默认创建摘要的长度"
422 "(以字/词为单位)。若将此项设为 ``None`` ,摘要会和原始内容一模一样。"
423
424 #: ../../settings.rst:313 9d446d0be4d248e1b5ef7f5df1977310
425 msgid ""
426 "When creating a short summary of an article, this will be the number of "
427 "paragraphs to use as the summary. This only applies if your content does "
428 "not otherwise specify a summary. Setting to ``None`` will cause the "
429 "summary to use the whole text (up to ``SUMMARY_MAX_LENGTH``) instead of "
430 "just the first N paragraphs."
431 msgstr ""
432 "当未给文章或页面书写摘要时,会自动创建摘要。此设置指定了默认创建摘要的段落数,"
433 "即将正文的前N段视为摘要。若将此项设为 ``None`` ,摘要会和原始内容一模一样,"
434 "但具体还会遵循 ``SUMMARY_MAX_LENGTH`` 。"
435
436 #: ../../settings.rst:321 6a04572678864a959a48dc83f4e78465
437 msgid ""
438 "When creating a short summary of an article and the result was truncated "
439 "to match the required word length, this will be used as the truncation "
440 "suffix."
441 msgstr "在创建摘要时,若内容因长度被截断,此项设置值将用作截断的结尾。"
442
443 #: ../../settings.rst:326 df2e4e17f0de4d5b97f282fb9a73c57d
444 msgid ""
445 "If disabled, content with dates in the future will get a default status "
446 "of ``draft``. See :ref:`reading_only_modified_content` for caveats."
447 msgstr ""
448 "若此项设为False,带了未来日期的文章或页面的状态都会设为 ``draft`` 。相关注意事项详见 "
449 ":ref:`reading_only_modified_content` 。"
450
451 #: ../../settings.rst:331 32787a794f534c759cdff64b48f3d4f0
452 msgid ""
453 "Regular expression that is used to parse internal links. Default syntax "
454 "when linking to internal files, tags, etc., is to enclose the identifier,"
455 " say ``filename``, in ``{}`` or ``||``. Identifier between ``{`` and "
456 "``}`` goes into the ``what`` capturing group. For details see :ref:`ref-"
457 "linking-to-internal-content`."
458 msgstr ""
459 "用于解析内部链接的正则表达式。链接到内部文件、标签等时的默认语法是将标识符(例如 ``filename`` )括在 ``{}`` 或 ``||``"
460 " 中。 ``{`` 和 ``}`` 之间的则进入 ``what`` 捕获组。更多详情请参见 :ref:`ref-linking-to-"
461 "internal-content` 。"
462
463 #: ../../settings.rst:339 58a95b3645534c8fa0d30d0e237f3d42
464 msgid ""
465 "A list of default Pygments settings for your reStructuredText code "
466 "blocks. See :ref:`internal_pygments_options` for a list of supported "
467 "options."
468 msgstr ""
469 "reStructuredText代码块的默认Pygments设置列表。有关受支持选项的列表,请参阅 "
470 ":ref:`internal_pygments_options` 。"
471
472 #: ../../settings.rst:344 8086dcfa7a7c41dca8ad4c3bfca3f627
473 msgid ""
474 "If ``True``, saves content in caches. See "
475 ":ref:`reading_only_modified_content` for details about caching."
476 msgstr "若设为 ``True`` ,会将内容保存在缓存中。有关缓存请参阅 :ref:`reading_only_modified_content` 。"
477
478 #: ../../settings.rst:349 2ed178f518144b649b73718f9238b54b
479 msgid ""
480 "If set to ``'reader'``, save only the raw content and metadata returned "
481 "by readers. If set to ``'generator'``, save processed content objects."
482 msgstr "若设为 ``reader`` ,则只保存reader返回的原始内容和元数据。若设为 ``generator`` ,则保存处理过的内容对象。"
483
484 #: ../../settings.rst:354 202ee8f7b97949909b28648926f42215
485 msgid "Directory in which to store cache files."
486 msgstr "指定存储缓存文件的目录。"
487
488 #: ../../settings.rst:358 c4c1793569284f8aa087727d2cac0e4f
489 msgid "If ``True``, use gzip to (de)compress the cache files."
490 msgstr "若设为 ``True`` ,则使用gzip对缓存文件进行解压缩。"
491
492 #: ../../settings.rst:362 3d8bcb7fb9fc4e0883de376634b5f443
493 msgid "Controls how files are checked for modifications."
494 msgstr "调整判定文件是否修改的方式"
495
496 #: ../../settings.rst:364 ../../settings.rst:1364
497 #: ded4e8033f904545a9ed73fe4b5f5912
498 msgid "If set to ``'mtime'``, the modification time of the file is checked."
499 msgstr "若设为 ``mtime`` ,则检查文件的修改时间。"
500
501 #: ../../settings.rst:366 ../../settings.rst:1366
502 #: 4e96ee3515e540ba828b8a80328ff700
503 msgid ""
504 "If set to a name of a function provided by the ``hashlib`` module, e.g. "
505 "``'md5'``, the file hash is checked."
506 msgstr "若设为 ``hashlib`` 库中提供的方法名,例如 ``md5`` ,则会检查文件的哈希值。"
507
508 #: ../../settings.rst:371 2a66a13f76854ae794911f0c4d3fcffd
509 msgid "If ``True``, load unmodified content from caches."
510 msgstr "若设为 ``True`` ,则会从缓存中加载未修改的内容。"
511
512 #: ../../settings.rst:375 eea621ea4a5344069cd4c2cf40b3a953
513 msgid ""
514 "A list of metadata fields containing reST/Markdown content to be parsed "
515 "and translated to HTML."
516 msgstr "元数据的列表,此列表中的元数据会被解析为HTML。"
517
518 #: ../../settings.rst:380 8760f989d6ab474d987830631e1eca56
519 msgid ""
520 "The TCP port to serve content from the output folder via HTTP when "
521 "pelican is run with --listen"
522 msgstr "使用--listen运行pelican时,会在此选项指定的TCP端口上以HTTP提供内容。"
523
524 #: ../../settings.rst:385 ea445f6d17204bd8b7f73803aa27a4a8
525 msgid "The IP to which to bind the HTTP server."
526 msgstr "需要和HTTP服务器绑定的IP地址。"
527
528 #: ../../settings.rst:390 3b524d176da047c091f2769c156f3484
529 msgid "URL settings"
530 msgstr "URL设置"
531
532 #: ../../settings.rst:392 fc094e521c5646b18a62975847740ce7
533 msgid ""
534 "The first thing to understand is that there are currently two supported "
535 "methods for URL formation: *relative* and *absolute*. Relative URLs are "
536 "useful when testing locally, and absolute URLs are reliable and most "
537 "useful when publishing. One method of supporting both is to have one "
538 "Pelican configuration file for local development and another for "
539 "publishing. To see an example of this type of setup, use the ``pelican-"
540 "quickstart`` script as described in the :doc:`Installation <install>` "
541 "section, which will produce two separate configuration files for local "
542 "development and publishing, respectively."
543 msgstr ""
544 "首先要知道的是,URL格式有两种形式: *相对URL* 、 *绝对URL* "
545 "。相对URL在本地测试时往往比较有用,而绝对URL在发布时往往是比较有效可靠的。要同时支持两种URL形式,可以在本地开发和发布环境中使用两份不同的配置文件。执行脚本"
546 " ``pelican-quickstart`` 时,就会为本地开发和发布环境分别生成一份配置文件,此脚本在 :doc:`安装Pelican "
547 "<install>` 一节中有详细描述。"
548
549 #: ../../settings.rst:401 9749e4b4a85f45b28fa7a71d05b9bf9c
550 msgid ""
551 "You can customize the URLs and locations where files will be saved. The "
552 "``*_URL`` and ``*_SAVE_AS`` variables use Python's format strings. These "
553 "variables allow you to place your articles in a location such as "
554 "``{slug}/index.html`` and link to them as ``{slug}`` for clean URLs (see "
555 "example below). These settings give you the flexibility to place your "
556 "articles and pages anywhere you want."
557 msgstr ""
558 "URL和文件存储位置都是可以自定义的, ``*_URL`` 和 ``*_SAVE_AS`` "
559 "变量使用Python风格的格式化字符串。你可以利用一些变量将文章放在诸如 ``{slug}/index.html`` 的位置,并且可以以 "
560 "``{slug}`` 的形式进行链接,如此可以让URL更加简洁(详见下面的例子)。这些设置可以让你灵活地将文章和页面放在任何你想要的地方。"
561
562 #: ../../settings.rst:409 9e5d3f0ff133412b8d47de5fc9489e5f
563 msgid ""
564 "If a ``*_SAVE_AS`` setting contains a parent directory that doesn't match"
565 " the parent directory inside the corresponding ``*_URL`` setting, this "
566 "may cause Pelican to generate unexpected URLs in a few cases, such as "
567 "when using the ``{attach}`` syntax."
568 msgstr ""
569 "如果 ``*_SAVE_AS`` 中包含了不在 ``*_URL`` 中的父目录,会导致Pelican在少数情况下(例如使用 "
570 "``{attach}`` 语法时)产生不确定的URL。"
571
572 #: ../../settings.rst:414 b2429a00d07341099c3f34b7134f3732
573 msgid ""
574 "If you don't want that flexibility and instead prefer that your generated"
575 " output paths mirror your source content's filesystem path hierarchy, try"
576 " the following settings::"
577 msgstr "若不希望有这种灵活性,而是希望生成的输出路径保留源内容路径的层次结构,可以尝试以下设置:"
578
579 #: ../../settings.rst:421 d89d44671c504501a54d3baca12e9017
580 msgid ""
581 "Otherwise, you can use a variety of file metadata attributes within URL-"
582 "related settings:"
583 msgstr "否则,可以在URL相关设置中可以使用下面的这些元数据属性:"
584
585 #: ../../settings.rst:424 c97e4acb5b1d4ffda3028b9fdf8b7ed7
586 msgid "slug"
587 msgstr "slug"
588
589 #: ../../settings.rst:425 a5257ea8cb0b430db73f09b337db7a74
590 msgid "date"
591 msgstr "date"
592
593 #: ../../settings.rst:426 d6aa5650f1f34a0ba162f2fd2bf33182
594 msgid "lang"
595 msgstr "lang"
596
597 #: ../../settings.rst:427 1fa0d7e3527b46e298468ad129188ca2
598 msgid "author"
599 msgstr "author"
600
601 #: ../../settings.rst:428 e68b3eeb56304803b7dd56c5c919382d
602 msgid "category"
603 msgstr "category"
604
605 #: ../../settings.rst:430 ../../settings.rst:565
606 #: 663b3feef9aa44208752d6bbe79dbfba
607 msgid "Example usage::"
608 msgstr "例如:"
609
610 #: ../../settings.rst:437 9cdacb3495c84888b48bb6092b7d0111
611 msgid ""
612 "This would save your articles into something like ``/posts/2011/Aug/07"
613 "/sample-post/index.html``, save your pages into "
614 "``/pages/about/index.html``, and render them available at URLs of "
615 "``/posts/2011/Aug/07/sample-post/`` and ``/pages/about/``, respectively."
616 msgstr ""
617 "上面的设置会将你的文章以类似于 ``/posts/2011/Aug/07/sample-post/index.html`` 的形式存储,页面则以 "
618 "``/pages/about/index.html`` 的形式存储,对应的URL分别为 ``/posts/2011/Aug/07/sample-"
619 "post/`` 与 ``/pages/about/`` 。"
620
621 #: ../../settings.rst:443 f7d6af3d02834a689522f5b479aa1d8b
622 msgid ""
623 "If you specify a ``datetime`` directive, it will be substituted using the"
624 " input files' date metadata attribute. If the date is not specified for a"
625 " particular file, Pelican will rely on the file's ``mtime`` timestamp. "
626 "Check the `Python datetime documentation`_ for more information."
627 msgstr ""
628 "如果指定了 ``datetime`` 指令,会使用输入文件的日期元数据进行替换。若没有指定日期,Pelican会根据文件的 ``mtime`` "
629 "时间戳替换之。更多信息可以参考 `Python datetime文档`_ 。"
630
631 #: ../../settings.rst:453 6165ea3291b444c29b329cb7c1d12efa
632 msgid ""
633 "Defines whether Pelican should use document-relative URLs or not. Only "
634 "set this to ``True`` when developing/testing and only if you fully "
635 "understand the effect it can have on links/feeds."
636 msgstr ""
637 "定义Pelican是否使用文档间的相对URL。请只在开发或测试时将此项设为 ``True`` "
638 ",并且确保你已经明白此项设置对链接与feed的影响。(译者注:当此项为True时,网页之间的链接会使用相对路径表达,例如 ``../my-"
639 "article.html`` )"
640
641 #: ../../settings.rst:459 ef74181aff694f228072bb8fc114a49c
642 msgid "The URL to refer to an article."
643 msgstr "文章的URL格式。"
644
645 #: ../../settings.rst:463 28debd5a396746ddaa4c5552034c6f5e
646 msgid "The place where we will save an article."
647 msgstr "文章的存储位置。"
648
649 #: ../../settings.rst:467 a6a8e9c42b1144c0bbe071a0948a7c41
650 msgid "The URL to refer to an article which doesn't use the default language."
651 msgstr "非默认语言文章的URL格式。"
652
653 #: ../../settings.rst:471 885589960b054edbac6b5b5ceabf70ba
654 msgid ""
655 "The place where we will save an article which doesn't use the default "
656 "language."
657 msgstr "非默认语言文章的存储位置。"
658
659 #: ../../settings.rst:476 ed30016072a84eab9108c94ef05d72ac
660 msgid "The URL to refer to an article draft."
661 msgstr "draft状态文章的URL格式。"
662
663 #: ../../settings.rst:480 f1827c2a350e41fb8a29b32ce4f0ce38
664 msgid "The place where we will save an article draft."
665 msgstr "draft状态文章的存储位置。"
666
667 #: ../../settings.rst:484 a73fe74a021e4e1ca7b9d514b05dc709
668 msgid ""
669 "The URL to refer to an article draft which doesn't use the default "
670 "language."
671 msgstr "draft状态非默认语言文章的URL格式。"
672
673 #: ../../settings.rst:488 9eaa92ef96bc49d3b7a751b88e7d1775
674 msgid ""
675 "The place where we will save an article draft which doesn't use the "
676 "default language."
677 msgstr "draft状态非默认语言文章的存储位置。"
678
679 #: ../../settings.rst:493 303454f9d4524fc680dd2092dcb56cb9
680 msgid "The URL we will use to link to a page."
681 msgstr "页面的URL格式。"
682
683 #: ../../settings.rst:497 afd8b970b616418d84b9e3fd4ab52cb4
684 msgid ""
685 "The location we will save the page. This value has to be the same as "
686 "PAGE_URL or you need to use a rewrite in your server config."
687 msgstr "页面的保存位置。除非在服务器上设置了重写规则,否则此项设置必须和PAGE_URL一致。"
688
689 #: ../../settings.rst:502 311b0f44a40c450da8d5049aef066bed
690 msgid ""
691 "The URL we will use to link to a page which doesn't use the default "
692 "language."
693 msgstr "非默认语言页面的URL格式。"
694
695 #: ../../settings.rst:507 a6829be9309144cebd8135f7e20f8670
696 msgid "The location we will save the page which doesn't use the default language."
697 msgstr "非默认语言页面的存储位置。"
698
699 #: ../../settings.rst:511 95a46aad8dd046d096ad55df0777d67b
700 msgid "The URL used to link to a page draft."
701 msgstr "draft状态页面的URL。"
702
703 #: ../../settings.rst:515 0036d550e0cc47058e209dcd9cf313b5
704 msgid "The actual location a page draft is saved at."
705 msgstr "draft状态页面的实际存储位置。"
706
707 #: ../../settings.rst:519 6f382f91d09b4301b68a38d94312ef21
708 msgid ""
709 "The URL used to link to a page draft which doesn't use the default "
710 "language."
711 msgstr "draft状态非默认语言页面的URL格式。"
712
713 #: ../../settings.rst:524 5ef1118bbfa844c5be60d015a8294deb
714 msgid ""
715 "The actual location a page draft which doesn't use the default language "
716 "is saved at."
717 msgstr "draft状态非默认语言页面的实际存储位置。"
718
719 #: ../../settings.rst:529 4c23c58e9b0341c7a632114822383784
720 msgid "The URL to use for an author."
721 msgstr "某一个作者的URL格式。"
722
723 #: ../../settings.rst:533 26e5bbec4ccf442eb1f2ed5850b10aab
724 msgid "The location to save an author."
725 msgstr "某一个作者的存储位置。"
726
727 #: ../../settings.rst:537 1a63d575005147a6a1f506499aea31da
728 msgid "The URL to use for a category."
729 msgstr "某一个分类的URL格式。"
730
731 #: ../../settings.rst:541 aae69f204db3414eb520a6cf2d7b9ee0
732 msgid "The location to save a category."
733 msgstr "某一个分类的存储位置。"
734
735 #: ../../settings.rst:545 c248088861924e30beb1d223ec197ff5
736 msgid "The URL to use for a tag."
737 msgstr "某一个标签的URL格式。"
738
739 #: ../../settings.rst:549 c6f5770301c44f3abb9c105276cb9bd3
740 msgid "The location to save the tag page."
741 msgstr "某一个标签的存储位置"
742
743 #: ../../settings.rst:553 9fc1cb3d807d407bbff78d4d3203f8c0
744 msgid ""
745 "If you do not want one or more of the default pages to be created (e.g., "
746 "you are the only author on your site and thus do not need an Authors "
747 "page), set the corresponding ``*_SAVE_AS`` setting to ``''`` to prevent "
748 "the relevant page from being generated."
749 msgstr "如果您不希望创建默认页面(例如你是网站上的唯一作者,因此不需要作者页面),请将相应的 ``*_SAVE_AS`` 设置设置为 ``''`` 。"
750
751 #: ../../settings.rst:558 2a4afa6f1db840c69e80199d928c3e9a
752 msgid ""
753 "Pelican can optionally create per-year, per-month, and per-day archives "
754 "of your posts. These secondary archives are disabled by default but are "
755 "automatically enabled if you supply format strings for their respective "
756 "``_SAVE_AS`` settings. Period archives fit intuitively with the "
757 "hierarchical model of web URLs and can make it easier for readers to "
758 "navigate through the posts you've written over time."
759 msgstr ""
760 "可选的,Pelican可以为帖子创建每年、每月或是每日的归档。除非你为各自的 ``*_SAVE_AS`` "
761 "设置了格式化字符串,否则这些归档在默认情况下是关闭的。按时间进行归档更直观地符合web URL的层次模型,也可以让读者更容易按时间顺序浏览帖子。"
762
763 #: ../../settings.rst:572 973812c7673a481686350dfca8378df8
764 msgid ""
765 "With these settings, Pelican will create an archive of all your posts for"
766 " the year at (for instance) ``posts/2011/index.html`` and an archive of "
767 "all your posts for the month at ``posts/2011/Aug/index.html``. These can "
768 "be accessed through the URLs ``posts/2011/`` and ``posts/2011/Aug/``, "
769 "respectively."
770 msgstr ""
771 "例如若使用了上面的设置,Pelican会创建按年的归档(例如 ``posts/2011/index.html`` ),以及按月的归档(例如 "
772 "``posts/2011/Aug/index.html`` )。这两个页面分别通过 ``posts/2011/`` 和 "
773 "``posts/2011/Aug/`` 进行访问。"
774
775 #: ../../settings.rst:578 e1e1bb5cc26a40a9a62f88ddd10c072a
776 msgid ""
777 "Period archives work best when the final path segment is ``index.html``. "
778 "This way a reader can remove a portion of your URL and automatically "
779 "arrive at an appropriate archive of posts, without having to specify a "
780 "page name."
781 msgstr ""
782 "当路径设置为以 ``index.html`` "
783 "结尾时,归档的体验会非常好。读者可以删除URL中的一部分以到达合适时间段的归档,而不需要指定某一个页面的名称。"
784
785 #: ../../settings.rst:584 4899822fdcf94a7e8edb0478260181a5
786 msgid "The location to save per-year archives of your posts."
787 msgstr "年归档的存储位置。"
788
789 #: ../../settings.rst:588 eaac63d4c2aa4a0dbfe548b61008edfe
790 msgid ""
791 "The URL to use for per-year archives of your posts. You should set this "
792 "if you enable per-year archives."
793 msgstr "年归档的URL格式,若想要启用年归档,请配置此项。"
794
795 #: ../../settings.rst:593 376c3ee871c847d7b1072ed0e29c482a
796 msgid "The location to save per-month archives of your posts."
797 msgstr "月归档的存储位置。"
798
799 #: ../../settings.rst:597 4788e190048c48c181a8aa4b60b86535
800 msgid ""
801 "The URL to use for per-month archives of your posts. You should set this "
802 "if you enable per-month archives."
803 msgstr "月归档的URL格式,若想要启用月归档,请配置此项。"
804
805 #: ../../settings.rst:602 9e0023d2bb9c43d3bc7bad9bf4b5429c
806 msgid "The location to save per-day archives of your posts."
807 msgstr "日归档的存储位置。"
808
809 #: ../../settings.rst:606 3055e7f7b4af4e87aca8cb560dd0313c
810 msgid ""
811 "The URL to use for per-day archives of your posts. You should set this if"
812 " you enable per-day archives."
813 msgstr "日归档的URL格式,若想要启用日归档,请配置此项。"
814
815 #: ../../settings.rst:609 67fdf1f1cf1a497b8c5847fb10d907e1
816 msgid ""
817 "``DIRECT_TEMPLATES`` work a bit differently than noted above. Only the "
818 "``_SAVE_AS`` settings are available, but it is available for any direct "
819 "template."
820 msgstr ""
821 "``DIRECT_TEMPLATES`` 的工作方式与上面提到的有点不同,在其中可以使用一些特别的直接模板,并且仅在 ``*_SAVE_AS`` "
822 "设置中可用。"
823
824 #: ../../settings.rst:615 ee557971709e4c8e84085295064a205e
825 msgid "The location to save the article archives page."
826 msgstr "文章归档页面的存储位置。"
827
828 #: ../../settings.rst:619 5229274ff3514aa2b3ab5338b22cdea6
829 msgid "The location to save the author list."
830 msgstr "作者列表的存储位置。"
831
832 #: ../../settings.rst:623 560b6eaf36ef4975a5f7503698473e2b
833 msgid "The location to save the category list."
834 msgstr "分类列表的存储位置。"
835
836 #: ../../settings.rst:627 048f18adc37f4693925f05373a426f26
837 msgid "The location to save the tag list."
838 msgstr "标签列表的存储位置。"
839
840 #: ../../settings.rst:631 ac31a8a0b68d47ed9ec65dc9b8eae2a6
841 msgid "The location to save the list of all articles."
842 msgstr "所有文章列表的存储位置。"
843
844 #: ../../settings.rst:633 ceb51d0a532447099bc681ba9cce5b1d
845 msgid ""
846 "URLs for direct template pages are theme-dependent. Some themes use "
847 "corresponding ``*_URL`` setting as string, while others hard-code them: "
848 "``'archives.html'``, ``'authors.html'``, ``'categories.html'``, "
849 "``'tags.html'``."
850 msgstr ""
851 "事实上,直接模板页面的URL是和使用的主题相关的。有些主题会使用 ``*_URL`` 作为变量字符串,而有些则是直接对这些直接模板页面进行硬编码:"
852 " ``'archives.html'`` 、 ``'authors.html'`` 、 ``'categories.html'`` 。"
853
854 #: ../../settings.rst:640 d600dab1b91c4662833d0c5c298938b4
855 msgid ""
856 "Specifies from where you want the slug to be automatically generated. Can"
857 " be set to ``title`` to use the \"Title:\" metadata tag or ``basename`` "
858 "to use the article's file name when creating the slug."
859 msgstr "自动生成slug所依赖的内容。可以指定为元数据标签 ``title`` ,也可以使用文章源文件的文件名 ``basename`` 。"
860
861 #: ../../settings.rst:646 d274502af37648e289fd588834b0019d
862 msgid ""
863 "Allow Unicode characters in slugs. Set ``True`` to keep Unicode "
864 "characters in auto-generated slugs. Otherwise, Unicode characters will be"
865 " replaced with ASCII equivalents."
866 msgstr ""
867 "指定是否允许在slug中使用Unicode字符。若设为 ``True`` "
868 ",自动生成的slug中会保留Unicode字符;否则Unicode字符会使用含义相同的ASCII替换。"
869
870 #: ../../settings.rst:652 37cddacc30bc430b9ea1bad479e90f3d
871 msgid ""
872 "Preserve uppercase characters in slugs. Set ``True`` to keep uppercase "
873 "characters from ``SLUGIFY_SOURCE`` as-is."
874 msgstr "指定是否保留slug中的大写字母。若设为 ``True`` ,则会原样保留 ``SLUGIFY_SOURCE`` 中的大写字母。"
875
876 #: ../../settings.rst:662 785ff8b6508b4e6e980ae6638e7346f9
877 msgid ""
878 "Regex substitutions to make when generating slugs of articles and pages. "
879 "Specified as a list of pairs of ``(from, to)`` which are applied in "
880 "order, ignoring case. The default substitutions have the effect of "
881 "removing non-alphanumeric characters and converting internal whitespace "
882 "to dashes. Apart from these substitutions, slugs are always converted to "
883 "lowercase ascii characters and leading and trailing whitespace is "
884 "stripped. Useful for backward compatibility with existing URLs."
885 msgstr ""
886 "指定生成文章和页面slug时要进行的正则表达式替换。指定的是一对对 ``(from, to)`` "
887 "(from为要替换的内容,to为替换进去的内容),列表中的各对替换规则是按序执行且忽略大小写的。默认的替换会删除非字母非数字的字符并将内部空格替换为连字符。除此之外,slug会将所有字符转换为小写ASCII字符,并删除所有前导和末尾空格。这有利于现有URL的向后兼容。"
888
889 #: ../../settings.rst:672 f2ddbe0d79124ce2b0b9390f9c1492e9
890 msgid ""
891 "Regex substitutions for author slugs. Defaults to "
892 "``SLUG_REGEX_SUBSTITUTIONS``."
893 msgstr "针对作者slug的正则替换。默认等于 ``SLUG_REGEX_SUBSTITUTIONS`` 。"
894
895 #: ../../settings.rst:677 68c5594a14544fe9bed90cdfb41f25c4
896 msgid ""
897 "Regex substitutions for category slugs. Defaults to "
898 "``SLUG_REGEX_SUBSTITUTIONS``."
899 msgstr "针对分类slug的正则替换。默认等于 ``SLUG_REGEX_SUBSTITUTIONS`` 。"
900
901 #: ../../settings.rst:682 3dd263d38e47445c88d34a790e919053
902 msgid ""
903 "Regex substitutions for tag slugs. Defaults to "
904 "``SLUG_REGEX_SUBSTITUTIONS``."
905 msgstr "针对标签slug的正则替换。默认等于 ``SLUG_REGEX_SUBSTITUTIONS`` 。"
906
907 #: ../../settings.rst:685 21a264926d3b46edb2af35f936d0985a
908 msgid "Time and Date"
909 msgstr "日期与时间"
910
911 #: ../../settings.rst:689 ef50be008f104aa6bcbf2df6a81921e8
912 msgid "The timezone used in the date information, to generate Atom and RSS feeds."
913 msgstr "日期信息中使用的时区,会用于生成Atom和RSS feeds。(无默认值,必须手动设置指定)"
914
915 #: ../../settings.rst:691 9ec4050abc58489db63deda401d80b7d
916 msgid ""
917 "If no timezone is defined, UTC is assumed. This means that the generated "
918 "Atom and RSS feeds will contain incorrect date information if your locale"
919 " is not UTC."
920 msgstr "若没有定义时区,会直接使用UTC时区。这意味着当你的时区不等于UTC时,生成的Atom和RSS feeds中会包含错误的日期信息。"
921
922 #: ../../settings.rst:695 8797378878dc47e99388e1d0421da263
923 msgid ""
924 "Pelican issues a warning in case this setting is not defined, as it was "
925 "not mandatory in previous versions."
926 msgstr "在之前的版本中,这一项设置并不是强制的,因此Pelican会在未设置时区时提出警告。"
927
928 #: ../../settings.rst:698 18326d528d0045c88c8e31d0f9bb26f9
929 msgid ""
930 "Have a look at `the wikipedia page`_ to get a list of valid timezone "
931 "values."
932 msgstr "有效的时区设置值可以在 `维基百科页`_ 中查看。"
933
934 #: ../../settings.rst:704 3af0a717e34c4926a40fc6cd58518df2
935 msgid ""
936 "The default date you want to use. If ``'fs'``, Pelican will use the file"
937 " system timestamp information (mtime) if it can't get date information "
938 "from the metadata. If given any other string, it will be parsed by the "
939 "same method as article metadata. If set to a tuple object, the default "
940 "datetime object will instead be generated by passing the tuple to the "
941 "``datetime.datetime`` constructor."
942 msgstr ""
943 "要使用的默认日期。若设为 ``'fs'`` "
944 ",Pelican在无法从元数据中获取日期时,会以系统时间戳信息(mtime)为准;若设为其他字符串,Pelican将用与解析文章元数据相同的方法进行解析;若设为元组,则会将该元组传递给"
945 " ``datetime.datetime`` 的构造函数来生成日期。"
946
947 #: ../../settings.rst:713 e8358468fd034f24a7984b20909ada30
948 msgid "The default date format you want to use."
949 msgstr "指定要使用的默认日期格式。"
950
951 #: ../../settings.rst:717 e7f8237ab45945d78484e8fef0005bdc
952 msgid "If you manage multiple languages, you can set the date formatting here."
953 msgstr "若需要管理多种语言,可以在这里针对不同语言设置不同的日期格式。"
954
955 #: ../../settings.rst:719 eab2352e48174cb085b7bd23115ad15b
956 msgid ""
957 "If no ``DATE_FORMATS`` are set, Pelican will fall back to "
958 "``DEFAULT_DATE_FORMAT``. If you need to maintain multiple languages with "
959 "different date formats, you can set the ``DATE_FORMATS`` dictionary using"
960 " the language name (``lang`` metadata in your post content) as the key."
961 msgstr ""
962 "如果 ``DATE_FORMATS`` 没有设置过,Pelican会使用 ``DEFAULT_DATE_FORMAT`` "
963 "。如果要为不同语言设置不同如期格式,可以在此设置项字典中指定,键为语言名称(对应于帖子内容元数据中的 ``lang`` ),值为日期格式字符串。"
964
965 #: ../../settings.rst:724 2f8d1e03399549bf84a05e25d718ec80
966 #, python-format
967 msgid ""
968 "In addition to the standard C89 strftime format codes that are listed in "
969 "`Python datetime documentation`_, you can use the ``-`` character between"
970 " ``%`` and the format character to remove any leading zeros. For example,"
971 " ``%d/%m/%Y`` will output ``01/01/2014`` whereas ``%-d/%-m/%Y`` will "
972 "result in ``1/1/2014``."
973 msgstr ""
974 "除了 `Python datetime文档`_ 中列出的标准C89 strftime格式代码之外,可以通过在 ``%`` 和格式字符之间添加 "
975 "``-`` 来删除日期中的前导零。例如 ``%d/%m/%Y`` 对应输出 ``01/01/2014`` ,而 ``%-d/%-m/%Y`` "
976 "对应输出 ``1/1/2014`` 。"
977
978 #: ../../settings.rst:737 28f1a04cc72943b8bbb45b0f05039e6b
979 msgid ""
980 "It is also possible to set different locale settings for each language by"
981 " using a ``(locale, format)`` tuple as a dictionary value which will "
982 "override the ``LOCALE`` setting:"
983 msgstr "你还能够通过将元组 ``(locale, format)`` 作为值,来为每种语言指定地区,此处设置的地区会覆盖 ``LOCALE`` 设置:"
984
985 #: ../../settings.rst:757 0edf14c3edcf41aba562d74822a9f1f5
986 msgid ""
987 "Change the locale [#]_. A list of locales can be provided here or a "
988 "single string representing one locale. When providing a list, all the "
989 "locales will be tried until one works."
990 msgstr "设置地区 [#]_ 。可以同时指定多个地区,也可以使用字符串指定单个地区。当设置了多个地区时,会一个个尝试直到某一个可以使用。"
991
992 #: ../../settings.rst:761 26b26ebd973b40fd973a9252fe24173c
993 msgid "You can set locale to further control date format:"
994 msgstr "通过设置地区进一步控制日期格式:"
995
996 #: ../../settings.rst:769 e0056e0a853f4891b87e3b2f66af9ab9
997 msgid ""
998 "For a list of available locales refer to `locales on Windows`_ or on "
999 "Unix/Linux, use the ``locale -a`` command; see manpage `locale(1)`_ for "
1000 "more information."
1001 msgstr ""
1002 "要查看可用的地区列表,可以参看 `Windows上的地区`_ ;若使用的时Unix/Linux系统, 使用 ``locale -a`` "
1003 "命令即可,有关该命令的更多信息可以参阅手册 `locale(1)`_ 。"
1004
1005 #: ../../settings.rst:774 ac7d9e8b711e438e9a80a31274d1fa11
1006 msgid "Default is the system locale."
1007 msgstr "默认值与系统的地区设置保持一致。"
1008
1009 #: ../../settings.rst:788 39a1ce7f77994c1ca37792f44b4297ee
1010 msgid "Template pages"
1011 msgstr "模板页面"
1012
1013 #: ../../settings.rst:792 fb2c9cf72b3946828619ecb6051abd0b
1014 msgid ""
1015 "A mapping containing template pages that will be rendered with the blog "
1016 "entries."
1017 msgstr "一些映射关系,指出了会和博客一起渲染的模板页面。"
1018
1019 #: ../../settings.rst:795 f8163db87b30489fa6067f58d395cee1
1020 msgid ""
1021 "If you want to generate custom pages besides your blog entries, you can "
1022 "point any Jinja2 template file with a path pointing to the file and the "
1023 "destination path for the generated file."
1024 msgstr "如果你想要生成除了博客之外的自定义页面,你可以指出任何Jinja2的模板文件,需要同时指出源文件路径和生成文件的路径。"
1025
1026 #: ../../settings.rst:799 ef26f9eaad274b969a0ae1183e7ac0c8
1027 msgid ""
1028 "For instance, if you have a blog with three static pages — a list of "
1029 "books, your resume, and a contact page — you could have::"
1030 msgstr "例如,如果你的博客有三个静态页面——书籍列表、你的简历、以及一个联系我们页面,你可这么配置:"
1031
1032 #: ../../settings.rst:808 2c8a293e4d77423db215de89aa20ca5c
1033 msgid "The extensions to use when looking up template files from template names."
1034 msgstr "指定要查找并视为模板文件的文件扩展名。"
1035
1036 #: ../../settings.rst:812 101a0198fc6249b3adea735ff522b9b1
1037 msgid ""
1038 "List of templates that are used directly to render content. Typically "
1039 "direct templates are used to generate index pages for collections of "
1040 "content (e.g., category and tag index pages). If the author, category and"
1041 " tag collections are not needed, set ``DIRECT_TEMPLATES = ['index', "
1042 "'archives']``"
1043 msgstr ""
1044 "指定用于直接渲染内容的模板列表。一般来说直接模板会用于生成内容集合的主页(例如分类和标签的主页)。如果不需要作者、分类或者标签集合,可以设置 "
1045 "``DIRECT_TEMPLATES = ['index', archives']`` 。"
1046
1047 #: ../../settings.rst:817 c5952388671a4fab8095d4a9b596905f
1048 msgid ""
1049 "``DIRECT_TEMPLATES`` are searched for over paths maintained in "
1050 "``THEME_TEMPLATES_OVERRIDES``."
1051 msgstr "``DIRECT_TEMPLATES`` 会在 ``THEME_TEMPLATES_OVERRIDES`` 的路径中搜索。"
1052
1053 #: ../../settings.rst:822 8c4e0bfebc60422cbcb852f17e53fbeb
1054 msgid "Metadata"
1055 msgstr "元数据"
1056
1057 #: ../../settings.rst:826 5d3ac5fa0fe94d0faf3603d032152259
1058 msgid "Default author (usually your name)."
1059 msgstr "默认作者(通常是你自己的名字)。"
1060
1061 #: ../../settings.rst:830 bd855c810143419b97250e11fe9db428
1062 msgid "The default metadata you want to use for all articles and pages."
1063 msgstr "应用于所有文章和页面的默认元数据。"
1064
1065 #: ../../settings.rst:834 b9b192605075405ba1b89c817db323e5
1066 msgid ""
1067 "The regexp that will be used to extract any metadata from the filename. "
1068 "All named groups that are matched will be set in the metadata object. "
1069 "The default value will only extract the date from the filename."
1070 msgstr "指定用于从文件名中提取元数据的正则表达式。所有匹配上的命名匹配组都会用于设置元数据。默认值会从文件名中提取日期。"
1071
1072 #: ../../settings.rst:838 f5730036a8ad4bdbbc7250201e97d4b3
1073 msgid "For example, to extract both the date and the slug::"
1074 msgstr "例如,可以同时提取日期和slug:"
1075
1076 #: ../../settings.rst:842 bfcc4210a493460a954dfb5d96f57462
1077 msgid "See also ``SLUGIFY_SOURCE``."
1078 msgstr "另请参看 ``SLUGIFY_SOURCE`` 。"
1079
1080 #: ../../settings.rst:846 1bc373d7947b4c9181fd54d01409eb06
1081 msgid ""
1082 "Like ``FILENAME_METADATA``, but parsed from a page's full path relative "
1083 "to the content source directory."
1084 msgstr "和 ``FILENAME_METADATA`` 类似,但提取解析的对象是相对于内容源文件目录的路径。"
1085
1086 #: ../../settings.rst:851 b02a8c4b99204d92b9d6625f79c27c89
1087 msgid ""
1088 "Extra metadata dictionaries keyed by relative path. Relative paths "
1089 "require correct OS-specific directory separators (i.e. / in UNIX and \\\\"
1090 " in Windows) unlike some other Pelican file settings. Paths to a "
1091 "directory apply to all files under it. The most-specific path wins "
1092 "conflicts."
1093 msgstr "指定要从相对路径提取的额外元数据字典。与Pelican的其他设置文件不同,此项设置需要正确使用和操作系统对应的目录分隔符(Unix中使用/,Windows中使用\\\\)。若对一个目录设置了规则,该规则会作用于该目录下所有文件。当有多个路径相互冲突时,Pelican会选用更为具体的路径。"
1094
1095 #: ../../settings.rst:856 d8ceeec6c7e14be3a79c73db2472a7cb
1096 msgid ""
1097 "Not all metadata needs to be :ref:`embedded in source file itself "
1098 "<internal_metadata>`. For example, blog posts are often named following a"
1099 " ``YYYY-MM-DD-SLUG.rst`` pattern, or nested into ``YYYY/MM/DD-SLUG`` "
1100 "directories. To extract metadata from the filename or path, set "
1101 "``FILENAME_METADATA`` or ``PATH_METADATA`` to regular expressions that "
1102 "use Python's `group name notation`_ ``(?P<name>…)``. If you want to "
1103 "attach additional metadata but don't want to encode it in the path, you "
1104 "can set ``EXTRA_PATH_METADATA``:"
1105 msgstr ""
1106 "不是所有元数据都需要直接 :ref:`放在推文源文件中 <internal_metadata>` 。例如,博文可能是以 ``YYYY-MM-DD-"
1107 "SLUG.rst`` 的形式命名的,或者是直接放在 ``YYYY/MM/DD-SLUG`` 文件夹中。要从文件名或路径中提取元数据,设置 "
1108 "``FILENAME_METADATA`` 或 ``PATH_METADATA`` 即可,需使用Python风格的 `命名组表示法`_ "
1109 "``(?P<name>…)`` 。当你需要为帖子附加一些额外的元数据,但不想将其编码在文件路径中时,就可以在 "
1110 "``EXTRA_PATH_METADATA`` 中设置:"
1111
1112 #: ../../settings.rst:877 3c7085d581f74cba8b5b7be5451d0dd0
1113 msgid ""
1114 "This can be a convenient way to shift the installed location of a "
1115 "particular file:"
1116 msgstr "通过这个设置项,很方便就可以转移特定文件的位置:"
1117
1118 #: ../../settings.rst:897 62d0261aa15a42a486691e7d615f58c7
1119 msgid "Feed settings"
1120 msgstr "订阅源设置"
1121
1122 #: ../../settings.rst:899 e06e3b6cd4e34d9990e28f533c70916b
1123 msgid ""
1124 "By default, Pelican uses Atom feeds. However, it is also possible to use "
1125 "RSS feeds if you prefer."
1126 msgstr "默认情况下,Pelican会使用Atom订阅源。但如果你愿意的话,也可以使用RSS。"
1127
1128 #: ../../settings.rst:902 8a0de4febfd34d9eb1cdcc74d4c02198
1129 msgid ""
1130 "Pelican generates category feeds as well as feeds for all your articles. "
1131 "It does not generate feeds for tags by default, but it is possible to do "
1132 "so using the ``TAG_FEED_ATOM`` and ``TAG_FEED_RSS`` settings:"
1133 msgstr ""
1134 "Pelican会生成分类的feed,也会为所有文章生成,但默认并不会为标签生成feed,要生成标签feed,可以使用 "
1135 "``TAG_FEED_ATOM`` 和 ``TAG_FEED_RSS`` 设置:"
1136
1137 #: ../../settings.rst:908 e1d650d03db342a09b22e34ff11b9365
1138 msgid ""
1139 "The domain prepended to feed URLs. Since feed URLs should always be "
1140 "absolute, it is highly recommended to define this (e.g., "
1141 "\"https://feeds.example.com\"). If you have already explicitly defined "
1142 "SITEURL (see above) and want to use the same domain for your feeds, you "
1143 "can just set: ``FEED_DOMAIN = SITEURL``."
1144 msgstr ""
1145 "指定要附加到订阅源URL前面的域名。因为订阅源URL最好是绝对的,所以强烈推荐定义此设置项(例如 "
1146 "https://feeds.example.com )。若SITEURL已经显式地定义了,并且希望使用相同地URL,就可以直接设置 "
1147 "``FEED_DOMAIN = SITEURL`` 。"
1148
1149 #: ../../settings.rst:916 f3bc5a60dab54c2ab52f99f81b743102
1150 msgid "The location to save the Atom feed."
1151 msgstr "指定保存Atom订阅源的位置。"
1152
1153 #: ../../settings.rst:920 4145c00c2347484fa37f4387283e0fb6
1154 msgid ""
1155 "Relative URL of the Atom feed. If not set, ``FEED_ATOM`` is used both for"
1156 " save location and URL."
1157 msgstr "Atom订阅源的相对URL。如果未设置此项,会将 ``FEED_ATOM`` 同时用于存储位置和URL。"
1158
1159 #: ../../settings.rst:925 579cd1112ba44be7b82c77050af3a256
1160 msgid "The location to save the RSS feed."
1161 msgstr "指定保存RSS订阅源的位置。"
1162
1163 #: ../../settings.rst:929 5fdb4ce14c0a454381db194885b088f2
1164 msgid ""
1165 "Relative URL of the RSS feed. If not set, ``FEED_RSS`` is used both for "
1166 "save location and URL."
1167 msgstr "RSS订阅源的相对URL。如果未设置此项,会将 ``FEED_RSS`` 同时用于存储位置和URL。"
1168
1169 #: ../../settings.rst:934 91bd81a74c234968a27e4b61924273f5
1170 msgid ""
1171 "The location to save the all-posts Atom feed: this feed will contain all "
1172 "posts regardless of their language."
1173 msgstr "存储all-posts Atom订阅源的文件位置:其中会包含所有语言的帖子。"
1174
1175 #: ../../settings.rst:939 62aceff0073b48eeb8929f102bfad7e4
1176 msgid ""
1177 "Relative URL of the all-posts Atom feed. If not set, ``FEED_ALL_ATOM`` is"
1178 " used both for save location and URL."
1179 msgstr "all-posts Atom订阅源的相对URL。如果未设置此项,会将 ``FEED_ALL_ATOM`` 同时用于存储位置和URL。"
1180
1181 #: ../../settings.rst:944 3b9f640128e84a4a96e696a830e3a8cd
1182 msgid ""
1183 "The location to save the the all-posts RSS feed: this feed will contain "
1184 "all posts regardless of their language."
1185 msgstr "存储all-posts RSS订阅源的文件位置:其中会包含所有语言的帖子。"
1186
1187 #: ../../settings.rst:949 2b80018af24945ac949377bb01f4d699
1188 msgid ""
1189 "Relative URL of the all-posts RSS feed. If not set, ``FEED_ALL_RSS`` is "
1190 "used both for save location and URL."
1191 msgstr "all-posts RSS订阅源的相对URL。如果未设置此项,会将 ``FEED_ALL_RSS`` 同时用于存储位置和URL。"
1192
1193 #: ../../settings.rst:954 c00dc056edc64aafb33bafad947364db
1194 msgid "The location to save the category Atom feeds. [2]_"
1195 msgstr "category Atom订阅源的存储位置。 [2]_"
1196
1197 #: ../../settings.rst:958 fb8c09a3eb844121b05c5a067d616a42
1198 msgid ""
1199 "Relative URL of the category Atom feeds, including the ``{slug}`` "
1200 "placeholder. [2]_ If not set, ``CATEGORY_FEED_ATOM`` is used both for "
1201 "save location and URL."
1202 msgstr ""
1203 "category Atom订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 "
1204 "``CATEGORY_FEED_ATOM`` 同时用于存储位置和URL。"
1205
1206 #: ../../settings.rst:964 bd0dba597ed44c0ab95df015d13fb42f
1207 msgid ""
1208 "The location to save the category RSS feeds, including the ``{slug}`` "
1209 "placeholder. [2]_"
1210 msgstr "category RSS订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_"
1211
1212 #: ../../settings.rst:969 5e06453a1300407188c78eceadcabef1
1213 msgid ""
1214 "Relative URL of the category RSS feeds, including the ``{slug}`` "
1215 "placeholder. [2]_ If not set, ``CATEGORY_FEED_RSS`` is used both for save"
1216 " location and URL."
1217 msgstr ""
1218 "category RSS订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 "
1219 "``CATEGORY_FEED_RSS`` 同时用于存储位置和URL。"
1220
1221 #: ../../settings.rst:975 1ad2208106b5492cbc0bb0fc6b6d2eef
1222 msgid "The location to save the author Atom feeds. [2]_"
1223 msgstr "category Atom订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_"
1224
1225 #: ../../settings.rst:979 069eb238b2d6458eac8fc200c12aa6fd
1226 msgid ""
1227 "Relative URL of the author Atom feeds, including the ``{slug}`` "
1228 "placeholder. [2]_ If not set, ``AUTHOR_FEED_ATOM`` is used both for save "
1229 "location and URL."
1230 msgstr ""
1231 "author Atom订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 "
1232 "``AUTHOR_FEED_ATOM`` 同时用于存储位置和URL。"
1233
1234 #: ../../settings.rst:985 0b5a562410eb47c5a47a31a852973974
1235 msgid "The location to save the author RSS feeds. [2]_"
1236 msgstr "author RSS订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_"
1237
1238 #: ../../settings.rst:989 c1964676a205466fb2a835e99bc00885
1239 msgid ""
1240 "Relative URL of the author RSS feeds, including the ``{slug}`` "
1241 "placeholder. [2]_ If not set, ``AUTHOR_FEED_RSS`` is used both for save "
1242 "location and URL."
1243 msgstr ""
1244 "author RSS订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_ 如果未设置, 会将 ``AUTHOR_FEED_RSS`` "
1245 "同时用于存储位置和URL。"
1246
1247 #: ../../settings.rst:994 2242bd16e270495eba740e72964d840d
1248 msgid ""
1249 "The location to save the tag Atom feed, including the ``{slug}`` "
1250 "placeholder. [2]_"
1251 msgstr "tag Atom订阅源的存储位置,其中包含 ``{slug}`` 。 [2]_"
1252
1253 #: ../../settings.rst:999 2f69bb73cef343b48f09ead8fd268d26
1254 msgid ""
1255 "Relative URL of the tag Atom feed, including the ``{slug}`` placeholder. "
1256 "[2]_"
1257 msgstr "tag Atom订阅源的相对URL,其中包含 ``{slug}`` 。 [2]_"
1258
1259 #: ../../settings.rst:1004 059a551f316c4d7e99b43a4d6e999c43
1260 msgid ""
1261 "Relative URL to output the tag RSS feed, including the ``{slug}`` "
1262 "placeholder. If not set, ``TAG_FEED_RSS`` is used both for save location "
1263 "and URL."
1264 msgstr "tag RSS订阅源的相对URL,其中包含 ``{slug}`` 。如果未设置,会将 ``TAG_FEED_RSS`` 同时用于存储位置和URL。"
1265
1266 #: ../../settings.rst:1010 ba1909bb43f7468ab36384a33e9f0d35
1267 msgid ""
1268 "Maximum number of items allowed in a feed. Setting to ``None`` will cause"
1269 " the feed to contains every article. 100 if not specified."
1270 msgstr "单个订阅源中允许包含的最多元素数量。若设为 ``None`` 表示不做上限;若不指定,默认上限为100。"
1271
1272 #: ../../settings.rst:1015 ee56a7f7761e4badb24ddd0771b9bcaa
1273 msgid ""
1274 "Only include item summaries in the ``description`` tag of RSS feeds. If "
1275 "set to ``False``, the full content will be included instead. This setting"
1276 " doesn't affect Atom feeds, only RSS ones."
1277 msgstr ""
1278 "仅在RSS订阅源的 ``description`` 标签中包含项目摘要。若设为 ``False`` ,则将包含完整内容。此项设置不会影响Atom "
1279 "feed,只针对RSS feed。"
1280
1281 #: ../../settings.rst:1021 d34b3c9cf9c643559e8f1bd58b4d4d9e
1282 msgid ""
1283 "If set to ``True``, ``?ref=feed`` will be appended to links in generated "
1284 "feeds for the purpose of referrer tracking."
1285 msgstr "若设为 ``True`` ,会将 ``?ref=feed`` 附到生成的链接中,以便追踪引用。"
1286
1287 #: ../../settings.rst:1024 67aa494bb5c846eeac10b91d633fbeb1
1288 msgid ""
1289 "If you don't want to generate some or any of these feeds, set the above "
1290 "variables to ``None``."
1291 msgstr "若你不想要生成某些订阅源,将对应变量设为 ``None`` 即可。"
1292
1293 #: ../../settings.rst:1027 e281a7a6d60d4362a56364ea4e7c2ed4
1294 msgid "``{slug}`` is replaced by name of the category / author / tag."
1295 msgstr "``{slug}`` 会分别用分类名/作者名/标签名来替换。"
1296
1297 #: ../../settings.rst:1031 f1101bee785f48fb8745c1cbed7ccb5c
1298 msgid "Pagination"
1299 msgstr "分页"
1300
1301 #: ../../settings.rst:1033 9d8deaf84be143aa919bae8458e256a5
1302 msgid ""
1303 "The default behaviour of Pelican is to list all the article titles along "
1304 "with a short description on the index page. While this works well for "
1305 "small-to-medium sites, sites with a large quantity of articles will "
1306 "probably benefit from paginating this list."
1307 msgstr "默认情况下,Pelican会把所有文章以简短描述的形式展示在首页上。虽然这对中小型网站效果不错,但对于拥有大量文章的网站来说可能需要将此列表进行分页。"
1308
1309 #: ../../settings.rst:1038 8315da9ec0d64ffb881d0dfa6f25590e
1310 msgid "You can use the following settings to configure the pagination."
1311 msgstr "你可以使用下面的设置来配置分页。"
1312
1313 #: ../../settings.rst:1042 9a56cc2f10634c34980a6868c4988e43
1314 msgid ""
1315 "The minimum number of articles allowed on the last page. Use this when "
1316 "you don't want the last page to only contain a handful of articles."
1317 msgstr "最后一页允许的最小文章数。当不希望最后一页仅包含少数文章时,请使用此选项。(译者注:当最后一页达不到此最小文章数时,会被合并到前一页)"
1318
1319 #: ../../settings.rst:1047 f3d093d68890442abfda1dea23eb25ed
1320 msgid ""
1321 "The maximum number of articles to include on a page, not including "
1322 "orphans. False to disable pagination."
1323 msgstr "一个页面上包含的最大文章数,不包括孤立文章(译者注:当发生上一条设置选项中提到的合并时,最后一页显然会超过此最大文章数)。设为False会禁用分页。"
1324
1325 #: ../../settings.rst:1052 df3fe4f1806f4a16b2a9fdd11cc50aa2
1326 msgid ""
1327 "The templates to use pagination with, and the number of articles to "
1328 "include on a page. If this value is ``None``, it defaults to "
1329 "``DEFAULT_PAGINATION``."
1330 msgstr "指定哪些模板需要启用分页,以及对应的单页面文章数量。若设为 ``None`` ,则默认值为 ``DEFAULT_PAGINATION`` 。"
1331
1332 #: ../../settings.rst:1060 0ee1f92f0be740c3afb7b793327495df
1333 msgid "A set of patterns that are used to determine advanced pagination output."
1334 msgstr "一组模式,用于高级分页输出。"
1335
1336 #: ../../settings.rst:1064 1a3aef30d05c45b5b4dd54ab7c4c043c
1337 msgid "Using Pagination Patterns"
1338 msgstr "使用分页模式"
1339
1340 #: ../../settings.rst:1066 9bbd095189634b8f8a43cf4f196ec8d5
1341 msgid ""
1342 "By default, pages subsequent to ``.../foo.html`` are created as "
1343 "``.../foo2.html``, etc. The ``PAGINATION_PATTERNS`` setting can be used "
1344 "to change this. It takes a sequence of triples, where each triple "
1345 "consists of::"
1346 msgstr ""
1347 "默认情况下,连续页面的URL会如此编码:第一页为 ``.../foo.html`` ,后一页为 ``.../foo2.html`` "
1348 "。``PAGINATION_PATTERNS`` 就是用于修改这个编页规则的,其中是一些三元组:"
1349
1350 #: ../../settings.rst:1072 9303664b0829486097906d555b50c30d
1351 msgid ""
1352 "For ``page_url`` and ``page_save_as``, you may use a number of variables."
1353 " ``{url}`` and ``{save_as}`` correspond respectively to the ``*_URL`` and"
1354 " ``*_SAVE_AS`` values of the corresponding page type (e.g. "
1355 "``ARTICLE_SAVE_AS``). If ``{save_as} == foo/bar.html``, then ``{name} == "
1356 "foo/bar`` and ``{extension} == .html``. ``{base_name}`` equals ``{name}``"
1357 " except that it strips trailing ``/index`` if present. ``{number}`` "
1358 "equals the page number."
1359 msgstr ""
1360 "在 ``page_url`` 和 ``page_save_as`` 中,你可以使用很多变量。对于不同的页面类型, ``{url}`` 和 "
1361 "``{save_as}`` 对应于其 ``*_URL`` 和 ``*_SAVE_AS`` 配置项的计算值(例如 "
1362 "``ARTICLE_SAVE_AS`` )。假设 ``{save_as} == foo/bar.html`` ,那么此时 ``{name} == "
1363 "foo/bar`` 、``{extension} == .html`` 。另外, ``{base_name}`` 和 ``{name}`` "
1364 "相同,只不过会截去末尾的 ``/index`` (如果有的话)。 ``{number}`` 则等于页码。(译者注: "
1365 "``minimum_page`` 意味到达该页面数后开始使用此条规则)"
1366
1367 #: ../../settings.rst:1079 b3b8c76240bd4097b2ccd51e129fd949
1368 msgid ""
1369 "For example, if you want to leave the first page unchanged, but place "
1370 "subsequent pages at ``.../page/2/`` etc, you could set "
1371 "``PAGINATION_PATTERNS`` as follows::"
1372 msgstr ""
1373 "举个例子,如果你想要保持第一面保持不变,但后续页面都以 ``.../page/2/`` 的形式出现,你可以如此设置 "
1374 "``PAGINATION_PATTERNS`` :"
1375
1376 #: ../../settings.rst:1089 d229ff3fdd86402c9c511d154856da26
1377 msgid ""
1378 "If you want a pattern to apply to the last page in the list, use ``-1`` "
1379 "as the ``minimum_page`` value::"
1380 msgstr "如果你想指定最后一面制定规则,将 ``minimum_page`` 的值设为 ``-1`` 即可:"
1381
1382 #: ../../settings.rst:1095 8a2f277505ea4ec1bf03baf8e8558fe0
1383 msgid "Translations"
1384 msgstr "翻译"
1385
1386 #: ../../settings.rst:1097 fd82b5daff4b4c019f3af94589fdf236
1387 msgid ""
1388 "Pelican offers a way to translate articles. See the :doc:`Content "
1389 "<content>` section for more information."
1390 msgstr "Pelican为文章翻译提供了展示方法。详见 :doc:`创作内容 <content>` 。"
1391
1392 #: ../../settings.rst:1102 0ed0fba765d44cb29c7a4561f1a7da11
1393 msgid "The default language to use."
1394 msgstr "指定默认语言。"
1395
1396 #: ../../settings.rst:1106 b142b956828d4fa6bf5a6f41154a0bc8
1397 msgid ""
1398 "The metadata attribute(s) used to identify which articles are "
1399 "translations of one another. May be a string or a collection of strings. "
1400 "Set to ``None`` or ``False`` to disable the identification of "
1401 "translations."
1402 msgstr "指定用于标识不同翻译是同一篇文章的元数据。可以是一个或多个字符串。要禁用对文章翻译的识别,将此项设为 ``None`` 或 ``False`` 。"
1403
1404 #: ../../settings.rst:1112 b7a889c0eda0476cb8926803274db471
1405 msgid ""
1406 "The metadata attribute(s) used to identify which pages are translations "
1407 "of one another. May be a string or a collection of strings. Set to "
1408 "``None`` or ``False`` to disable the identification of translations."
1409 msgstr "指定用于标识不同翻译是同一个页面的元数据。可以是一个或多个字符串。要禁用对页面翻译的识别,将此项设为 ``None`` 或 ``False`` 。"
1410
1411 #: ../../settings.rst:1118 761a948ad532489ab91be66f6ff4afc3
1412 msgid "The location to save the Atom feed for translations. [3]_"
1413 msgstr "指定各翻译Atom订阅源的存储位置。 [3]_"
1414
1415 #: ../../settings.rst:1122 3c51071a92a446179fa38606692a56d6
1416 msgid ""
1417 "Relative URL of the Atom feed for translations, including the ``{lang}`` "
1418 "placeholder. [3]_ If not set, ``TRANSLATION_FEED_ATOM`` is used both for "
1419 "save location and URL."
1420 msgstr ""
1421 "指定各翻译Atom feed的含有 ``{lang}`` 的相对URL。 [3]_ "
1422 "若未设置此项,``TRANSLATION_FEED_ATOM`` 会同时用于存储位置和URL。"
1423
1424 #: ../../settings.rst:1128 12ef75b1e91b49a2884fc8508893a066
1425 msgid "Where to put the RSS feed for translations."
1426 msgstr "指定各翻译RSS订阅源的存储位置。"
1427
1428 #: ../../settings.rst:1132 6b6d0ca12bbb4f26a2f91dea3ca2c6c7
1429 msgid ""
1430 "Relative URL of the RSS feed for translations, including the ``{lang}`` "
1431 "placeholder. [3]_ If not set, ``TRANSLATION_FEED_RSS`` is used both for "
1432 "save location and URL."
1433 msgstr ""
1434 "文章或页面不同翻译在RSS订阅源中的相对路径,其中含有 ``{lang}``。 [3]_ "
1435 "若未设置此项,``TRANSLATION_FEED_RSS`` 会同时用于存储位置和URL。"
1436
1437 #: ../../settings.rst:1136 a653ebc90d404e1d88f473baa6d34bfa
1438 msgid "{lang} is the language code"
1439 msgstr "{lang} 为语言代码"
1440
1441 #: ../../settings.rst:1140 417bf3d48cbb489daf8fab166ee7bda3
1442 msgid "Ordering content"
1443 msgstr "内容的排列顺序"
1444
1445 #: ../../settings.rst:1144 0cf90a8d6a3f48879e6f835e7944ccf2
1446 msgid ""
1447 "Order archives by newest first by date. (False: orders by date with older"
1448 " articles first.)"
1449 msgstr "若设为True,日期较新的会排在前面;若设为False,则日期较旧的会排在前面。"
1450
1451 #: ../../settings.rst:1149 69921fd37f9947948c4951ea539be84a
1452 msgid ""
1453 "Reverse the category order. (True: lists by reverse alphabetical order; "
1454 "default lists alphabetically.)"
1455 msgstr "若设为True,分类会按字典序逆序排列;若设为False,则按字典序顺序排列。"
1456
1457 #: ../../settings.rst:1154 858fdbaaccf94d1392cf6c102da139a9
1458 msgid ""
1459 "Defines how the articles (``articles_page.object_list`` in the template) "
1460 "are sorted. Valid options are: metadata as a string (use ``reversed-`` "
1461 "prefix to reverse the sort order), special option ``'basename'`` which "
1462 "will use the basename of the file (without path), or a custom function to"
1463 " extract the sorting key from articles. Using a value of ``'date'`` will "
1464 "sort articles in chronological order, while the default value, "
1465 "``'reversed-date'``, will sort articles by date in reverse order (i.e., "
1466 "newest article comes first)."
1467 msgstr ""
1468 "定义文章(模板中的 ``articles_page.object_list`` "
1469 ")的排序方式。有效选项包括:字符串形式的元数据(使用前缀reverse-来指定逆序)、特殊选项 ``'basename'`` "
1470 "(不带路径的文件名)、或是一个可以从文章中提取排序键的自定义函数。例如,将选项值设为 ``'date'`` ,文章就会以时间顺序排列文章。默认值为"
1471 " ``'reversed-date'`` ,即以日期逆序排列,即新文章在前、旧文章在后。"
1472
1473 #: ../../settings.rst:1164 302ab57b0ae2473ebefff23151f4675f
1474 msgid ""
1475 "Defines how the pages (``pages`` variable in the template) are sorted. "
1476 "Options are same as ``ARTICLE_ORDER_BY``. The default value, "
1477 "``'basename'`` will sort pages by their basename."
1478 msgstr ""
1479 "定义页面(模板中的 ``pages`` 变量)的排序顺序。有效选项和 ``ARTICLE_ORDER_BY`` 中的相同。默认值为 "
1480 "``basename``。"
1481
1482 #: ../../settings.rst:1172 8503a9717f4c4d37a15b95fe4881528f
1483 msgid "Themes"
1484 msgstr "主题"
1485
1486 #: ../../settings.rst:1174 ee7c320a20664fd294235130ca68827e
1487 msgid ""
1488 "Creating Pelican themes is addressed in a dedicated section (see :ref"
1489 ":`theming-pelican`). However, here are the settings that are related to "
1490 "themes."
1491 msgstr "创建Pelican主题在单独的一节中讲解(参见 :ref:`theming-pelican` )。此处讲解和主题有关的配置项。"
1492
1493 #: ../../settings.rst:1180 a7abb7abd4fd4914a9b2de4e18f2166a
1494 msgid ""
1495 "Theme to use to produce the output. Can be a relative or absolute path to"
1496 " a theme folder, or the name of a default theme or a theme installed via "
1497 ":doc:`pelican-themes` (see below)."
1498 msgstr ""
1499 "用于产生输出的主题。可以是到达要使用主题的文件夹的相对或绝对路径,或是主题的名称(默认主题或通过 :doc:`pelican-themes` "
1500 "安装的主题)。"
1501
1502 #: ../../settings.rst:1186 c80860199b464fe9be8c59b8162cd446
1503 msgid ""
1504 "Destination directory in the output path where Pelican will place the "
1505 "files collected from `THEME_STATIC_PATHS`. Default is `theme`."
1506 msgstr ""
1507 "Pelican从 `THEME_STATIC_PATHS` 中发现主题要使用的静态文件,此设置项指定这些静态文件在输出路径中的目录。默认值为 "
1508 "`theme` 。"
1509
1510 #: ../../settings.rst:1191 7dbeb5f932f345c9b7c3546b7cfb788f
1511 msgid ""
1512 "Static theme paths you want to copy. Default value is `static`, but if "
1513 "your theme has other static paths, you can put them here. If files or "
1514 "directories with the same names are included in the paths defined in this"
1515 " settings, they will be progressively overwritten."
1516 msgstr ""
1517 "要复制的静态主题路径。默认值为 `static` "
1518 ",但如果你的主题有其他静态路径,也可以将其放在此处。此项设置中若包含了相同名称的文件或目录,前面的会被后面的覆盖。"
1519
1520 #: ../../settings.rst:1198 fe7833a44b7547a889fb97b77b219186
1521 msgid ""
1522 "A list of paths you want Jinja2 to search for templates before searching "
1523 "the theme's ``templates/`` directory. Allows for overriding individual "
1524 "theme template files without having to fork an existing theme. Jinja2 "
1525 "searches in the following order: files in ``THEME_TEMPLATES_OVERRIDES`` "
1526 "first, then the theme's ``templates/``."
1527 msgstr ""
1528 "在搜索主题的 ``templates/`` "
1529 "目录前,Jinja2会先搜索此设置项中的路径。可以使用此设置项覆盖主题中的某些模板文件,以尽量避免修改现有主题。"
1530
1531 #: ../../settings.rst:1204 fb8d33e45bd7411eb4c709bc8735725f
1532 #, python-format
1533 msgid ""
1534 "You can also extend templates from the theme using the ``{% extends %}`` "
1535 "directive utilizing the ``!theme`` prefix as shown in the following "
1536 "example:"
1537 msgstr "利用 ``{% extends %}`` 指令中的 ``!theme`` 前缀也可以用于从主题扩展模板,如下例所示:"
1538
1539 #: ../../settings.rst:1213 bad5f78cf14f48cfa4e3031fc66e945a
1540 msgid "Specify the CSS file you want to load."
1541 msgstr "指定需要加载的CSS文件。"
1542
1543 #: ../../settings.rst:1215 744422adebf048efb9576eb3d6f01b4f
1544 msgid ""
1545 "By default, two themes are available. You can specify them using the "
1546 "``THEME`` setting or by passing the ``-t`` option to the ``pelican`` "
1547 "command:"
1548 msgstr "默认情况下,有两个主题可供选择。可以使用 ``THEME`` 选项指定,或是在 ``pelican`` 命令中使用 ``-t`` 选项的参数传入。"
1549
1550 #: ../../settings.rst:1218 bad7ba14225c4a47922ce9440f0bfb11
1551 msgid "notmyidea"
1552 msgstr "notmyidea(默认值)"
1553
1554 #: ../../settings.rst:1219 16954ec8b6224cd7902c5af01586f5cb
1555 msgid "simple (a synonym for \"plain text\" :)"
1556 msgstr "simple(即“plain text”)"
1557
1558 #: ../../settings.rst:1221 7d839f8fe8ea454abb64906c4cf38932
1559 msgid ""
1560 "There are a number of other themes available at "
1561 "https://github.com/getpelican/pelican-themes. Pelican comes with :doc"
1562 ":`pelican-themes`, a small script for managing themes."
1563 msgstr ""
1564 "还有很多主题可以在 https://github.com/getpelican/pelican-themes 上下载。Pelican使用一个称为 "
1565 ":doc:`pelican-themes` 的小脚本来管理主题。"
1566
1567 #: ../../settings.rst:1225 d512f8161e89412693a9acb00948e348
1568 msgid ""
1569 "You can define your own theme, either by starting from scratch or by "
1570 "duplicating and modifying a pre-existing theme. Here is :doc:`a guide on "
1571 "how to create your theme <themes>`."
1572 msgstr "你还可以创建自己的主题,可以从头开始,也可以在已有主题的基础上修改。请参看 :doc:`主题 <themes>` 文档。"
1573
1574 #: ../../settings.rst:1229 696c62600fb4479bbbbc6a010024d2aa
1575 msgid "Following are example ways to specify your preferred theme::"
1576 msgstr "下面是几个指定某个主题的例子:"
1577
1578 #: ../../settings.rst:1240 e70559ce885e4db0aa17a71a9a2ed757
1579 msgid ""
1580 "The built-in ``simple`` theme can be customized using the following "
1581 "settings."
1582 msgstr "内置的 ``simple`` 主题可以使用以下设置项进行自定义。"
1583
1584 #: ../../settings.rst:1244 67a316d5c57045448387c17445e71a53
1585 msgid "The URL of the stylesheet to use."
1586 msgstr "要使用的样式表的URL。"
1587
1588 #: ../../settings.rst:1246 61fc5d9b1f0c4b6586fd458660e384ff
1589 msgid ""
1590 "The built-in ``notmyidea`` theme can make good use of the following "
1591 "settings. Feel free to use them in your themes as well."
1592 msgstr "下面的一下选项可以很好地作用于内置的 ``notmyidea`` 主题。当然在其他主题中你也可以尽情尝试这些选项。"
1593
1594 #: ../../settings.rst:1251 fdd6425dea494c098212b971ed30bb71
1595 msgid "A subtitle to appear in the header."
1596 msgstr "页面顶部要显示的副标题。"
1597
1598 #: ../../settings.rst:1255 706528c7601a4352a40399b6a7b8b8dd
1599 msgid ""
1600 "Pelican can handle Disqus comments. Specify the Disqus sitename "
1601 "identifier here."
1602 msgstr "可以在Pelican中使用Disqus的评论系统,此设置项用于设置Disqus的站点标识符。"
1603
1604 #: ../../settings.rst:1260 c0ff07ee87814a60b798b0b22b562af0
1605 msgid ""
1606 "Your GitHub URL (if you have one). It will then use this information to "
1607 "create a GitHub ribbon."
1608 msgstr "指定你的GitHub URL(如果有的话),此信息将被用于创建GitHub功能区。"
1609
1610 #: ../../settings.rst:1265 751716f49245400b99fdbb95052f8cb4
1611 msgid ""
1612 "Put any desired analytics scripts in this setting in ``publishconf.py``. "
1613 "Example:"
1614 msgstr "在 ``publishconf.py`` 中设置此项,用于指定想要使用的统计分析脚本。如下例:"
1615
1616 #: ../../settings.rst:1279 e65031f7629d4b06b837b05b80b68141
1617 msgid ""
1618 "A list of tuples (Title, URL) for additional menu items to appear at the "
1619 "beginning of the main menu."
1620 msgstr "元组 (标题, URL) 的列表,用于指定额外的菜单项,会添加在菜单栏的开头。"
1621
1622 #: ../../settings.rst:1284 13839251877b49bb9962c0bc7b75f951
1623 msgid "A list of tuples (Title, URL) for links to appear on the header."
1624 msgstr "元组 (标题, URL) 的列表,用于指定要展示在网页开头的链接。"
1625
1626 #: ../../settings.rst:1288 3a22924a9cb242029138754da6257800
1627 msgid "A list of tuples (Title, URL) to appear in the \"social\" section."
1628 msgstr "元组 (标题, URL) 的列表,用于指定要展示在“social”部分的内容。"
1629
1630 #: ../../settings.rst:1292 4e64ba4558af483ea5234a40b6a7f667
1631 msgid ""
1632 "Allows for adding a button to articles to encourage others to tweet about"
1633 " them. Add your Twitter username if you want this button to appear."
1634 msgstr "允许在文章中添加按钮,以鼓励其他人发布有关它们的推文。如果希望显示此按钮,在此项中设置你的Twitter用户名。"
1635
1636 #: ../../settings.rst:1297 1948a7f1556942869467e12269a83c97
1637 msgid ""
1638 "Allows override of the name of the links widget. If not specified, "
1639 "defaults to \"links\"."
1640 msgstr "指定用于覆盖“links”部分的名称。默认值为“links”。"
1641
1642 #: ../../settings.rst:1302 4fcc458a089d46ec80586edae17cd901
1643 msgid ""
1644 "Allows override of the name of the \"social\" widget. If not specified, "
1645 "defaults to \"social\"."
1646 msgstr "指定用于覆盖“social”部分的名称。默认值为“social”。"
1647
1648 #: ../../settings.rst:1305 481872501e9f4df687b70830929f429f
1649 msgid ""
1650 "In addition, you can use the \"wide\" version of the ``notmyidea`` theme "
1651 "by adding the following to your configuration::"
1652 msgstr "另外,你可以使用 ``notmyidea`` 主题的“宽屏”版本,在配置文件中添加下面这行配置即可:"
1653
1654 #: ../../settings.rst:1312 add39f626ea24dd6885a117bdbef1c2b
1655 msgid "Logging"
1656 msgstr "日志"
1657
1658 #: ../../settings.rst:1314 16c2fccd07c44079989173c2b101439f
1659 msgid ""
1660 "Sometimes, a long list of warnings may appear during site generation. "
1661 "Finding the **meaningful** error message in the middle of tons of "
1662 "annoying log output can be quite tricky. In order to filter out redundant"
1663 " log messages, Pelican comes with the ``LOG_FILTER`` setting."
1664 msgstr ""
1665 "在站点生成过程中有时可能会出现一堆警告信息。在这一大堆日志输出中寻找 **有意义** "
1666 "的错误消息是非常棘手的。为了过滤掉多余的日志消息,可以在Pelican中指定 ``LOG_FILTER`` 设置。"
1667
1668 #: ../../settings.rst:1319 0a8d1eb4cad64db1bdccc37e40c0d5b9
1669 msgid ""
1670 "``LOG_FILTER`` should be a list of tuples ``(level, msg)``, each of them "
1671 "being composed of the logging level (up to ``warning``) and the message "
1672 "to be ignored. Simply populate the list with the log messages you want to"
1673 " hide, and they will be filtered out."
1674 msgstr ""
1675 "``LOG_FILTER`` 是元组 ``(level, msg)`` ,level指定日志记录等级(最高为 ``warning`` "
1676 "),msg指定要忽略的消息。将想要隐藏的日志消息添加到此列表中就可以将他们过滤掉。"
1677
1678 #: ../../settings.rst:1324 ../../settings.rst:1332
1679 #: a060e3f3d20b4f5ca0891c81e1e6bf44
1680 msgid "For example::"
1681 msgstr "例如:"
1682
1683 #: ../../settings.rst:1329 66bf87b59c0547d6992c494296f54cba
1684 msgid ""
1685 "It is possible to filter out messages by a template. Check out source "
1686 "code to obtain a template."
1687 msgstr "用模板字符串指定要过滤的消息也是可以的。具体的消息种类请查看源码。"
1688
1689 #: ../../settings.rst:1339 77c817d503564c58b81e694cd2f2c357
1690 msgid ""
1691 "Silencing messages by templates is a dangerous feature. It is possible to"
1692 " unintentionally filter out multiple message types with the same template"
1693 " (including messages from future Pelican versions). Proceed with caution."
1694 msgstr "通过模板过滤忽略消息是一个危险的功能。 使用同一模板可能会无意中过滤掉多种消息类型(包括来自新版本Pelican的消息),请谨慎行事。"
1695
1696 #: ../../settings.rst:1345 2ca9fb8cc8854442b52381580df2423e
1697 msgid "This option does nothing if ``--debug`` is passed."
1698 msgstr "当使用了 ``--debug`` 参数,此项设置就不会起作用。"
1699
1700 #: ../../settings.rst:1351 a915c4d447a44d9d8f1df8aeb978a590
1701 msgid "Reading only modified content"
1702 msgstr "只读取修改过的内容"
1703
1704 #: ../../settings.rst:1353 7c899d3702eb4c9389b29caa1dd199bf
1705 msgid ""
1706 "To speed up the build process, Pelican can optionally read only articles "
1707 "and pages with modified content."
1708 msgstr "为了加速网站构建过程,Pelican能够只读取修改过内容的文章和页面。"
1709
1710 #: ../../settings.rst:1356 22170a8c737540d6b2826de10d97f57e
1711 msgid "When Pelican is about to read some content source file:"
1712 msgstr "当Pelican准备读取内容源文件时,会执行下面的规则:"
1713
1714 #: ../../settings.rst:1358 c746f9e5624441c4a53d81f9049910d8
1715 msgid ""
1716 "The hash or modification time information for the file from a previous "
1717 "build are loaded from a cache file if ``LOAD_CONTENT_CACHE`` is ``True``."
1718 " These files are stored in the ``CACHE_PATH`` directory. If the file has"
1719 " no record in the cache file, it is read as usual."
1720 msgstr ""
1721 "若 ``LOAD_CONTENT_CACHE`` 为 ``True`` "
1722 ",则从缓存文件中加载上一次构建时文件的哈希值或修改时间。这些缓存的文件存储在 ``CACHE_PATH`` "
1723 "所指定的目录中。若文件是新的,在缓存文件中没有记录,则照常读取。"
1724
1725 #: ../../settings.rst:1362 20764c61c87044a6a7cfaca089dbe088
1726 msgid "The file is checked according to ``CHECK_MODIFIED_METHOD``:"
1727 msgstr "文件会以 ``CHECK_MODIFIED_METHOD`` 设置的方式检查:"
1728
1729 #: ../../settings.rst:1368 f31c72607b3c4c6e99d97c7db70ffdd6
1730 msgid ""
1731 "If set to anything else or the necessary information about the file "
1732 "cannot be found in the cache file, the content is read as usual."
1733 msgstr "如果设置为其他任何值或在缓存文件中无法找到有关该文件的必要信息,则将照常读取内容。"
1734
1735 #: ../../settings.rst:1371 32c11190a05847fc94ef489e2cd75ebc
1736 msgid ""
1737 "If the file is considered unchanged, the content data saved in a previous"
1738 " build corresponding to the file is loaded from the cache, and the file "
1739 "is not read."
1740 msgstr "如果Pelican认为文件没有更改过,会直接从上一次构建的对应文件中加载内容,源文件就不会被读取。"
1741
1742 #: ../../settings.rst:1374 8a6a10580d4646c08562a415ab80b032
1743 msgid ""
1744 "If the file is considered changed, the file is read and the new "
1745 "modification information and the content data are saved to the cache if "
1746 "``CACHE_CONTENT`` is ``True``."
1747 msgstr ""
1748 "若Pelican认为文件更改过了,则会读取源文件;若 ``CACHE_CONTENT`` 设为了 ``True`` "
1749 ",Pelican还会将修改后的信息以及内容数据存入缓存。"
1750
1751 #: ../../settings.rst:1378 4d2198d1f1a04c0ab92bd5a2bfe2f3bd
1752 msgid ""
1753 "If ``CONTENT_CACHING_LAYER`` is set to ``'reader'`` (the default), the "
1754 "raw content and metadata returned by a reader are cached. If this setting"
1755 " is instead set to ``'generator'``, the processed content object is "
1756 "cached. Caching the processed content object may conflict with plugins "
1757 "(as some reading related signals may be skipped) and the "
1758 "``WITH_FUTURE_DATES`` functionality (as the ``draft`` status of the "
1759 "cached content objects would not change automatically over time)."
1760 msgstr ""
1761 "若 ``CONTENT_CACHING_LAYER`` 设为了 ``'reader'`` (默认值),则缓存reader返回的原始内容和元数据;若"
1762 " ``CONTENT_CACHING_LAYER`` 设为了 ``'generator'`` "
1763 ",则缓存处理过后的内容对象。缓存已处理的内容对象可能会和插件(因为可能会跳过一些与读取相关的信号)与 ``WITH_FUTURE_DATES`` "
1764 "的功能(因为已处理内容对象的 ``draft`` 状态不会改变)冲突。"
1765
1766 #: ../../settings.rst:1386 75139bf4fb6f40649b4691f4158d1eee
1767 msgid ""
1768 "Checking modification times is faster than comparing file hashes, but it "
1769 "is not as reliable because ``mtime`` information can be lost, e.g., when "
1770 "copying content source files using the ``cp`` or ``rsync`` commands "
1771 "without the ``mtime`` preservation mode (which for ``rsync`` can be "
1772 "invoked by passing the ``--archive`` flag)."
1773 msgstr ""
1774 "检查文件修改时间比计算文件哈希更快,但事实上却不太可靠,因为 ``mtime`` 信息有丢失的可能。例如,使用 ``cp`` 或 "
1775 "``rsync`` 命令时没有开启 ``mtime`` 保留模式。(rsync可以通过指定 ``--archive`` 标志启用 "
1776 "``mtime`` 保留模式)"
1777
1778 #: ../../settings.rst:1392 f556d8c0bd75495ca85a41e310637101
1779 msgid ""
1780 "The cache files are Python pickles, so they may not be readable by "
1781 "different versions of Python as the pickle format often changes. If such "
1782 "an error is encountered, it is caught and the cache file is rebuilt "
1783 "automatically in the new format. The cache files will also be rebuilt "
1784 "after the ``GZIP_CACHE`` setting has been changed."
1785 msgstr ""
1786 "缓存文件使用的是Python "
1787 "pickles,因此不同版本的Python由于pickle文件格式变化可能无法读取缓存。如果遇到此类错误,会自动以新格式重新构建缓存。另外,当 "
1788 "``GZIP_CACHE`` 设置发生变化后,缓存也会自动重建。"
1789
1790 #: ../../settings.rst:1398 2b6a584c560d467ba34a744bb37c0006
1791 msgid ""
1792 "The ``--ignore-cache`` command-line option is useful when the whole cache"
1793 " needs to be regenerated, such as when making modifications to the "
1794 "settings file that will affect the cached content, or just for debugging "
1795 "purposes. When Pelican runs in autoreload mode, modification of the "
1796 "settings file will make it ignore the cache automatically if "
1797 "``AUTORELOAD_IGNORE_CACHE`` is ``True``."
1798 msgstr ""
1799 "当需要重新生成整个缓存时,可以使用 ``--ignore-cache`` "
1800 "命令行选项,例如当需要修改会影响缓存内容的设置项时,或是调试时,都可以使用 ``--ignore-cache`` 。若 "
1801 "``AUTORELOAD_IGNORE_CACHE`` 设为了 ``True`` ,修改设置文件时会自动忽略缓存。"
1802
1803 #: ../../settings.rst:1404 a38225b961234c2e96f6d0f2545ed455
1804 msgid ""
1805 "Note that even when using cached content, all output is always written, "
1806 "so the modification times of the generated ``*.html`` files will always "
1807 "change. Therefore, ``rsync``-based uploading may benefit from the "
1808 "``--checksum`` option."
1809 msgstr ""
1810 "需要注意的是,即使使用了缓存的内容,最终的输出文件也始终会进行重新写入,因此生成的 ``*.html`` 文件的修改时间始终会变化。所以,基于 "
1811 "``rsync`` 进行上传时,可以考虑使用 ``--checksum`` 选项。"
1812
1813 #: ../../settings.rst:1411 2aa4b6fbbab24465ab36a606cecf299c
1814 msgid "Example settings"
1815 msgstr "配置示例"