Debian Codegraph @

docs/locale/zh_CN/LC_MESSAGES/content.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-09-15 09:23+0800\n"
11 "PO-Revision-Date: 2024-06-25 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 #: ../../content.rst:2 0e0d4e5751154cd4a5002b3f93cce14a
22 msgid "Writing content"
23 msgstr "创作内容"
24
25 #: ../../content.rst:5 4316c31e97f740239cb3daaa533c0b64
26 msgid "Articles and pages"
27 msgstr "文章和页面"
28
29 #: ../../content.rst:7 66e59f17488f4914a6d5c4538214dd91
30 msgid ""
31 "Pelican considers \"articles\" to be chronological content, such as posts"
32 " on a blog, and thus associated with a date."
33 msgstr "Pelican将“文章”(article)视为有时间顺序的内容,例如博客上的博文就是文章。"
34
35 #: ../../content.rst:10 ed244e3e671f450daf0617a80274878b
36 msgid ""
37 "The idea behind \"pages\" is that they are usually not temporal in nature"
38 " and are used for content that does not change very often (e.g., "
39 "\"About\" or \"Contact\" pages)."
40 msgstr "“页面”(page)指的是不经常改变的内容,例如“关于”“联系我们”这样的。"
41
42 #: ../../content.rst:14 f30d12684e0043438418655ba9f5cf25
43 msgid "You can find sample content in the repository at ``samples/content/``."
44 msgstr ""
45 "在代码仓库的 ``samples/content/`` "
46 "文件夹下有一些内容示例供您查看。(译者注:原文档中还有post与content的说法,一般既指代文章又指代页面,后文统一将其翻译为推文)"
47
48 #: ../../content.rst:19 370562db18eb42f19935009d087595b4
49 msgid "File metadata"
50 msgstr "文件元数据"
51
52 #: ../../content.rst:21 e9e758d40aeb42a78a5e25ddbca35a3b
53 msgid ""
54 "Pelican tries to be smart enough to get the information it needs from the"
55 " file system (for instance, about the category of your articles), but "
56 "some information you need to provide in the form of metadata inside your "
57 "files."
58 msgstr "Pelican可以从文件系统中自动地获取一些信息(例如文章的分类),但是有些信息需要您以元数据的形式在文件中提供。"
59
60 #: ../../content.rst:25 276a3d27de8c41a784b3c4fa6b0b9f1b
61 msgid ""
62 "If you are writing your content in reStructuredText format, you can "
63 "provide this metadata in text files via the following syntax (give your "
64 "file the ``.rst`` extension)::"
65 msgstr "如果您用reStructuredText的格式进行内容创作,您可以按照下面的语法在文本文件中提供元数据(请给文本文件加上 ``.rst`` 后缀):"
66
67 #: ../../content.rst:40 b5d99eedf95a4b6bbf760eccb4add31b
68 msgid ""
69 "Author and tag lists may be semicolon-separated instead, which allows you"
70 " to write authors and tags containing commas::"
71 msgstr "如果有多个作者或多个文章标签,需要将他们以分号分隔,这样就可以在作者或标签中使用逗号了:"
72
73 #: ../../content.rst:46 18ae0e8b1cae406381a546bf2462c1e6
74 msgid ""
75 "Pelican implements an extension to reStructuredText to enable support for"
76 " the ``abbr`` HTML tag. To use it, write something like this in your "
77 "post::"
78 msgstr "Pelican在reStructuredText上实现了 ``abbr`` HTML标签的使用支持。在正文部分按照下面的形式书写即可。"
79
80 #: ../../content.rst:51 62c068f033f0498d888dd72f23f9d231
81 msgid ""
82 "You can also use Markdown syntax (with a file ending in ``.md``, "
83 "``.markdown``, ``.mkd``, or ``.mdown``). Markdown generation requires "
84 "that you first explicitly install the Python-Markdown_ package, which can"
85 " be done via ``pip install Markdown``."
86 msgstr ""
87 "Pelican同时也支持Markdown语法(文件的扩展名需要为 ``.md`` 、 ``.markdown``、 ``.mkd`` 或 "
88 "``.mdown`` )要让Pelican进行Markdown的生成,需要先通过 ``pip install Markdown`` 安装 "
89 "Python-Markdown_ 。"
90
91 #: ../../content.rst:56 f39e1de0f9ea4533942c5bf0bff7866f
92 msgid ""
93 "Pelican also supports `Markdown Extensions`_, which might have to be "
94 "installed separately if they are not included in the default ``Markdown``"
95 " package and can be configured and loaded via the ``MARKDOWN`` setting."
96 msgstr ""
97 "Pelican同样支持 `Markdown扩展`_ ,可以是 ``Markdown`` 包自带的扩展,也可以是另外安装的,可以通过 "
98 "``MARKDOWN`` 配置项管理这些扩展。"
99
100 #: ../../content.rst:60 c9f3ab98c3d54b53bf647ba9202b5386
101 msgid "Metadata syntax for Markdown posts should follow this pattern::"
102 msgstr "Markdown中的元数据语法需要按照下面的格式书写:"
103
104 #: ../../content.rst:73 ba840c208e4b4198ac0a2bd672a94f36
105 msgid ""
106 "You can also have your own metadata keys (so long as they don't conflict "
107 "with reserved metadata keywords) for use in your templates. The following"
108 " table contains a list of reserved metadata keywords:"
109 msgstr "您也可以定义自己的元数据类型(只要和保留的元数据关键字不冲突),这些自定义的元数据关键字可以用在自定义的模板中。下面的列出了所有保留的元数据关键字。"
110
111 #: ../../content.rst:78 a9537c5593d9458d9193dacc82c27f2f
112 msgid "Metadata"
113 msgstr "元数据类型"
114
115 #: ../../content.rst:78 ../../content.rst:548 827ac866a3914692ac5fc9eaa1921aac
116 #: a55315aa4aee4e30a7768bc54d7063da
117 msgid "Description"
118 msgstr "描述"
119
120 #: ../../content.rst:80 d5e5b3902b9f46e3a827c551e26d84bd
121 msgid "``title``"
122 msgstr "``title``"
123
124 #: ../../content.rst:80 07eb7d1b1a5f458084564729052749e7
125 msgid "Title of the article or page"
126 msgstr "文章或页面的标题"
127
128 #: ../../content.rst:81 37abd449ffca4436a505f0dc35343cea
129 msgid "``date``"
130 msgstr "``date``"
131
132 #: ../../content.rst:81 a13a424e96f643068af63b0d0d2dbb27
133 msgid "Publication date (e.g., ``YYYY-MM-DD HH:SS``)"
134 msgstr "发布日期(需要以 ``YYYY-MM-DD HH:SS`` 的格式)"
135
136 #: ../../content.rst:82 7534c5908891457797988ef7a67b17db
137 msgid "``modified``"
138 msgstr "``modified``"
139
140 #: ../../content.rst:82 6cc7d4c20ee44e31bb54173b24aa9afe
141 msgid "Modification date (e.g., ``YYYY-MM-DD HH:SS``)"
142 msgstr "最后修改日期(需要以 ``YYYY-MM-DD HH:SS`` 的格式)"
143
144 #: ../../content.rst:83 0f7d30bb91bf46f7a0e2dd5ab186955d
145 msgid "``tags``"
146 msgstr "``tags``"
147
148 #: ../../content.rst:83 e07fee37f1de414f82b38e7ff5e9051b
149 msgid "Content tags, separated by commas"
150 msgstr "推文标签,以逗号分隔"
151
152 #: ../../content.rst:84 cc730907be1c4bb6a4d1f4e551f1bb13
153 msgid "``keywords``"
154 msgstr "``keywords``"
155
156 #: ../../content.rst:84 b4185fda72084329b551f26b6eff5bd5
157 msgid "Content keywords, separated by commas (HTML content only)"
158 msgstr "推文关键字,以逗号分隔(只能在HTML内容中使用)"
159
160 #: ../../content.rst:85 98438d6e0fbf4783a580516079fa5f3b
161 msgid "``category``"
162 msgstr "``category``"
163
164 #: ../../content.rst:85 48e04733764e4962bfe4d16828b34d79
165 msgid "Content category (one only — not multiple)"
166 msgstr "推文分类(只能归属到一个分类中,不支持多个)"
167
168 #: ../../content.rst:86 275265cdeaaf4515b8f84dd79d29e181
169 msgid "``slug``"
170 msgstr "``slug``"
171
172 #: ../../content.rst:86 d910b7a82ea540179d561f639e531b9d
173 msgid "Identifier used in URLs and translations"
174 msgstr "URL和翻译的唯一标识符"
175
176 #: ../../content.rst:87 ac2a927028d647a0b4f5edb14e5b1851
177 msgid "``author``"
178 msgstr "``author``"
179
180 #: ../../content.rst:87 bd27267c861f470db23499a67a631854
181 msgid "Content author, when there is only one"
182 msgstr "当只有一个作者时可以使用这个元数据"
183
184 #: ../../content.rst:88 9616ecb488914e4eaa192ecb4e437ba0
185 msgid "``authors``"
186 msgstr "``authors``"
187
188 #: ../../content.rst:88 762660408c274f5690dba81dcc88c662
189 msgid "Content authors, when there are multiple"
190 msgstr "当有多个作者时需要使用这个元数据"
191
192 #: ../../content.rst:89 40d65df77e0f4e75a26615d60775a382
193 msgid "``summary``"
194 msgstr "``summary``"
195
196 #: ../../content.rst:89 f072a97cf1c54b7fbd383f205732f1c2
197 msgid "Brief description of content for index pages"
198 msgstr "简短的推文概要,会显示在首页上"
199
200 #: ../../content.rst:90 69018dfa7f9b4e74b518fc1940af8908
201 msgid "``lang``"
202 msgstr "``lang``"
203
204 #: ../../content.rst:90 f139c5b2a2774ee3bb83d4bd3b523a93
205 msgid "Content language ID (``en``, ``fr``, etc.)"
206 msgstr "推文所用语言的ID(例如 ``en`` 、 ``fr`` 、 ``zh-cn`` 等)"
207
208 #: ../../content.rst:91 13757ce4c6a84096b4d131232eaeb8b4
209 msgid "``translation``"
210 msgstr "``translation``"
211
212 #: ../../content.rst:91 9b3f475397bc4d60a1eb911f6763285f
213 msgid "If content is a translation of another (``true`` or ``false``)"
214 msgstr "手动指定当前内容是否是某个翻译版本(该元数据的值只能是 ``true`` 或 ``false``)"
215
216 #: ../../content.rst:92 3f294461641949eead16c79e7bffdb22
217 msgid "``status``"
218 msgstr "``status``"
219
220 #: ../../content.rst:92 f6ab65a6adf64379a14fb89d300d9eaa
221 msgid "Content status: ``draft``, ``hidden``, ``skip``, or ``published``"
222 msgstr "推文的状态: ``draft``、 ``hidden`` 、 ``skip`` 或 ``published`` "
223
224 #: ../../content.rst:93 d9aefdcc77aa462d9934eb49f2b39095
225 msgid "``template``"
226 msgstr "``template``"
227
228 #: ../../content.rst:93 41ecae4039714f31b0220f0d0f45a0c7
229 msgid "Name of template to use to generate content (without extension)"
230 msgstr "用于指定要使用的生成模板,只需要写模板的名字,不需要模板文件的后缀名"
231
232 #: ../../content.rst:94 892e239c7a9145beb61b2f583284f448
233 msgid "``save_as``"
234 msgstr "``save_as``"
235
236 #: ../../content.rst:94 3bc3792a6a5c4e79bcf8f77fc48f313b
237 msgid "Save content to this relative file path"
238 msgstr "将内容保存到指定的相对文件路径"
239
240 #: ../../content.rst:95 8c3ed87a54734ca1bba051448d8169f9
241 msgid "``url``"
242 msgstr "``url``"
243
244 #: ../../content.rst:95 2b55b515c7ce40e48eae20fbc67107bb
245 msgid "URL to use for this article/page"
246 msgstr "指定本篇文章或页面要使用的URL"
247
248 #: ../../content.rst:98 81c7cc35f7b74566b7dd9083c2fc17f1
249 msgid ""
250 "Readers for additional formats (such as AsciiDoc_) are available via "
251 "plugins, which you can find via the `Pelican Plugins`_ collection as well"
252 " as the legacy `pelican-plugins`_ repository."
253 msgstr ""
254 "对其他格式的支持(例如 AsciiDoc_ )可以通过插件实现,在 `Pelican插件`_ 集中可以查看所有插件。当然,在老的 "
255 "`pelican-plugins`_ 仓库中也可以查看。"
256
257 #: ../../content.rst:102 b808c2914ee14c1380fe53e5e1f378f7
258 msgid ""
259 "Pelican can also process HTML files ending in ``.html`` and ``.htm``. "
260 "Pelican interprets the HTML in a very straightforward manner, reading "
261 "metadata from ``meta`` tags, the title from the ``title`` tag, and the "
262 "body out from the ``body`` tag::"
263 msgstr ""
264 "Pelican还能处理后缀名为 ``.html`` 和 ``.htm`` "
265 "的HTML文件Pelican在解释转换HTML文件时用的方法非常直接,会从 ``meta`` HTML标签中获取元数据信息,从 ``title``"
266 " HTML标签中获取标题,从 ``body`` 标签中获取文章的正文内容:"
267
268 #: ../../content.rst:122 289c3761b4b94691bee5ef07e8ab25ff
269 msgid ""
270 "With HTML, there is one simple exception to the standard metadata: tags "
271 "can be specified either via the ``tags`` metadata, as is standard in "
272 "Pelican, or via the ``keywords`` metadata, as is standard in HTML. The "
273 "two can be used interchangeably."
274 msgstr ""
275 "当使用HTML文件时,上述的众多元数据中有一个比较特殊的存在——tags。这个元数据在HTML文档中有两种方式可以指定,一种是Pelican中定义的"
276 " ``tags`` (上面的例子中用的就是这种);另一种是使用HTML中定义的 ``keywords`` "
277 "(即将name属性的“tags”换成“keywords”)。"
278
279 #: ../../content.rst:127 9af1403c5c624860bd73aba6f6ad642f
280 msgid ""
281 "Note that, aside from the title, none of this content metadata is "
282 "mandatory: if the date is not specified and ``DEFAULT_DATE`` is set to "
283 "``'fs'``, Pelican will rely on the file's \"mtime\" timestamp, and the "
284 "category can be determined by the directory in which the file resides. "
285 "For example, a file located at ``python/foobar/myfoobar.rst`` will have a"
286 " category of ``foobar``. If you would like to organize your files in "
287 "other ways where the name of the subfolder would not be a good category "
288 "name, you can set the setting ``USE_FOLDER_AS_CATEGORY`` to ``False``. "
289 "When parsing dates given in the page metadata, Pelican supports the W3C's"
290 " `suggested subset ISO 8601`__."
291 msgstr ""
292 "需要注意的是,除了title外,其他所有元数据都是可以缺省的。若未指定日期元数据并且将 ``DEFAULT_DATE`` 设为了 "
293 "``'fs'``,Pelican就会从文件的 “mtime” 时间戳中获取日期信息;文件所在目录的名称会被作为category。例如 "
294 "``python/foobar/myfoobar.rst`` 的category元数据值就会被设为 ``foobar`` "
295 "。如果您不希望子目录的名称成为category的值,则需要在设置中将 ``USE_FOLDER_AS_CATEGORY`` 设为 "
296 "``False`` 。进行日期元数据的解析时,Pelican支持W3C的 `suggested subset ISO 8601`__ 标准。"
297
298 #: ../../content.rst:137 0f142fac1e9e41eeb0cf4cc70a42f72b
299 msgid ""
300 "So the title is the only required metadata. If that bothers you, worry "
301 "not. Instead of manually specifying a title in your metadata each time, "
302 "you can use the source content file name as the title. For example, a "
303 "Markdown source file named ``Publishing via Pelican.md`` would "
304 "automatically be assigned a title of *Publishing via Pelican*. If you "
305 "would prefer this behavior, add the following line to your settings "
306 "file::"
307 msgstr ""
308 "总而言之,标题是唯一必须指定的元数据。如果您甚至懒得写标题,也不用担心,Pelican会自动将文件名作为内容的标题。例如,Markdown源文件 "
309 "``Publishing via Pelican.md`` 的标题会自动设为 *Publishing via "
310 "Pelican*。如果您希望启用这个特性,请在设置文件中添加下面这么一行:"
311
312 #: ../../content.rst:148 481919b7e3974c8293d420886105941f
313 msgid ""
314 "When experimenting with different settings (especially the metadata ones)"
315 " caching may interfere and the changes may not be visible. In such cases "
316 "disable caching with ``LOAD_CONTENT_CACHE = False`` or use the "
317 "``--ignore-cache`` command-line switch."
318 msgstr ""
319 "在您尝试不同的设置时(特别是在设置元数据时),缓存可能会对您造成干扰,导致设置更改不起作用。若您遇到了这种问题,可以在配置文件中加上 "
320 "``LOAD_CONTENT_CACHE = False`` ,或是在使用命令行生成站点时加上 ``--ignore-cache`` 参数。"
321
322 #: ../../content.rst:155 466fa8d713b343d1a8ae8266c3031479
323 msgid ""
324 "``modified`` should be last time you updated the article, and defaults to"
325 " ``date`` if not specified. Besides you can show ``modified`` in the "
326 "templates, feed entries in feed readers will be updated automatically "
327 "when you set ``modified`` to the current date after you modified your "
328 "article."
329 msgstr ""
330 "``modified`` 元数据中应该为文章最后一次的修改时间,若没有指定,会自动与 ``date`` 保持一致。在您修改文章并将 "
331 "``modified`` 设为当前日期后,除了在模板中显示 ``modified`` 之外,feed阅读器中的feed条目也会自动更新。"
332
333 #: ../../content.rst:160 e7c9358cd2a74e64863af04736d10775
334 msgid ""
335 "``authors`` is a comma-separated list of article authors. If there's only"
336 " one author you can use ``author`` field."
337 msgstr "``authors`` 元数据中是文章作者的列表,各个作者之间用逗号分隔。若只有一个作者,可以使用 ``author`` 。"
338
339 #: ../../content.rst:163 15bdeea8538244948ca509ee57ef8f63
340 msgid ""
341 "If you do not explicitly specify summary metadata for a given post, the "
342 "``SUMMARY_MAX_LENGTH`` setting can be used to specify how many words from"
343 " the beginning of an article are used as the summary. You can also use an"
344 " article's first N paragraphs as its summary using the "
345 "``SUMMARY_MAX_PARAGRAPHS`` setting. If both settings are in use, the "
346 "specified number of paragraphs will be used but may be truncated to "
347 "respect the specified maximum length."
348 msgstr ""
349 "若您没有显式地指定summary元数据,Pelican会自动从推文开头截取 ``SUMMARY_MAX_LENGTH`` "
350 "指定长度的内容作为summary。另外,您也可以使用配置项 ``SUMMARY_MAX_PARAGRAPHS`` "
351 "指定推文开头前N段内容作为summary。若同时指定了这两个配置项,首先会考虑 ``SUMMARY_MAX_PARAGRAPHS`` "
352 ",若前N段的总长度超过 ``SUMMARY_MAX_LENGTH`` ,还是会按照 ``SUMMARY_MAX_LENGTH`` 进行截断。"
353
354 #: ../../content.rst:170 64a7dcd4911447338ac1871083242a83
355 msgid ""
356 "You can also extract any metadata from the filename through a regular "
357 "expression to be set in the ``FILENAME_METADATA`` setting. All named "
358 "groups that are matched will be set in the metadata object. The default "
359 "value for the ``FILENAME_METADATA`` setting will only extract the date "
360 "from the filename. For example, if you would like to extract both the "
361 "date and the slug, you could set something like: "
362 "``'(?P<date>\\d{4}-\\d{2}-\\d{2})_(?P<slug>.*)'``"
363 msgstr ""
364 "您可以通过 ``FILENAME_METADATA`` "
365 "设置来使用正则表达式从文件名中提取元数据。正则匹配到的每个命名分组都被看成一个元数据。预设的 ``FILENAME_METADATA`` "
366 "只会从文件名中提取date和slug。例如,可以使用 "
367 "``'(?P<date>\\d{4}-\\d{2}-\\d{2})_(?P<slug>.*)'`` 提取date和slug。"
368
369 #: ../../content.rst:177 0b6aaca5fc60494fafd2bdf345f25ab3
370 msgid ""
371 "Please note that the metadata available inside your files takes "
372 "precedence over the metadata extracted from the filename."
373 msgstr "请注意,您在推文中直接指定的元数据的优先级是大于从文件名中提取的。"
374
375 #: ../../content.rst:181 463df99e715d44c09a48770ddda1e139
376 msgid "Pages"
377 msgstr "页面"
378
379 #: ../../content.rst:183 d2dd51b7abe14dc4921adcf50b8218fb
380 msgid ""
381 "If you create a folder named ``pages`` inside the content folder, all the"
382 " files in it will be used to generate static pages, such as **About** or "
383 "**Contact** pages. (See example filesystem layout below.)"
384 msgstr ""
385 "如果您在content文件夹下创建了一个 ``pages`` 文件夹,那么Pelican会为其中的每个文件生成一个例如 **关于** "
386 "、**联系我们** 这样的静态页面。(具体可以看下面项目文件组织的例子)"
387
388 #: ../../content.rst:187 3ac83019ba9c44e781a7b67c837c99d6
389 msgid ""
390 "You can use the ``DISPLAY_PAGES_ON_MENU`` setting to control whether all "
391 "those pages are displayed in the primary navigation menu. (Default is "
392 "``True``.)"
393 msgstr "您可以通过 ``DISPLAY_PAGES_ON_MENU`` 设置来决定页面是否被列在主导航菜单中(默认值为 ``True`` )。"
394
395 #: ../../content.rst:190 56486e599f334e0fbc976bcf2d22bd5e
396 msgid ""
397 "If you want to exclude any pages from being linked to or listed in the "
398 "menu, then add a ``status: hidden`` attribute to its metadata. This is "
399 "useful for things like making error pages that fit the generated theme of"
400 " your site."
401 msgstr ""
402 "如果您希望让某些页面不会被链接并且也不列在任何菜单中,可以为它加上元数据属性 ``status: hidden`` "
403 "。这在将错误页面适配到所用主题时很有用。"
404
405 #: ../../content.rst:195 0205a4cab1a040a4aef74a3c375855a4
406 msgid "Static content"
407 msgstr "静态内容"
408
409 #: ../../content.rst:197 2a86301465bd4f41944964cb0edf1572
410 msgid ""
411 "Static files are files other than articles and pages that are copied to "
412 "the output folder as-is, without processing. You can control which static"
413 " files are copied over with the ``STATIC_PATHS`` setting of the project's"
414 " ``pelicanconf.py`` file. Pelican's default configuration includes the "
415 "``images`` directory for this, but others must be added manually. In "
416 "addition, static files that are explicitly linked to are included (see "
417 "below)."
418 msgstr ""
419 "静态文件与文章、页面不同,会原模原样地复制到输出文件夹中。当然,您也通过设置 ``STATIC_PATHS`` "
420 "更改复制时的目标文件夹。Pelican的默认配置中只包含了 ``images`` "
421 "一个文件夹,其他的需要手动添加。另外静态文件也包含那些被显式链接的(详见后文)。"
422
423 #: ../../content.rst:206 3b74472b747e4cd494aae142ec4deecc
424 msgid ""
425 "In the default configuration, all files with a valid content file suffix "
426 "(``.html``, ``.rst``, ``.md``, ...) get processed by the article and page"
427 " generators *before* the static generator. This is avoided by altering "
428 "the ``*_EXCLUDE`` settings appropriately."
429 msgstr ""
430 "在默认配置下,所有后缀名有效的文件( ``.html`` 、 ``.rst`` 、 ``.md`` , "
431 "...)都会由文章/页面生成器处理,这是在静态文件处理之前完成的。若这些文件中的某一些是静态文件,可以合理使用 ``*_EXCLUDE`` "
432 "配置项将他们排除(例如 ``ARTICLE_EXCLUDES`` 、 ``PAGE_EXCLUDES``)。"
433
434 #: ../../content.rst:212 ab263a1d5b5a4fb0a705257701b8b6c3
435 msgid "Mixed content in the same directory"
436 msgstr "在同一个目录下存放不同类型的内容"
437
438 #: ../../content.rst:214 dfec139d8f98465ea117dcd02f3e7870
439 msgid ""
440 "Starting with Pelican 3.5, static files can safely share a source "
441 "directory with page source files, without exposing the page sources in "
442 "the generated site. Any such directory must be added to both "
443 "``STATIC_PATHS`` and ``PAGE_PATHS`` (or ``STATIC_PATHS`` and "
444 "``ARTICLE_PATHS``). Pelican will identify and process the page source "
445 "files normally, and copy the remaining files as if they lived in a "
446 "separate directory reserved for static files."
447 msgstr ""
448 "从Pelican 3.5开始,静态文件就可以和页面源文件安全地放在同一目录下了。这些包含了不同类型内容文件的目录需要添加到 "
449 "``STATIC_PATHS`` 和 ``PAGE_PATHS`` 中(或者 ``STATIC_PATHS`` 和 "
450 "``ARTICLE_PATHS`` "
451 "中)。Pelican会正常地识别和处理文章和页面源文件,然后再把静态文件复制,和处理处于单独一个文件夹的静态文件行为一致。"
452
453 #: ../../content.rst:221 de484f74c05a48e4ac84631e56309bf6
454 msgid ""
455 "Note: Placing static and content source files together in the same source"
456 " directory does not guarantee that they will end up in the same place in "
457 "the generated site. The easiest way to do this is by using the "
458 "``{attach}`` link syntax (described below). Alternatively, the "
459 "``STATIC_SAVE_AS``, ``PAGE_SAVE_AS``, and ``ARTICLE_SAVE_AS`` settings "
460 "(and the corresponding ``*_URL`` settings) can be configured to place "
461 "files of different types together, just as they could in earlier versions"
462 " of Pelican."
463 msgstr ""
464 "请注意:Pelican不保证放在同一个源目录下的静态文件和内容文件在站点生成完后最终出现在同一个地方。要让他们出现在一个地方,可以使用 "
465 "``{attach}`` 链接语法(下面会提到)。此外,还可以通过设置 ``STATIC_SAVE_AS`` 、 ``PAGE_SAVE_AS``"
466 " 和 ``ARTICLE_SAVE_AS`` (还有相应的 ``*_URL`` 设置)让不同类型的文件最终放在一起。"
467
468 #: ../../content.rst:232 6733f6cc9bbb4ee0995d7f818c24b850
469 msgid "Linking to internal content"
470 msgstr "内部链接"
471
472 #: ../../content.rst:234 e0f9e61fef924c82aa7950ad20c0b686
473 msgid ""
474 "From Pelican 3.1 onwards, it is now possible to specify intra-site links "
475 "to files in the *source content* hierarchy instead of files in the "
476 "*generated* hierarchy. This makes it easier to link from the current post"
477 " to other content that may be sitting alongside that post (instead of "
478 "having to determine where the other content will be placed after site "
479 "generation)."
480 msgstr ""
481 "从Pelican 3.1开始,站内链接可以在 *源文件* 层次下指定,而不是只能在 *生成后的站点* "
482 "层次下指定。当需要在当前推文链接到邻近位置的内容时,可以直接从源内容文件的位置开始链接(而不需要考虑在站点生成后文件会被放在哪儿)。"
483
484 #: ../../content.rst:240 8de8953b665841818066d12cec9631d4
485 msgid ""
486 "To link to internal content (files in the ``content`` directory), use the"
487 " following syntax for the link target: ``{filename}path/to/file``. Note: "
488 "forward slashes, ``/``, are the required path separator in the "
489 "``{filename}`` directive on all operating systems, including Windows."
490 msgstr ""
491 "要链接到站内(即在 ``content`` 目录下的文件),使用下述的目标链接语法: ``{filename}path/to/file`` "
492 "。注意,在所有操作系统(当然也包括Windows)上,路径的分隔符都要使用正斜杠 ``/`` 。"
493
494 #: ../../content.rst:246 dbd1404fa9fe47b7ba2594d1cc5d84f5
495 msgid "For example, a Pelican project might be structured like this::"
496 msgstr "例如,某Pelican项目的文件结构组织如下:"
497
498 #: ../../content.rst:257 04b1728643124b6e903acb6c32d6c970
499 msgid "In this example, ``article1.rst`` could look like this::"
500 msgstr "在这个例子中, ``article1.rst`` 的内容如下:"
501
502 #: ../../content.rst:269 9197b32aca1c4af6ac2f2b56e7498206
503 msgid "and ``article2.md``::"
504 msgstr "``article2.md`` 的内容如下:"
505
506 #: ../../content.rst:280 baccc8dc58cd482cb42bd44d78d16d42
507 msgid "Linking to static files"
508 msgstr "链接到静态文件"
509
510 #: ../../content.rst:282 33067c5bbb554baea7306b0c2f0b5356
511 msgid ""
512 "You can link to static content using ``{static}path/to/file``. Files "
513 "linked to with this syntax will automatically be copied to the output "
514 "directory, even if the source directories containing them are not "
515 "included in the ``STATIC_PATHS`` setting of the project's "
516 "``pelicanconf.py`` file."
517 msgstr ""
518 "您可以通过 ``{static}path/to/file`` 链接到静态内容。使用这个指令链接的文件都会被自动复制到输出目录中,即使它没有包含在 "
519 "``STATIC_PATHS`` 中。"
520
521 #: ../../content.rst:287 ../../content.rst:322 533a9aee68e5452db609cc5e1e569381
522 #: 7c9993b8f8c44863975e5db9d5ce1cb8
523 msgid "For example, a project's content directory might be structured like this::"
524 msgstr "例如,某Pelican项目的文件结构组织如下:"
525
526 #: ../../content.rst:297 7c70d916da684551b499f25fd9567e11
527 msgid "``test.md`` would include::"
528 msgstr "``test.md`` 的文件内容如下:"
529
530 #: ../../content.rst:302 8921fb6dfbba4e6ea4c0220650617dc6
531 msgid ""
532 "Site generation would then copy ``han.jpg`` to ``output/images/han.jpg``,"
533 " ``menu.pdf`` to ``output/pdfs/menu.pdf``, and write the appropriate "
534 "links in ``test.md``."
535 msgstr ""
536 "站点生成时会将 ``han.jpg`` 拷贝到 ``output/images/han.jpg`` 、将 ``menu.pdf`` 拷贝到 "
537 "``output/pdfs/menu.pdf`` ,同时也会自动把 ``test.md`` 中的相关链接都替换为正确的。"
538
539 #: ../../content.rst:306 244c1bb923ec4b7ab33c039f2deefe94
540 msgid ""
541 "If you use ``{static}`` to link to an article or a page, this will be "
542 "turned into a link to its source code."
543 msgstr "如果您使用 ``{static}`` 链接到文章或页面,会链接到他们的源文件而不是渲染后的文章或页面。"
544
545 #: ../../content.rst:310 50d69d50e26d4b48b4b1fb2643efa0e6
546 msgid "Attaching static files"
547 msgstr "将静态文件作为附件"
548
549 #: ../../content.rst:312 f28e37fba55b49a99f03bbafc669ef87
550 msgid ""
551 "Starting with Pelican 3.5, static files can be \"attached\" to a page or "
552 "article using this syntax for the link target: ``{attach}path/to/file``. "
553 "This works like the ``{static}`` syntax, but also relocates the static "
554 "file into the linking document's output directory. If the static file "
555 "originates from a subdirectory beneath the linking document's source, "
556 "that relationship will be preserved on output. Otherwise, it will become "
557 "a sibling of the linking document."
558 msgstr ""
559 "从Pelican 3.5开始,静态文件可以使用下述语法 “附” 在页面或文章上: ``{attach}path/to/file`` 。这和 "
560 "``{static}`` "
561 "语法很像,也会将静态文件重定位到文章或页面的对应输出目录中。当推文所链接的静态文件处于其源文件所在位置的子目录下时,这种父子关系在输出目录中会得以保留。否则,默认情况下,静态文件会和对应的文档输出到同一目录层级下。"
562
563 #: ../../content.rst:320 dba2dfdd8ef14b41b37f9db53ebb9704
564 msgid "This only works for linking to static files."
565 msgstr "这只在链接到静态文件时起作用。"
566
567 #: ../../content.rst:333 a523bb1926b54025908733f0aca757c5
568 msgid "``pelicanconf.py`` would include::"
569 msgstr "例如对于某设置文件 ``pelicanconf.py`` "
570
571 #: ../../content.rst:340 d12e170143234a51862ac73d04acb16b
572 msgid "``testpost.md`` would include::"
573 msgstr "``testpost.md`` 的内容如下:"
574
575 #: ../../content.rst:350 8628f5e27e51444fad84dc68aa8a74bb
576 msgid ""
577 "Site generation would then produce an output directory structured like "
578 "this::"
579 msgstr "对应生成输出的站点目录结构如下:"
580
581 #: ../../content.rst:360 8f74e3a043b84a088708bc046118b327
582 msgid ""
583 "Notice that all the files linked using ``{attach}`` ended up in or "
584 "beneath the article's output directory."
585 msgstr "可以注意到,使用 ``{attach}`` 链接的文件要么和文章输出处于同级目录,要么就是在文章所在位置的子目录下。"
586
587 #: ../../content.rst:363 cdaf8ffc246645da8614e76072a6704d
588 msgid ""
589 "If a static file is linked multiple times, the relocating feature of "
590 "``{attach}`` will only work in the first of those links to be processed. "
591 "After the first link, Pelican will treat ``{attach}`` like ``{static}``. "
592 "This avoids breaking the already-processed links."
593 msgstr ""
594 "若一个静态文件被多次链接, ``{attach}`` 只会在该静态文件第一次被链接时进行重定位处理(即按照上面的规则复制到对应目录)。之后使用 "
595 "``{attach}`` 进行的链接的效果就和 ``{static}`` 一模一样了。这样子就可以避免破坏已经生成好的链接。"
596
597 #: ../../content.rst:368 0783ef45de914a48af081fbf5978ae93
598 msgid ""
599 "**Be careful when linking to a file from multiple documents:** Since the "
600 "first link to a file finalizes its location and Pelican does not define "
601 "the order in which documents are processed, using ``{attach}`` on a file "
602 "linked by multiple documents can cause its location to change from one "
603 "site build to the next. (Whether this happens in practice will depend on "
604 "the operating system, file system, version of Pelican, and documents "
605 "being added, modified, or removed from the project.) Any external sites "
606 "linking to the file's old location might then find their links broken. "
607 "**It is therefore advisable to use {attach} only if you use it in all "
608 "links to a file, and only if the linking documents share a single "
609 "directory.** Under these conditions, the file's output location will not "
610 "change in future builds. In cases where these precautions are not "
611 "possible, consider using ``{static}`` links instead of ``{attach}``, and "
612 "letting the file's location be determined by the project's "
613 "``STATIC_SAVE_AS`` and ``STATIC_URL`` settings. (Per-file ``save_as`` and"
614 " ``url`` overrides can still be set in ``EXTRA_PATH_METADATA``.)"
615 msgstr ""
616 "**当同一文件被多个推文链接时需要尤其小心:** "
617 "第一次链接到文件时,Pelican就会确定其最终位置,而Pelican处理推文的顺序是不能确定的,因此多个推文使用 ``{attach}`` "
618 "链接到同一文件时,每一次站点生成后该文件的最终位置是无法确定的(这种情况发生与否取决于操作系统、文件系统、Pelican的版本、推文从项目中的添加修改移除)。当这种情况发生时,其他站点到本站点文件旧位置的链接就会损坏。**因此,只有当静态文件只被一篇推文链接,或链接到某静态文件的推文都在同一目录下时才使用"
619 " {attach}**。在这种情况下,该文件的输出位置在站点构建中不会变化。如果无法保证上述条件来预防链接损坏,可以考虑使用 "
620 "``{static}`` 来替换 ``{attach}`` 。如此,文件的最终位置就由 ``STATIC_SAVE_AS`` 和 "
621 "``STATIC_URL`` 来决定。(每个文件的 ``save_as`` 和 ``url`` 仍然可以通过更改 "
622 "``EXTRA_PATH_METADATA`` 设置来覆盖)"
623
624 #: ../../content.rst:385 85347094a7f741ac96f2489969660181
625 msgid ""
626 "When using ``{attach}``, any parent directory in ``*_URL`` / "
627 "``*_SAVE_AS`` settings should match each other. See also: :ref:`url-"
628 "settings`"
629 msgstr ""
630 "当使用{attach}时, ``*_URL`` / ``*_SAVE_AS`` 设置中的所有父目录都应该互相对应。具体请参见 "
631 ":ref:`URL配置<url-settings>` 。"
632
633 #: ../../content.rst:389 eaefe7d009be4a5797cabee8bf1230a4
634 msgid "Linking to authors, categories, index and tags"
635 msgstr "链接到作者、分类、索引、标签"
636
637 #: ../../content.rst:391 2c5b13a80a6b49acadeed0ff3d71236f
638 msgid ""
639 "You can link to authors, categories, index and tags using the "
640 "``{author}name``, ``{category}foobar``, ``{index}`` and ``{tag}tagname`` "
641 "syntax."
642 msgstr ""
643 "您可以通过 ``{author}name`` 、 ``{category}foobar`` 、 ``{index}`` 和 "
644 "``{tag}tagname`` 这样的语法链接到作者、分类、索引和标签。"
645
646 #: ../../content.rst:395 ec56f8d188bf4e41a961f00535b16dfb
647 msgid "Deprecated internal link syntax"
648 msgstr "已弃用的内部链接语法"
649
650 #: ../../content.rst:397 01e39bc18c964baaaf43779b37fbaa01
651 msgid ""
652 "To remain compatible with earlier versions, Pelican still supports "
653 "vertical bars (``||``) in addition to curly braces (``{}``) for internal "
654 "links. For example: ``|filename|an_article.rst``, ``|tag|tagname``, "
655 "``|category|foobar``. The syntax was changed from ``||`` to ``{}`` to "
656 "avoid collision with Markdown extensions or reST directives. Similarly, "
657 "Pelican also still supports linking to static content with "
658 "``{filename}``. The syntax was changed to ``{static}`` to allow linking "
659 "to both generated articles and pages and their static sources."
660 msgstr ""
661 "为了保持和早期版本的兼容,在内部链接中除了使用花括号( ``{}`` )外,还支持在内部链接中使用竖线( ``||`` )。例如, "
662 "``|filename|an_article.rst`` 、 ``|tag|tagname`` 、 ``|category|foobar`` "
663 "。将语法中的 ``||`` 改到 ``{}`` 是为了避免和Markdown或reST的语法和指令相冲突。类似地, ``{filename}`` "
664 "虽然仍能使用,但是其语法已经改为了 ``{static}`` 。 ``{static}`` 既可以链接到文章或页面,也可以链接到静态资源。"
665
666 #: ../../content.rst:405 375eca8f0c324943a3d5ba60f46e8aa7
667 msgid "Support for the old syntax may eventually be removed."
668 msgstr "对旧语法地支持最终会被移除。"
669
670 #: ../../content.rst:408 d1e5719616d5454a810ed1562d0610fa
671 msgid "Including other files"
672 msgstr "引入其他文件"
673
674 #: ../../content.rst:409 b429cad5b7904db5b16053bd9dbc7bb6
675 msgid "Both Markdown and reStructuredText syntaxes provide mechanisms for this."
676 msgstr "Markdown和reStructuredText的语法中都提供了这种机制"
677
678 #: ../../content.rst:411 fa6e783b42c84147a18f2a23136a8212
679 msgid ""
680 "Following below are some examples for **reStructuredText** using `the "
681 "include directive`_:"
682 msgstr "下面是 **reStructuredText** 使用 `include指令`_ 的一些例子:"
683
684 #: ../../content.rst:417 ecbaa72c1df64857b2e720ab7055e258
685 msgid ""
686 "Include a fragment of a file delimited by two identifiers, highlighted as"
687 " C++ (slicing based on line numbers is also possible):"
688 msgstr "下面的例子,引入了一段用一对标识符分隔的文件片段,并指定以C++语法进行高亮显示。(同样支持通过行号指定片段)"
689
690 #: ../../content.rst:426 04bf027b52124b669b3b56ea50ac240d
691 msgid ""
692 "Include a raw HTML file (or an inline SVG) and put it directly into the "
693 "output without any processing:"
694 msgstr "将一HTML文件(或者一个行内SVG)直接引入,并且不进行任何处理直接将其作为输出:"
695
696 #: ../../content.rst:433 612365f02c5a471295f2f3601f0d95e9
697 msgid ""
698 "For **Markdown**, one must rely on an extension. For example, using the "
699 "`mdx_include plugin`_:"
700 msgstr "对于 **Markdown** ,若要进行文件引入,就必须使用扩展插件。例如可以使用 `mdx_include plugin`_ :"
701
702 #: ../../content.rst:443 30c87f2b5e594c24ac8ab719614c71fd
703 msgid "Importing an existing site"
704 msgstr "导入已有站点"
705
706 #: ../../content.rst:445 f0f0ccd87dcc4afebe9b7d954481eeb2
707 msgid ""
708 "It is possible to import your site from several other blogging sites "
709 "(like WordPress, Tumblr, ..) using a simple script. See :ref:`import`."
710 msgstr "您可以使用一个简单的脚本导入已有的站点(例如WordPress、Tumblr)。详见 :ref:`导入已有站点<import>` 。"
711
712 #: ../../content.rst:449 48de7111f6ec49ec8637c06e7d774f26
713 msgid "Translations"
714 msgstr "翻译"
715
716 #: ../../content.rst:451 0d1f7e6d14b746e2bb40f200c23f89a5
717 msgid ""
718 "It is possible to translate articles. To do so, you need to add a "
719 "``lang`` meta attribute to your articles/pages and set a ``DEFAULT_LANG``"
720 " setting (which is English [en] by default). With those settings in "
721 "place, only articles with the default language will be listed, and each "
722 "article will be accompanied by a list of available translations for that "
723 "article."
724 msgstr ""
725 "一篇文章可以有多个翻译版本。对于这类文章,您需要加上元数据属性 ``lang`` ,并且配置 ``DEFAULT_LANG`` "
726 "(默认为[en])。完成上述配置后,文章列表中列出的是默认语言版本的文章,文章内容页中会列出所有可用的翻译版本供读者选择。"
727
728 #: ../../content.rst:459 61df3a34ac194a2eb037c1b4e868265c
729 msgid ""
730 "This core Pelican functionality does not create sub-sites (e.g. "
731 "``example.com/de``) with translated templates for each language. For such"
732 " advanced functionality the `i18n_subsites plugin`_ can be used."
733 msgstr ""
734 "Pelican的这个核心功能并不会给同一文章的不同语言版本创建子站点(例如 ``example.com/de`` "
735 ")。但是如果需要创建子站点的话,可以使用扩展插件 `i18n_subsites plugin`_ 。"
736
737 #: ../../content.rst:464 c05ed4b06cec45248f976be0580b257c
738 msgid ""
739 "By default, Pelican uses the article's URL \"slug\" to determine if two "
740 "or more articles are translations of one another. (This can be changed "
741 "with the ``ARTICLE_TRANSLATION_ID`` setting.) The slug can be set "
742 "manually in the file's metadata; if not set explicitly, Pelican will "
743 "auto-generate the slug from the title of the article."
744 msgstr ""
745 "默认情况下,Pelican会使用文章的URL “slug” 来判断当前文档是否是同一篇文章的不同翻译版本。(这一点可以通过配置 "
746 "``ARTICLE_TRANSLATION_ID`` "
747 "来改变)slug可以通过元数据手动指定,若没有,Pelican会根据文章的标题(title)来自动生成slug。"
748
749 #: ../../content.rst:470 e448fdfd15c046fb8c641fcead12b26d
750 msgid ""
751 "Here is an example of two articles, one in English and the other in "
752 "French."
753 msgstr "以下的例子是一篇文章有英语和法语两个翻译版本的情况。"
754
755 #: ../../content.rst:472 62a186c5d6194a37b884343a858f2200
756 msgid "The English article::"
757 msgstr "英语文章如下:"
758
759 #: ../../content.rst:482 b32c5433696e4a09adb804cef323b3f1
760 msgid "And the French version::"
761 msgstr "法语版本为:"
762
763 #: ../../content.rst:492 b4d1d69ebe22462d985ebe2cfc8cd1e8
764 msgid ""
765 "Post content quality notwithstanding, you can see that only item in "
766 "common between the two articles is the slug, which is functioning here as"
767 " an identifier. If you'd rather not explicitly define the slug this way, "
768 "you must then instead ensure that the translated article titles are "
769 "identical, since the slug will be auto-generated from the article title."
770 msgstr "值得注意的是,以上两篇文章的slug是相同的,即slug作为唯一标识符存在。若您没有手动指定slug,那么请保证同一篇文章的不同翻译版本的标题是相同的。如此,由于slug会根据文章标题自动生成,它们隐含的slug会是相同的。"
771
772 #: ../../content.rst:498 2e50d70746634009a070dc41068fbc89
773 msgid ""
774 "If you do not want the original version of one specific article to be "
775 "detected by the ``DEFAULT_LANG`` setting, use the ``translation`` "
776 "metadata to specify which posts are translations::"
777 msgstr ""
778 "如果您不希望某篇文章的原始版本以 ``DEFAULT_LANG`` 翻译版本出现,可以使用 ``translation`` "
779 "元数据来指出本推文是一个非默认语言的翻译版本。(译者注:例如,设置的默认语言为zh_CN,如果某篇推文的原始版本是英文而不是中文,那么对于中文翻译版本的就可以指定其translations元数据为true,即对于该推文来说,中文版本是翻译后的版本)"
780
781 #: ../../content.rst:515 01ecf34fd1e440ea908fd181001b38b6
782 msgid "Syntax highlighting"
783 msgstr "语法高亮"
784
785 #: ../../content.rst:517 4d7eebd1886347b383ea3b1c517b821d
786 msgid ""
787 "Pelican can provide colorized syntax highlighting for your code blocks. "
788 "To do so, you must use the following conventions inside your content "
789 "files."
790 msgstr "您可以按照下面的约定在文件内容中添加代码块,Pelican可以完成五彩缤纷的语法高亮。"
791
792 #: ../../content.rst:520 5896f772fcd04f309e2188040f0bea60
793 msgid ""
794 "For reStructuredText, use the ``code-block`` directive to specify the "
795 "type of code to be highlighted (in these examples, we'll use "
796 "``python``)::"
797 msgstr "对于reStructuredText,使用 ``code-block`` 指令指定代码所使用的语言(此处以``python``为例):"
798
799 #: ../../content.rst:527 ec6ec4c325c6406ba3b00437116b84b8
800 msgid ""
801 "For Markdown, which utilizes the `CodeHilite extension`_ to provide "
802 "syntax highlighting, include the language identifier just above the code "
803 "block, indenting both the identifier and the code::"
804 msgstr "Markdown则使用 `CodeHilite extension`_ 扩展插件来完成语法高亮。在代码上方标记所用语言,同时将其与代码都进行缩进:"
805
806 #: ../../content.rst:541 58220db84e4d4ab7950dad7ad36ea1b5
807 msgid ""
808 "The specified identifier (e.g. ``python``, ``ruby``) should be one that "
809 "appears on the `list of available lexers "
810 "<https://pygments.org/docs/lexers/>`_."
811 msgstr ""
812 "指定语言的标识符(例如 ``python``、``ruby``)必须是在 `可用列表 "
813 "<https://pygments.org/docs/lexers/>`_ 中列出的。"
814
815 #: ../../content.rst:544 cb10d4bc6f4c44008ce8324df993c2ed
816 msgid ""
817 "When using reStructuredText the following options are available in the "
818 "`code-block` directive:"
819 msgstr "对于reStructuredText,下面列出的选项可以在 `code-block` 命令中使用:"
820
821 #: ../../content.rst:548 3598816f6ab54705aa545de3eb95a22c
822 msgid "Option"
823 msgstr "选项"
824
825 #: ../../content.rst:548 2861fb4a308a443c971110b5757e9d13
826 msgid "Valid values"
827 msgstr "有效值"
828
829 #: ../../content.rst:550 638a4299a7d346659254d7aa6e2485e7
830 msgid "anchorlinenos"
831 msgstr "anchorlinenos"
832
833 #: ../../content.rst:550 ../../content.rst:574 ../../content.rst:576
834 #: 0e32384143484934af18e224e414a45b 217edf5016f74e23a906623d077191ff
835 #: c6b0e9c5aa4340329b2fe203222055df
836 msgid "N/A"
837 msgstr "N/A"
838
839 #: ../../content.rst:550 e219ff4135fb45e8b27fdd71a874ffee
840 msgid "If present, wrap line numbers in ``<a>`` tags."
841 msgstr "指定行号是否显示在 <a> 标签中"
842
843 #: ../../content.rst:551 8e95919e90e14208a8150c2c52cb20b9
844 msgid "classprefix"
845 msgstr "classprefix"
846
847 #: ../../content.rst:551 ../../content.rst:559 ../../content.rst:561
848 #: ../../content.rst:570 ../../content.rst:572 ../../content.rst:577
849 #: ../../content.rst:578 96789c1cd92545b1a9153e9be1c5726d
850 #: 9e591c65044b4ca4aa876e0dd5ba94bc a1920b40389d4b25a66cb0e755389960
851 #: bee284b2086a40a4aa28bc87c916d9df cb11442c371b48349bba579e7dfce72b
852 #: e330b50a8cea43a5b55771f04fc4e688 f28e8d5bd9544ccbbcb99037c02f08cf
853 msgid "string"
854 msgstr "string"
855
856 #: ../../content.rst:551 f6d85a8a8ec74c46a313bcfb72f5283a
857 msgid "String to prepend to token class names"
858 msgstr "要添加到用于语法高亮的css类名前面的字符串"
859
860 #: ../../content.rst:552 4fd6cd04ea444c389c6f77030eb0a123
861 msgid "hl_lines"
862 msgstr "hl_lines"
863
864 #: ../../content.rst:552 aa5112c2c73e40d9940b5a21eaa1d650
865 msgid "numbers"
866 msgstr "numbers"
867
868 #: ../../content.rst:552 1b03b3add35c44eeaef4d3c31dd51fb4
869 msgid ""
870 "List of lines to be highlighted, where line numbers to highlight are "
871 "separated by a space. This is similar to ``emphasize-lines`` in Sphinx, "
872 "but it does not support a range of line numbers separated by a hyphen, or"
873 " comma-separated line numbers."
874 msgstr "需要高亮的行号列表,行号之间以空格隔开。这与Sphinx中的 ``emphasize-lines`` 类似,但是不支持使用连字符和逗号指定行号范围。"
875
876 #: ../../content.rst:559 abe7266edc704a0b857856e92fd2022b
877 msgid "lineanchors"
878 msgstr "lineanchors"
879
880 #: ../../content.rst:559 baa7634eb7e646e39698c24bc3ee82af
881 msgid "Wrap each line in an anchor using this string and -linenumber."
882 msgstr "用此处指定的字符串和 “-行号”给每一行都加上锚点。"
883
884 #: ../../content.rst:561 21ccf81937cf4fe38f556f2852524269
885 msgid "linenos"
886 msgstr "linenos"
887
888 #: ../../content.rst:561 2b1b4a9f23e448d4baaf5d36b896a5ba
889 msgid ""
890 "If present or set to \"table\", output line numbers in a table; if set to"
891 " \"inline\", output them inline. \"none\" means do not output the line "
892 "numbers for this table."
893 msgstr "开启此选项或将此选项设为“table”时,输出表格时会带上行号;如果设为“inline”,则内联输出行号;如果设为“none”,则不输出行号。"
894
895 #: ../../content.rst:566 d9813ccee6d24eae8c539fd9cc0ddd54
896 msgid "linenospecial"
897 msgstr "linenospecial"
898
899 #: ../../content.rst:566 ../../content.rst:568 ../../content.rst:569
900 #: 1eeb1f08e07e4f95a03cbeca48b422a6 bac61cf96bc3466985c9f4d5b934055b
901 #: eadc4e3c92094e589c3b931d20cd97ab
902 msgid "number"
903 msgstr "number"
904
905 #: ../../content.rst:566 ff3b3aa5e45e4a3a837400e8333f7c5a
906 msgid "If set, every nth line will be given the 'special' CSS class."
907 msgstr "是否每隔几行就设置一行特殊的css样式类。"
908
909 #: ../../content.rst:568 e32730e901bb460e975410fe26a9432f
910 msgid "linenostart"
911 msgstr "linenostart"
912
913 #: ../../content.rst:568 48d2621a74174b82a71d52a921e2f60f
914 msgid "Line number for the first line."
915 msgstr "起始行的行号。"
916
917 #: ../../content.rst:569 fcb4c1088bb04cd9ba6e4273e3013369
918 msgid "linenostep"
919 msgstr "linenostep"
920
921 #: ../../content.rst:569 1ce5e05481f84c7f84964bb1d2e3e9ae
922 msgid "Print every nth line number."
923 msgstr "每隔几行输出一次"
924
925 #: ../../content.rst:570 110dc8da76774b3ca517ad93c53fbd3f
926 msgid "lineseparator"
927 msgstr "lineseparator"
928
929 #: ../../content.rst:570 b9ba8609393c4ec8b964481ae2c66614
930 msgid "String to print between lines of code, '\\n' by default."
931 msgstr "每行输出代码之间的输出字符串,默认为 '\\n'。"
932
933 #: ../../content.rst:572 8b336c4c8e65427ebb1a89e94232199a
934 msgid "linespans"
935 msgstr "linespans"
936
937 #: ../../content.rst:572 07c2d6ca97084859b47b09237633a4ab
938 msgid "Wrap each line in a span using this and -linenumber."
939 msgstr "使用指定的字符串和“-行号”将每一行包装在一个span中。"
940
941 #: ../../content.rst:574 bd0c5e4ba73d458aa14fce20c1347910
942 msgid "nobackground"
943 msgstr "nobackground"
944
945 #: ../../content.rst:574 07672d498e2f4b6e8d4da4b5382a34f0
946 msgid "If set, do not output background color for the wrapping element"
947 msgstr "若设置,则不为元素输出背景颜色"
948
949 #: ../../content.rst:576 a054798a57814cfd9b363d7048dd9e1e
950 msgid "nowrap"
951 msgstr "nowrap"
952
953 #: ../../content.rst:576 de085518cf324de4b6d917c616e2b7dd
954 msgid "If set, do not wrap the tokens at all."
955 msgstr "若设置,则不对token进行换行处理。"
956
957 #: ../../content.rst:577 5989452c45bd4cc187e1cd1cfb88b440
958 msgid "tagsfile"
959 msgstr "tagsfile"
960
961 #: ../../content.rst:577 74b9388dcbe048ff824108bafc0bf72b
962 msgid "ctags file to use for name definitions."
963 msgstr "用于命名定义的ctags文件"
964
965 #: ../../content.rst:578 0b355baf272c4e87a18b1594b311258f
966 msgid "tagurlformat"
967 msgstr "tagurlformat"
968
969 #: ../../content.rst:578 dde5f2fd922b4b45b5eca083527dd93a
970 msgid "format for the ctag links."
971 msgstr "用于ctag链接的格式"
972
973 #: ../../content.rst:581 e034ff3a3ee44ef185f8c3aed60fc692
974 msgid ""
975 "Note that, depending on the version, your Pygments module might not have "
976 "all of these options available. Refer to the *HtmlFormatter* section of "
977 "the `Pygments documentation <https://pygments.org/docs/formatters/>`_ for"
978 " more details on each of the options."
979 msgstr ""
980 "请注意,由于版本的不同,Pygments模块可能不完全支持上述选项。请参考 `Pygments文档 "
981 "<https://pygments.org/docs/formatters/>`_ 中 *HtmlFormatter* "
982 "一节获取每个选项的详细信息。"
983
984 #: ../../content.rst:586 e7df88ffb2d4475ca19259b222d1ab3e
985 msgid ""
986 "For example, the following code block enables line numbers, starting at "
987 "153, and prefixes the Pygments CSS classes with *pgcss* to make the names"
988 " more unique and avoid possible CSS conflicts::"
989 msgstr ""
990 "举个例子,下面的代码块开启了行号显示,从153行开始输出,并且指定Pygments的CSS类以 *pgcss* "
991 "为前缀,使得类名更为独特并避免可能的CSS冲突:"
992
993 #: ../../content.rst:597 fc9b8b1fa7364ce1a274281a8e2e7237
994 msgid ""
995 "It is also possible to specify the ``PYGMENTS_RST_OPTIONS`` variable in "
996 "your Pelican settings file to include options that will be automatically "
997 "applied to every code block."
998 msgstr ""
999 "您也可以在Pelican的配置文件中指定 ``PYGMENTS_RST_OPTIONS`` "
1000 ",如此就可以让Pelican自动在每个代码块上使用指定的选项。"
1001
1002 #: ../../content.rst:601 b51dfbadd3bc42a483611d7013a87241
1003 msgid ""
1004 "For example, if you want to have line numbers displayed for every code "
1005 "block and a CSS prefix, you would set this variable to::"
1006 msgstr ""
1007 "举个例子,若您希望每个代码块都显示行号,并且在CSS类名前都加上前缀pgcss,就可以像这样设置 ``PYGMENTS_RST_OPTIONS``"
1008 " :"
1009
1010 #: ../../content.rst:606 82a9f33cc7c9493e8d8772f6c6fb63da
1011 msgid ""
1012 "If specified, settings for individual code blocks will override the "
1013 "defaults in your settings file."
1014 msgstr ""
1015 "若指定了 ``PYGMENTS_RST_OPTIONS`` ,同时也为代码块单独指定了一些选项,单独指定的会将 "
1016 "``PYGMENTS_RST_OPTIONS`` 覆盖。"
1017
1018 #: ../../content.rst:610 d2baf0b12ba148f0af9ccab86542e35f
1019 msgid "Publishing drafts"
1020 msgstr "发布草稿"
1021
1022 #: ../../content.rst:612 2ba53426b76742e6980e6700c94d3d96
1023 msgid ""
1024 "If you want to publish an article or a page as a draft (for friends to "
1025 "review before publishing, for example), you can add a ``Status: draft`` "
1026 "attribute to its metadata. That article will then be output to the "
1027 "``drafts`` folder and not listed on the index page nor on any category or"
1028 " tag page."
1029 msgstr ""
1030 "如果您想要以草稿的形式发布文章或页面(例如在正式发布前给朋友预览),可以添加元数据属性 ``Status: draft`` 。如此,文章就会输出到"
1031 " ``drafts`` 文件夹中,并且不会被列在首页、分类或是标签页面中。"
1032
1033 #: ../../content.rst:617 e3a756e1580d48378a16946caeb79c8a
1034 msgid ""
1035 "If your articles should be automatically published as a draft (to not "
1036 "accidentally publish an article before it is finished), include the "
1037 "status in the ``DEFAULT_METADATA``::"
1038 msgstr ""
1039 "若您希望文章默认以草稿形式发布(可以防止在完成文章前不小心将其正式发布),可以将此status属性加在 ``DEFAULT_METADATA`` "
1040 "中:"
1041
1042 #: ../../content.rst:625 c4b74b80b8714eb2a69d81f42f6e3e27
1043 msgid ""
1044 "To publish a post when the default status is ``draft``, update the post's"
1045 " metadata to include ``Status: published``."
1046 msgstr "要发布当前处于 ``draft`` 状态的推文,更新推文的元数据,使其中包括 ``Status: published``。"
1047
1048 #: ../../content.rst:629 f8baadb48b12467aaa1025f018ab6621
1049 msgid "Hidden Posts"
1050 msgstr "隐藏推文"
1051
1052 #: ../../content.rst:631 eb5efca86b2d4432a49703306334591a
1053 msgid ""
1054 "Like pages, posts can also be marked as ``hidden`` with the ``Status: "
1055 "hidden`` attribute. Hidden posts will be output to ``ARTICLE_SAVE_AS`` as"
1056 " expected, but are not included by default in tag, category, and author "
1057 "indexes, nor in the main article feed. This has the effect of creating an"
1058 " \"unlisted\" post."
1059 msgstr ""
1060 "和页面一样,推文也能通过 ``Status: hidden`` 标记为隐藏状态。隐藏的推文会输出到 ``ARTICLE_SAVE_AS`` "
1061 "指定的目录中,这些推文“不会被列出”,即不会在标签、分类、作者主页、feed中出现。"
1062
1063 #: ../../content.rst:637 2d67772b24bb40748d56dc3938195ce6
1064 msgid "Skip Posts"
1065 msgstr "忽略推文"
1066
1067 #: ../../content.rst:639 0c97c429a7a74ba4830851491829d63e
1068 msgid ""
1069 "Posts marked with ``skip`` status are ignored entirely. They are not "
1070 "processed nor output to the ``ARTICLE_SAVE_AS`` path. Such posts will "
1071 "similarly not be included in indexes or feeds."
1072 msgstr ""
1073 "状态设为了 ``skip`` 的推文将会被完全忽略。也就是说,他们不会被处理,也不会输出到 ``ARTICLE_SAVE_AS`` "
1074 "指定的目录中。同样,被忽略的推文不会出现在索引或者订阅源中。"