mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
Translate Quickstart
This commit is contained in:
parent
86f62d0a92
commit
683bb885c2
34 changed files with 8550 additions and 0 deletions
BIN
docs/locales/zh_CN/LC_MESSAGES/changelog.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/changelog.mo
Normal file
Binary file not shown.
1546
docs/locales/zh_CN/LC_MESSAGES/changelog.po
Normal file
1546
docs/locales/zh_CN/LC_MESSAGES/changelog.po
Normal file
File diff suppressed because it is too large
Load diff
BIN
docs/locales/zh_CN/LC_MESSAGES/content.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/content.mo
Normal file
Binary file not shown.
941
docs/locales/zh_CN/LC_MESSAGES/content.po
Normal file
941
docs/locales/zh_CN/LC_MESSAGES/content.po
Normal file
|
|
@ -0,0 +1,941 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../content.rst:2
|
||||
msgid "Writing content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:5
|
||||
msgid "Articles and pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:7
|
||||
msgid ""
|
||||
"Pelican considers \"articles\" to be chronological content, such as posts"
|
||||
" on a blog, and thus associated with a date."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:10
|
||||
msgid ""
|
||||
"The idea behind \"pages\" is that they are usually not temporal in nature"
|
||||
" and are used for content that does not change very often (e.g., "
|
||||
"\"About\" or \"Contact\" pages)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:14
|
||||
msgid "You can find sample content in the repository at ``samples/content/``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:19
|
||||
msgid "File metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:21
|
||||
msgid ""
|
||||
"Pelican tries to be smart enough to get the information it needs from the"
|
||||
" file system (for instance, about the category of your articles), but "
|
||||
"some information you need to provide in the form of metadata inside your "
|
||||
"files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:25
|
||||
msgid ""
|
||||
"If you are writing your content in reStructuredText format, you can "
|
||||
"provide this metadata in text files via the following syntax (give your "
|
||||
"file the ``.rst`` extension)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:40
|
||||
msgid ""
|
||||
"Author and tag lists may be semicolon-separated instead, which allows you"
|
||||
" to write authors and tags containing commas::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:46
|
||||
msgid ""
|
||||
"Pelican implements an extension to reStructuredText to enable support for"
|
||||
" the ``abbr`` HTML tag. To use it, write something like this in your "
|
||||
"post::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:51
|
||||
msgid ""
|
||||
"You can also use Markdown syntax (with a file ending in ``.md``, "
|
||||
"``.markdown``, ``.mkd``, or ``.mdown``). Markdown generation requires "
|
||||
"that you first explicitly install the Python-Markdown_ package, which can"
|
||||
" be done via ``pip install Markdown``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:56
|
||||
msgid ""
|
||||
"Pelican also supports `Markdown Extensions`_, which might have to be "
|
||||
"installed separately if they are not included in the default ``Markdown``"
|
||||
" package and can be configured and loaded via the ``MARKDOWN`` setting."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:60
|
||||
msgid "Metadata syntax for Markdown posts should follow this pattern::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:73
|
||||
msgid ""
|
||||
"You can also have your own metadata keys (so long as they don't conflict "
|
||||
"with reserved metadata keywords) for use in your templates. The following"
|
||||
" table contains a list of reserved metadata keywords:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:78
|
||||
msgid "Metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:78 ../../content.rst:544
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:80
|
||||
msgid "``title``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:80
|
||||
msgid "Title of the article or page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:81
|
||||
msgid "``date``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:81
|
||||
msgid "Publication date (e.g., ``YYYY-MM-DD HH:SS``)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:82
|
||||
msgid "``modified``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:82
|
||||
msgid "Modification date (e.g., ``YYYY-MM-DD HH:SS``)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:83
|
||||
msgid "``tags``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:83
|
||||
msgid "Content tags, separated by commas"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:84
|
||||
msgid "``keywords``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:84
|
||||
msgid "Content keywords, separated by commas (HTML content only)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:85
|
||||
msgid "``category``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:85
|
||||
msgid "Content category (one only — not multiple)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:86
|
||||
msgid "``slug``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:86
|
||||
msgid "Identifier used in URLs and translations"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:87
|
||||
msgid "``author``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:87
|
||||
msgid "Content author, when there is only one"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:88
|
||||
msgid "``authors``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:88
|
||||
msgid "Content authors, when there are multiple"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:89
|
||||
msgid "``summary``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:89
|
||||
msgid "Brief description of content for index pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:90
|
||||
msgid "``lang``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:90
|
||||
msgid "Content language ID (``en``, ``fr``, etc.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:91
|
||||
msgid "``translation``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:91
|
||||
msgid "If content is a translation of another (``true`` or ``false``)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:92
|
||||
msgid "``status``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:92
|
||||
msgid "Content status: ``draft``, ``hidden``, or ``published``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:93
|
||||
msgid "``template``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:93
|
||||
msgid "Name of template to use to generate content (without extension)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:94
|
||||
msgid "``save_as``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:94
|
||||
msgid "Save content to this relative file path"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:95
|
||||
msgid "``url``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:95
|
||||
msgid "URL to use for this article/page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:98
|
||||
msgid ""
|
||||
"Readers for additional formats (such as AsciiDoc_) are available via "
|
||||
"plugins. Refer to `pelican-plugins`_ repository for those."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:101
|
||||
msgid ""
|
||||
"Pelican can also process HTML files ending in ``.html`` and ``.htm``. "
|
||||
"Pelican interprets the HTML in a very straightforward manner, reading "
|
||||
"metadata from ``meta`` tags, the title from the ``title`` tag, and the "
|
||||
"body out from the ``body`` tag::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:121
|
||||
msgid ""
|
||||
"With HTML, there is one simple exception to the standard metadata: tags "
|
||||
"can be specified either via the ``tags`` metadata, as is standard in "
|
||||
"Pelican, or via the ``keywords`` metadata, as is standard in HTML. The "
|
||||
"two can be used interchangeably."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:126
|
||||
msgid ""
|
||||
"Note that, aside from the title, none of this content metadata is "
|
||||
"mandatory: if the date is not specified and ``DEFAULT_DATE`` is set to "
|
||||
"``'fs'``, Pelican will rely on the file's \"mtime\" timestamp, and the "
|
||||
"category can be determined by the directory in which the file resides. "
|
||||
"For example, a file located at ``python/foobar/myfoobar.rst`` will have a"
|
||||
" category of ``foobar``. If you would like to organize your files in "
|
||||
"other ways where the name of the subfolder would not be a good category "
|
||||
"name, you can set the setting ``USE_FOLDER_AS_CATEGORY`` to ``False``. "
|
||||
"When parsing dates given in the page metadata, Pelican supports the W3C's"
|
||||
" `suggested subset ISO 8601`__."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:136
|
||||
msgid ""
|
||||
"So the title is the only required metadata. If that bothers you, worry "
|
||||
"not. Instead of manually specifying a title in your metadata each time, "
|
||||
"you can use the source content file name as the title. For example, a "
|
||||
"Markdown source file named ``Publishing via Pelican.md`` would "
|
||||
"automatically be assigned a title of *Publishing via Pelican*. If you "
|
||||
"would prefer this behavior, add the following line to your settings "
|
||||
"file::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:147
|
||||
msgid ""
|
||||
"When experimenting with different settings (especially the metadata ones)"
|
||||
" caching may interfere and the changes may not be visible. In such cases "
|
||||
"disable caching with ``LOAD_CONTENT_CACHE = False`` or use the "
|
||||
"``--ignore-cache`` command-line switch."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:154
|
||||
msgid ""
|
||||
"``modified`` should be last time you updated the article, and defaults to"
|
||||
" ``date`` if not specified. Besides you can show ``modified`` in the "
|
||||
"templates, feed entries in feed readers will be updated automatically "
|
||||
"when you set ``modified`` to the current date after you modified your "
|
||||
"article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:159
|
||||
msgid ""
|
||||
"``authors`` is a comma-separated list of article authors. If there's only"
|
||||
" one author you can use ``author`` field."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:162
|
||||
msgid ""
|
||||
"If you do not explicitly specify summary metadata for a given post, the "
|
||||
"``SUMMARY_MAX_LENGTH`` setting can be used to specify how many words from"
|
||||
" the beginning of an article are used as the summary."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:166
|
||||
msgid ""
|
||||
"You can also extract any metadata from the filename through a regular "
|
||||
"expression to be set in the ``FILENAME_METADATA`` setting. All named "
|
||||
"groups that are matched will be set in the metadata object. The default "
|
||||
"value for the ``FILENAME_METADATA`` setting will only extract the date "
|
||||
"from the filename. For example, if you would like to extract both the "
|
||||
"date and the slug, you could set something like: "
|
||||
"``'(?P<date>\\d{4}-\\d{2}-\\d{2})_(?P<slug>.*)'``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:173
|
||||
msgid ""
|
||||
"Please note that the metadata available inside your files takes "
|
||||
"precedence over the metadata extracted from the filename."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:177
|
||||
msgid "Pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:179
|
||||
msgid ""
|
||||
"If you create a folder named ``pages`` inside the content folder, all the"
|
||||
" files in it will be used to generate static pages, such as **About** or "
|
||||
"**Contact** pages. (See example filesystem layout below.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:183
|
||||
msgid ""
|
||||
"You can use the ``DISPLAY_PAGES_ON_MENU`` setting to control whether all "
|
||||
"those pages are displayed in the primary navigation menu. (Default is "
|
||||
"``True``.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:186
|
||||
msgid ""
|
||||
"If you want to exclude any pages from being linked to or listed in the "
|
||||
"menu then add a ``status: hidden`` attribute to its metadata. This is "
|
||||
"useful for things like making error pages that fit the generated theme of"
|
||||
" your site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:191
|
||||
msgid "Static content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:193
|
||||
msgid ""
|
||||
"Static files are files other than articles and pages that are copied to "
|
||||
"the output folder as-is, without processing. You can control which static"
|
||||
" files are copied over with the ``STATIC_PATHS`` setting of the project's"
|
||||
" ``pelicanconf.py`` file. Pelican's default configuration includes the "
|
||||
"``images`` directory for this, but others must be added manually. In "
|
||||
"addition, static files that are explicitly linked to are included (see "
|
||||
"below)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:202
|
||||
msgid ""
|
||||
"In the default configuration, all files with a valid content file suffix "
|
||||
"(``.html``, ``.rst``, ``.md``, ...) get processed by the article and page"
|
||||
" generators *before* the static generator. This is avoided by altering "
|
||||
"the ``*_EXCLUDE`` settings appropriately."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:208
|
||||
msgid "Mixed content in the same directory"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:210
|
||||
msgid ""
|
||||
"Starting with Pelican 3.5, static files can safely share a source "
|
||||
"directory with page source files, without exposing the page sources in "
|
||||
"the generated site. Any such directory must be added to both "
|
||||
"``STATIC_PATHS`` and ``PAGE_PATHS`` (or ``STATIC_PATHS`` and "
|
||||
"``ARTICLE_PATHS``). Pelican will identify and process the page source "
|
||||
"files normally, and copy the remaining files as if they lived in a "
|
||||
"separate directory reserved for static files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:217
|
||||
msgid ""
|
||||
"Note: Placing static and content source files together in the same source"
|
||||
" directory does not guarantee that they will end up in the same place in "
|
||||
"the generated site. The easiest way to do this is by using the "
|
||||
"``{attach}`` link syntax (described below). Alternatively, the "
|
||||
"``STATIC_SAVE_AS``, ``PAGE_SAVE_AS``, and ``ARTICLE_SAVE_AS`` settings "
|
||||
"(and the corresponding ``*_URL`` settings) can be configured to place "
|
||||
"files of different types together, just as they could in earlier versions"
|
||||
" of Pelican."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:228
|
||||
msgid "Linking to internal content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:230
|
||||
msgid ""
|
||||
"From Pelican 3.1 onwards, it is now possible to specify intra-site links "
|
||||
"to files in the *source content* hierarchy instead of files in the "
|
||||
"*generated* hierarchy. This makes it easier to link from the current post"
|
||||
" to other content that may be sitting alongside that post (instead of "
|
||||
"having to determine where the other content will be placed after site "
|
||||
"generation)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:236
|
||||
msgid ""
|
||||
"To link to internal content (files in the ``content`` directory), use the"
|
||||
" following syntax for the link target: ``{filename}path/to/file`` Note: "
|
||||
"forward slashes, ``/``, are the required path separator in the "
|
||||
"``{filename}`` directive on all operating systems, including Windows."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:242
|
||||
msgid "For example, a Pelican project might be structured like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:253
|
||||
msgid "In this example, ``article1.rst`` could look like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:265
|
||||
msgid "and ``article2.md``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:276
|
||||
msgid "Linking to static files"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:278
|
||||
msgid ""
|
||||
"You can link to static content using ``{static}path/to/file``. Files "
|
||||
"linked to with this syntax will automatically be copied to the output "
|
||||
"directory, even if the source directories containing them are not "
|
||||
"included in the ``STATIC_PATHS`` setting of the project's "
|
||||
"``pelicanconf.py`` file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:283 ../../content.rst:318
|
||||
msgid "For example, a project's content directory might be structured like this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:293
|
||||
msgid "``test.md`` would include::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:298
|
||||
msgid ""
|
||||
"Site generation would then copy ``han.jpg`` to ``output/images/han.jpg``,"
|
||||
" ``menu.pdf`` to ``output/pdfs/menu.pdf``, and write the appropriate "
|
||||
"links in ``test.md``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:302
|
||||
msgid ""
|
||||
"If you use ``{static}`` to link to an article or a page, this will be "
|
||||
"turned into a link to its source code."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:306
|
||||
msgid "Attaching static files"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:308
|
||||
msgid ""
|
||||
"Starting with Pelican 3.5, static files can be \"attached\" to a page or "
|
||||
"article using this syntax for the link target: ``{attach}path/to/file`` "
|
||||
"This works like the ``{static}`` syntax, but also relocates the static "
|
||||
"file into the linking document's output directory. If the static file "
|
||||
"originates from a subdirectory beneath the linking document's source, "
|
||||
"that relationship will be preserved on output. Otherwise, it will become "
|
||||
"a sibling of the linking document."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:316
|
||||
msgid "This only works for linking to static files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:329
|
||||
msgid "``pelicanconf.py`` would include::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:336
|
||||
msgid "``testpost.md`` would include::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:346
|
||||
msgid ""
|
||||
"Site generation would then produce an output directory structured like "
|
||||
"this::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:356
|
||||
msgid ""
|
||||
"Notice that all the files linked using ``{attach}`` ended up in or "
|
||||
"beneath the article's output directory."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:359
|
||||
msgid ""
|
||||
"If a static file is linked multiple times, the relocating feature of "
|
||||
"``{attach}`` will only work in the first of those links to be processed. "
|
||||
"After the first link, Pelican will treat ``{attach}`` like ``{static}``. "
|
||||
"This avoids breaking the already-processed links."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:364
|
||||
msgid ""
|
||||
"**Be careful when linking to a file from multiple documents:** Since the "
|
||||
"first link to a file finalizes its location and Pelican does not define "
|
||||
"the order in which documents are processed, using ``{attach}`` on a file "
|
||||
"linked by multiple documents can cause its location to change from one "
|
||||
"site build to the next. (Whether this happens in practice will depend on "
|
||||
"the operating system, file system, version of Pelican, and documents "
|
||||
"being added, modified, or removed from the project.) Any external sites "
|
||||
"linking to the file's old location might then find their links broken. "
|
||||
"**It is therefore advisable to use {attach} only if you use it in all "
|
||||
"links to a file, and only if the linking documents share a single "
|
||||
"directory.** Under these conditions, the file's output location will not "
|
||||
"change in future builds. In cases where these precautions are not "
|
||||
"possible, consider using ``{static}`` links instead of ``{attach}``, and "
|
||||
"letting the file's location be determined by the project's "
|
||||
"``STATIC_SAVE_AS`` and ``STATIC_URL`` settings. (Per-file ``save_as`` and"
|
||||
" ``url`` overrides can still be set in ``EXTRA_PATH_METADATA``.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:381
|
||||
msgid ""
|
||||
"When using ``{attach}``, any parent directory in ``*_URL`` / "
|
||||
"``*_SAVE_AS`` settings should match each other. See also: :ref:`url-"
|
||||
"settings`"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:385
|
||||
msgid "Linking to authors, categories, index and tags"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:387
|
||||
msgid ""
|
||||
"You can link to authors, categories, index and tags using the "
|
||||
"``{author}name``, ``{category}foobar``, ``{index}`` and ``{tag}tagname`` "
|
||||
"syntax."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:391
|
||||
msgid "Deprecated internal link syntax"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:393
|
||||
msgid ""
|
||||
"To remain compatible with earlier versions, Pelican still supports "
|
||||
"vertical bars (``||``) in addition to curly braces (``{}``) for internal "
|
||||
"links. For example: ``|filename|an_article.rst``, ``|tag|tagname``, "
|
||||
"``|category|foobar``. The syntax was changed from ``||`` to ``{}`` to "
|
||||
"avoid collision with Markdown extensions or reST directives. Similarly, "
|
||||
"Pelican also still supports linking to static content with "
|
||||
"``{filename}``. The syntax was changed to ``{static}`` to allow linking "
|
||||
"to both generated articles and pages and their static sources."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:401
|
||||
msgid "Support for the old syntax may eventually be removed."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:404
|
||||
msgid "Including other files"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:405
|
||||
msgid "Both Markdown and reStructuredText syntaxes provide mechanisms for this."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:407
|
||||
msgid ""
|
||||
"Following below are some examples for **reStructuredText** using `the "
|
||||
"include directive`_:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:413
|
||||
msgid ""
|
||||
"Include a fragment of a file delimited by two identifiers, highlighted as"
|
||||
" C++ (slicing based on line numbers is also possible):"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:422
|
||||
msgid ""
|
||||
"Include a raw HTML file (or an inline SVG) and put it directly into the "
|
||||
"output without any processing:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:429
|
||||
msgid ""
|
||||
"For **Markdown**, one must rely on an extension. For example, using the "
|
||||
"`mdx_include plugin`_:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:439
|
||||
msgid "Importing an existing site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:441
|
||||
msgid ""
|
||||
"It is possible to import your site from WordPress, Tumblr, Dotclear, and "
|
||||
"RSS feeds using a simple script. See :ref:`import`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:445
|
||||
msgid "Translations"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:447
|
||||
msgid ""
|
||||
"It is possible to translate articles. To do so, you need to add a "
|
||||
"``lang`` meta attribute to your articles/pages and set a ``DEFAULT_LANG``"
|
||||
" setting (which is English [en] by default). With those settings in "
|
||||
"place, only articles with the default language will be listed, and each "
|
||||
"article will be accompanied by a list of available translations for that "
|
||||
"article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:455
|
||||
msgid ""
|
||||
"This core Pelican functionality does not create sub-sites (e.g. "
|
||||
"``example.com/de``) with translated templates for each language. For such"
|
||||
" advanced functionality the `i18n_subsites plugin`_ can be used."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:460
|
||||
msgid ""
|
||||
"By default, Pelican uses the article's URL \"slug\" to determine if two "
|
||||
"or more articles are translations of one another. (This can be changed "
|
||||
"with the ``ARTICLE_TRANSLATION_ID`` setting.) The slug can be set "
|
||||
"manually in the file's metadata; if not set explicitly, Pelican will "
|
||||
"auto-generate the slug from the title of the article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:466
|
||||
msgid ""
|
||||
"Here is an example of two articles, one in English and the other in "
|
||||
"French."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:468
|
||||
msgid "The English article::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:478
|
||||
msgid "And the French version::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:488
|
||||
msgid ""
|
||||
"Post content quality notwithstanding, you can see that only item in "
|
||||
"common between the two articles is the slug, which is functioning here as"
|
||||
" an identifier. If you'd rather not explicitly define the slug this way, "
|
||||
"you must then instead ensure that the translated article titles are "
|
||||
"identical, since the slug will be auto-generated from the article title."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:494
|
||||
msgid ""
|
||||
"If you do not want the original version of one specific article to be "
|
||||
"detected by the ``DEFAULT_LANG`` setting, use the ``translation`` "
|
||||
"metadata to specify which posts are translations::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:511
|
||||
msgid "Syntax highlighting"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:513
|
||||
msgid ""
|
||||
"Pelican can provide colorized syntax highlighting for your code blocks. "
|
||||
"To do so, you must use the following conventions inside your content "
|
||||
"files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:516
|
||||
msgid ""
|
||||
"For reStructuredText, use the ``code-block`` directive to specify the "
|
||||
"type of code to be highlighted (in these examples, we'll use "
|
||||
"``python``)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:523
|
||||
msgid ""
|
||||
"For Markdown, which utilizes the `CodeHilite extension`_ to provide "
|
||||
"syntax highlighting, include the language identifier just above the code "
|
||||
"block, indenting both the identifier and the code::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:537
|
||||
msgid ""
|
||||
"The specified identifier (e.g. ``python``, ``ruby``) should be one that "
|
||||
"appears on the `list of available lexers "
|
||||
"<https://pygments.org/docs/lexers/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:540
|
||||
msgid ""
|
||||
"When using reStructuredText the following options are available in the "
|
||||
"code-block directive:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:544
|
||||
msgid "Option"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:544
|
||||
msgid "Valid values"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:546
|
||||
msgid "anchorlinenos"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:546 ../../content.rst:570 ../../content.rst:572
|
||||
msgid "N/A"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:546
|
||||
msgid "If present wrap line numbers in <a> tags."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:547
|
||||
msgid "classprefix"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:547 ../../content.rst:555 ../../content.rst:557
|
||||
#: ../../content.rst:566 ../../content.rst:568 ../../content.rst:573
|
||||
#: ../../content.rst:574
|
||||
msgid "string"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:547
|
||||
msgid "String to prepend to token class names"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:548
|
||||
msgid "hl_lines"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:548
|
||||
msgid "numbers"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:548
|
||||
msgid ""
|
||||
"List of lines to be highlighted, where line numbers to highlight are "
|
||||
"separated by a space. This is similar to ``emphasize-lines`` in Sphinx, "
|
||||
"but it does not support a range of line numbers separated by a hyphen, or"
|
||||
" comma-separated line numbers."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:555
|
||||
msgid "lineanchors"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:555
|
||||
msgid "Wrap each line in an anchor using this string and -linenumber."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:557
|
||||
msgid "linenos"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:557
|
||||
msgid ""
|
||||
"If present or set to \"table\" output line numbers in a table, if set to "
|
||||
"\"inline\" output them inline. \"none\" means do not output the line "
|
||||
"numbers for this table."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:562
|
||||
msgid "linenospecial"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:562 ../../content.rst:564 ../../content.rst:565
|
||||
msgid "number"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:562
|
||||
msgid "If set every nth line will be given the 'special' css class."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:564
|
||||
msgid "linenostart"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:564
|
||||
msgid "Line number for the first line."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:565
|
||||
msgid "linenostep"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:565
|
||||
msgid "Print every nth line number."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:566
|
||||
msgid "lineseparator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:566
|
||||
msgid "String to print between lines of code, '\\n' by default."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:568
|
||||
msgid "linespans"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:568
|
||||
msgid "Wrap each line in a span using this and -linenumber."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:570
|
||||
msgid "nobackground"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:570
|
||||
msgid "If set do not output background color for the wrapping element"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:572
|
||||
msgid "nowrap"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:572
|
||||
msgid "If set do not wrap the tokens at all."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:573
|
||||
msgid "tagsfile"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:573
|
||||
msgid "ctags file to use for name definitions."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:574
|
||||
msgid "tagurlformat"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:574
|
||||
msgid "format for the ctag links."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:577
|
||||
msgid ""
|
||||
"Note that, depending on the version, your Pygments module might not have "
|
||||
"all of these options available. Refer to the *HtmlFormatter* section of "
|
||||
"the `Pygments documentation <https://pygments.org/docs/formatters/>`_ for"
|
||||
" more details on each of the options."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:582
|
||||
msgid ""
|
||||
"For example, the following code block enables line numbers, starting at "
|
||||
"153, and prefixes the Pygments CSS classes with *pgcss* to make the names"
|
||||
" more unique and avoid possible CSS conflicts::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:593
|
||||
msgid ""
|
||||
"It is also possible to specify the ``PYGMENTS_RST_OPTIONS`` variable in "
|
||||
"your Pelican settings file to include options that will be automatically "
|
||||
"applied to every code block."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:597
|
||||
msgid ""
|
||||
"For example, if you want to have line numbers displayed for every code "
|
||||
"block and a CSS prefix you would set this variable to::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:602
|
||||
msgid ""
|
||||
"If specified, settings for individual code blocks will override the "
|
||||
"defaults in your settings file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:606
|
||||
msgid "Publishing drafts"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:608
|
||||
msgid ""
|
||||
"If you want to publish an article or a page as a draft (for friends to "
|
||||
"review before publishing, for example), you can add a ``Status: draft`` "
|
||||
"attribute to its metadata. That article will then be output to the "
|
||||
"``drafts`` folder and not listed on the index page nor on any category or"
|
||||
" tag page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:613
|
||||
msgid ""
|
||||
"If your articles should be automatically published as a draft (to not "
|
||||
"accidentally publish an article before it is finished) include the status"
|
||||
" in the ``DEFAULT_METADATA``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:621
|
||||
msgid ""
|
||||
"To publish a post when the default status is ``draft``, update the post's"
|
||||
" metadata to include ``Status: published``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:625
|
||||
msgid "Hidden Posts"
|
||||
msgstr ""
|
||||
|
||||
#: ../../content.rst:627
|
||||
msgid ""
|
||||
"Like pages, posts can also be marked as ``hidden`` with the ``Status: "
|
||||
"hidden`` attribute. Hidden posts will be output to ``ARTICLE_SAVE_AS`` as"
|
||||
" expected, but are not included by default in tag, category, and author "
|
||||
"indexes, nor in the main article feed. This has the effect of creating an"
|
||||
" \"unlisted\" post."
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/contribute.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/contribute.mo
Normal file
Binary file not shown.
561
docs/locales/zh_CN/LC_MESSAGES/contribute.po
Normal file
561
docs/locales/zh_CN/LC_MESSAGES/contribute.po
Normal file
|
|
@ -0,0 +1,561 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../contribute.rst:2
|
||||
msgid "Contributing and feedback guidelines"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:4
|
||||
msgid ""
|
||||
"There are many ways to contribute to Pelican. You can improve the "
|
||||
"documentation, add missing features, and fix bugs (or just report them). "
|
||||
"You can also help out by reviewing and commenting on `existing issues "
|
||||
"<https://github.com/getpelican/pelican/issues>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:9
|
||||
msgid ""
|
||||
"Don't hesitate to fork Pelican and submit an issue or pull request on "
|
||||
"GitHub. When doing so, please consider the following guidelines."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:2
|
||||
msgid "Filing issues"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:4
|
||||
msgid "Before you submit a new issue, try `asking for help`_ first."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:5
|
||||
msgid ""
|
||||
"If determined to create a new issue, first search `Pelican Discussions`_ "
|
||||
"and `existing issues`_ (open and closed) to see if your question has "
|
||||
"already been answered previously."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:14
|
||||
msgid "How to get help"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:16
|
||||
msgid "Before you ask for help, please make sure you do the following:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:18
|
||||
msgid ""
|
||||
"Read the documentation_ thoroughly. If in a hurry, at least use the "
|
||||
"search field that is provided at top-left on the documentation_ pages. "
|
||||
"Make sure you read the docs for the Pelican version you are using."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:21
|
||||
msgid ""
|
||||
"Use a search engine (e.g., DuckDuckGo, Google) to search for a solution "
|
||||
"to your problem. Someone may have already found a solution, perhaps in "
|
||||
"the form of a plugin_ or a specific combination of settings."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:25
|
||||
msgid "Try reproducing the issue in a clean environment, ensuring you are using:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:27
|
||||
msgid "latest Pelican release (or an up-to-date Git clone of Pelican master)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:28
|
||||
msgid "latest releases of libraries used by Pelican"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:29
|
||||
msgid "no plugins or only those related to the issue"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:31
|
||||
msgid ""
|
||||
"**NOTE:** The most common sources of problems are anomalies in (1) "
|
||||
"themes, (2) plugins, (3) settings files, and (4) ``make``/``invoke`` "
|
||||
"automation wrappers. If you can't reproduce your problem when using the "
|
||||
"following steps to generate your site, then the problem is almost "
|
||||
"certainly with one of the above-listed elements (and not Pelican "
|
||||
"itself)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:41
|
||||
msgid ""
|
||||
"If you can generate your site without problems using the steps above, "
|
||||
"then your problem is unlikely to be caused by Pelican itself, and "
|
||||
"therefore please consider reaching out to the maintainers of the "
|
||||
"plugins/theme you are using instead of raising the topic with the Pelican"
|
||||
" core community."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:46
|
||||
msgid ""
|
||||
"If despite the above efforts you still cannot resolve your problem, be "
|
||||
"sure to include in your inquiry the following information, preferably in "
|
||||
"the form of links to content uploaded to a `paste service`_, GitHub "
|
||||
"repository, or other publicly-accessible location:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:51
|
||||
msgid ""
|
||||
"Describe what version of Pelican you are running (output of ``pelican "
|
||||
"--version`` or the HEAD commit hash if you cloned the repo) and how "
|
||||
"exactly you installed it (the full command you used, e.g. ``python -m pip"
|
||||
" install pelican``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:54
|
||||
msgid ""
|
||||
"If you are looking for a way to get some end result, prepare a detailed "
|
||||
"description of what the end result should look like (preferably in the "
|
||||
"form of an image or a mock-up page) and explain in detail what you have "
|
||||
"done so far to achieve it."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:58
|
||||
msgid ""
|
||||
"If you are trying to solve some issue, prepare a detailed description of "
|
||||
"how to reproduce the problem. If the issue cannot be easily reproduced, "
|
||||
"it cannot be debugged by developers or volunteers. Describe only the "
|
||||
"**minimum steps** necessary to reproduce it (no extra plugins, etc.)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:62
|
||||
msgid ""
|
||||
"Upload your settings file or any other custom code that would enable "
|
||||
"people to reproduce the problem or to see what you have already tried to "
|
||||
"achieve the desired end result."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:65
|
||||
msgid ""
|
||||
"Upload detailed and **complete** output logs and backtraces (remember to "
|
||||
"add the ``--debug`` flag: ``pelican --debug content [...]``)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:71
|
||||
msgid ""
|
||||
"Once the above preparation is ready, you can post your query as a new "
|
||||
"thread in `Pelican Discussions`_. Remember to include all the information"
|
||||
" you prepared."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:75
|
||||
msgid "Contributing code"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:77
|
||||
msgid ""
|
||||
"Before you submit a contribution, please ask whether it is desired so "
|
||||
"that you don't spend a lot of time working on something that would be "
|
||||
"rejected for a known reason. Consider also whether your new feature might"
|
||||
" be better suited as a plugin_ — you can `ask for help`_ to make that "
|
||||
"determination."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:83
|
||||
msgid "Using Git and GitHub"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:85
|
||||
msgid ""
|
||||
"`Create a new branch`_ specific to your change (as opposed to making your"
|
||||
" commits in the master branch)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:87
|
||||
msgid ""
|
||||
"**Don't put multiple unrelated fixes/features in the same branch / pull "
|
||||
"request.** For example, if you're working on a new feature and find a "
|
||||
"bugfix that doesn't *require* your new feature, **make a new distinct "
|
||||
"branch and pull request** for the bugfix."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:91
|
||||
msgid ""
|
||||
"Add a ``RELEASE.md`` file in the root of the project that contains the "
|
||||
"release type (major, minor, patch) and a summary of the changes that will"
|
||||
" be used as the release changelog entry. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:99
|
||||
msgid ""
|
||||
"Check for unnecessary whitespace via ``git diff --check`` before "
|
||||
"committing."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:100
|
||||
msgid ""
|
||||
"First line of your commit message should start with present-tense verb, "
|
||||
"be 50 characters or less, and include the relevant issue number(s) if "
|
||||
"applicable. *Example:* ``Ensure proper PLUGIN_PATH behavior. Refs #428.``"
|
||||
" If the commit *completely fixes* an existing bug report, please use "
|
||||
"``Fixes #585`` or ``Fix #585`` syntax (so the relevant issue is "
|
||||
"automatically closed upon PR merge)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:105
|
||||
msgid ""
|
||||
"After the first line of the commit message, add a blank line and then a "
|
||||
"more detailed explanation (when relevant)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:107
|
||||
msgid ""
|
||||
"`Squash your commits`_ to eliminate merge commits and ensure a clean and "
|
||||
"readable commit history."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:109
|
||||
msgid ""
|
||||
"If you have previously filed a GitHub issue and want to contribute code "
|
||||
"that addresses that issue, **please use** ``hub pull-request`` instead of"
|
||||
" using GitHub's web UI to submit the pull request. This isn't an absolute"
|
||||
" requirement, but makes the maintainers' lives much easier! Specifically:"
|
||||
" `install hub <https://github.com/github/hub/#installation>`_ and then "
|
||||
"run `hub pull-request -i [ISSUE] <https://hub.github.com/hub-pull-"
|
||||
"request.1.html>`_ to turn your GitHub issue into a pull request "
|
||||
"containing your code."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:116
|
||||
msgid ""
|
||||
"After you have issued a pull request, the continuous integration (CI) "
|
||||
"system will run the test suite for all supported Python versions and "
|
||||
"check for PEP8 compliance. If any of these checks fail, you should fix "
|
||||
"them. (If tests fail on the CI system but seem to pass locally, ensure "
|
||||
"that local test runs aren't skipping any tests.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:123
|
||||
msgid "Contribution quality standards"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:125
|
||||
msgid ""
|
||||
"Adhere to `PEP8 coding standards`_. This can be eased via the "
|
||||
"`pycodestyle <https://pypi.org/project/pycodestyle>`_ or `flake8 "
|
||||
"<https://pypi.org/project/flake8/>`_ tools, the latter of which in "
|
||||
"particular will give you some useful hints about ways in which the "
|
||||
"code/formatting can be improved. We try to keep line length within the "
|
||||
"79-character maximum specified by PEP8. Because that can sometimes "
|
||||
"compromise readability, the hard/enforced maximum is 88 characters."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:132
|
||||
msgid ""
|
||||
"Ensure your code is compatible with the `officially-supported Python "
|
||||
"releases`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:133
|
||||
msgid ""
|
||||
"Add docs and tests for your changes. Undocumented and untested features "
|
||||
"will not be accepted."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:135
|
||||
msgid ""
|
||||
"`Run all the tests`_ **on all versions of Python supported by Pelican** "
|
||||
"to ensure nothing was accidentally broken."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:138
|
||||
msgid ""
|
||||
"Check out our `Git Tips`_ page or `ask for help`_ if you need assistance "
|
||||
"or have any questions about these guidelines."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:15
|
||||
msgid "Setting up the development environment"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:17
|
||||
msgid ""
|
||||
"While there are many ways to set up one's development environment, the "
|
||||
"following instructions will utilize Pip_ and Poetry_. These tools "
|
||||
"facilitate managing virtual environments for separate Python projects "
|
||||
"that are isolated from one another, so you can use different packages "
|
||||
"(and package versions) for each."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:22
|
||||
msgid "Please note that Python 3.7+ is required for Pelican development."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:24
|
||||
msgid ""
|
||||
"*(Optional)* If you prefer to `install Poetry <https://python-"
|
||||
"poetry.org/docs/master/#installation>`_ once for use with multiple "
|
||||
"projects, you can install it via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:29
|
||||
msgid ""
|
||||
"Point your web browser to the `Pelican repository`_ and tap the **Fork** "
|
||||
"button at top-right. Then clone the source for your fork and add the "
|
||||
"upstream project as a Git remote::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:38
|
||||
msgid ""
|
||||
"While Poetry can dynamically create and manage virtual environments, "
|
||||
"we're going to manually create and activate a virtual environment::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:45 ../../contribute.rst:143
|
||||
msgid "Install the needed dependencies and set up the project::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:51
|
||||
msgid "Your local environment should now be ready to go!"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:58
|
||||
msgid "Development"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:60
|
||||
msgid ""
|
||||
"Once Pelican has been set up for local development, create a topic branch"
|
||||
" for your bug fix or feature::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:65
|
||||
msgid ""
|
||||
"Now you can make changes to Pelican, its documentation, and/or other "
|
||||
"aspects of the project."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:69
|
||||
msgid "Running the test suite"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:71
|
||||
msgid ""
|
||||
"Each time you make changes to Pelican, there are two things to do "
|
||||
"regarding tests: check that the existing tests pass, and add tests for "
|
||||
"any new features or bug fixes. The tests are located in "
|
||||
"``pelican/tests``, and you can run them via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:78
|
||||
msgid ""
|
||||
"In addition to running the test suite, it is important to also ensure "
|
||||
"that any lines you changed conform to code style guidelines. You can "
|
||||
"check that via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:83
|
||||
msgid ""
|
||||
"If code style violations are found in lines you changed, correct those "
|
||||
"lines and re-run the above lint command until they have all been fixed. "
|
||||
"You do not need to address style violations, if any, for code lines you "
|
||||
"did not touch."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:87
|
||||
msgid ""
|
||||
"After making your changes and running the tests, you may see a test "
|
||||
"failure mentioning that \"some generated files differ from the expected "
|
||||
"functional tests output.\" If you have made changes that affect the HTML "
|
||||
"output generated by Pelican, and the changes to that output are expected "
|
||||
"and deemed correct given the nature of your changes, then you should "
|
||||
"update the output used by the functional tests. To do so, **make sure you"
|
||||
" have both** ``en_EN.utf8`` **and** ``fr_FR.utf8`` **locales installed**,"
|
||||
" and then run the following command::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:97
|
||||
msgid ""
|
||||
"You may also find that some tests are skipped because some dependency "
|
||||
"(e.g., Pandoc) is not installed. This does not automatically mean that "
|
||||
"these tests have passed; you should at least verify that any skipped "
|
||||
"tests are not affected by your changes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:102
|
||||
msgid ""
|
||||
"You should run the test suite under each of the supported versions of "
|
||||
"Python. This is best done by creating a separate Python environment for "
|
||||
"each version. Tox_ is a useful tool to automate running tests inside "
|
||||
"``virtualenv`` environments."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:110
|
||||
msgid "Building the docs"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:112
|
||||
msgid ""
|
||||
"If you make changes to the documentation, you should build and inspect "
|
||||
"your changes before committing them::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:117
|
||||
msgid ""
|
||||
"Open http://localhost:8000 in your browser to review the documentation. "
|
||||
"While the above task is running, any changes you make and save to the "
|
||||
"documentation should automatically appear in the browser, as it live-"
|
||||
"reloads when it detects changes to the documentation source files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:123
|
||||
msgid "Plugin development"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:125
|
||||
msgid ""
|
||||
"To create a *new* Pelican plugin, please refer to the `plugin template`_ "
|
||||
"repository for detailed instructions."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:128
|
||||
msgid ""
|
||||
"If you want to contribute to an *existing* Pelican plugin, follow the "
|
||||
"steps above to set up Pelican for local development, and then create a "
|
||||
"directory to store cloned plugin repositories::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:134
|
||||
msgid ""
|
||||
"Assuming you wanted to contribute to the Simple Footnotes plugin, you "
|
||||
"would first browse to the `Simple Footnotes`_ repository on GitHub and "
|
||||
"tap the **Fork** button at top-right. Then clone the source for your fork"
|
||||
" and add the upstream project as a Git remote::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:147
|
||||
msgid "Create a topic branch for your plugin bug fix or feature::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:151
|
||||
msgid ""
|
||||
"After writing new tests for your plugin changes, run the plugin test "
|
||||
"suite and check for code style compliance via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:157
|
||||
msgid ""
|
||||
"If style violations are found, many of them can be addressed "
|
||||
"automatically via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:162
|
||||
msgid ""
|
||||
"If style violations are found even after running the above auto-"
|
||||
"formatters, you will need to make additional manual changes until "
|
||||
"``invoke lint`` no longer reports any code style violations."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:170
|
||||
msgid "Submitting your changes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:172
|
||||
msgid ""
|
||||
"Assuming linting validation and tests pass, add a ``RELEASE.md`` file in "
|
||||
"the root of the project that contains the release type (major, minor, "
|
||||
"patch) and a summary of the changes that will be used as the release "
|
||||
"changelog entry. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:181
|
||||
msgid "Commit your changes and push your topic branch::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:187
|
||||
msgid ""
|
||||
"Finally, browse to your repository fork on GitHub and submit a pull "
|
||||
"request."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:191
|
||||
msgid "Logging tips"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:193
|
||||
msgid "Try to use logging with appropriate levels."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:195
|
||||
msgid "For logging messages that are not repeated, use the usual Python way::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:204
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Do not format log messages yourself. Use ``%s`` formatting in messages "
|
||||
"and pass arguments to logger. This is important, because the Pelican "
|
||||
"logger will preprocess some arguments, such as exceptions."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:209
|
||||
msgid "Limiting extraneous log messages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:211
|
||||
msgid ""
|
||||
"If the log message can occur several times, you may want to limit the log"
|
||||
" to prevent flooding. In order to do that, use the ``extra`` keyword "
|
||||
"argument for the logging message in the following format::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:218
|
||||
msgid ""
|
||||
"Optionally, you can also set ``'limit_args'`` as a tuple of arguments in "
|
||||
"``extra`` dict if your generic message needs formatting."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:221
|
||||
msgid ""
|
||||
"Limit is set to ``5``, i.e, first four logs with the same ``'limit_msg'``"
|
||||
" are outputted normally but the fifth one will be logged using "
|
||||
"``'limit_msg'`` (and ``'limit_args'`` if present). After the fifth, "
|
||||
"corresponding log messages will be ignored."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:226
|
||||
msgid ""
|
||||
"For example, if you want to log missing resources, use the following "
|
||||
"code::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:234
|
||||
msgid "The log messages will be displayed as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:244
|
||||
msgid "Outputting traceback in the logs"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:246
|
||||
msgid ""
|
||||
"If you're logging inside an ``except`` block, you may want to provide the"
|
||||
" traceback information as well. You can do that by setting ``exc_info`` "
|
||||
"keyword argument to ``True`` during logging. However, doing so by default"
|
||||
" can be undesired because tracebacks are long and can be confusing to "
|
||||
"regular users. Try to limit them to ``--debug`` mode like the following::"
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/faq.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/faq.mo
Normal file
Binary file not shown.
408
docs/locales/zh_CN/LC_MESSAGES/faq.po
Normal file
408
docs/locales/zh_CN/LC_MESSAGES/faq.po
Normal file
|
|
@ -0,0 +1,408 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../faq.rst:2
|
||||
msgid "Frequently Asked Questions (FAQ)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:4
|
||||
msgid "Here are some frequently asked questions about Pelican."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:7
|
||||
msgid "What's the best way to communicate a problem, question, or suggestion?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:9
|
||||
msgid "Please read our :doc:`feedback guidelines <contribute>`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:12
|
||||
msgid "How can I help?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:14
|
||||
msgid ""
|
||||
"There are several ways to help out. First, you can communicate any "
|
||||
"Pelican suggestions or problems you might have via `Pelican Discussions "
|
||||
"<https://github.com/getpelican/pelican/discussions>`_. Please first check"
|
||||
" the existing list of discussions and issues (both open and closed) in "
|
||||
"order to avoid submitting topics that have already been covered before."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:20
|
||||
msgid ""
|
||||
"If you want to contribute, please fork `the git repository "
|
||||
"<https://github.com/getpelican/pelican/>`_, create a new feature branch, "
|
||||
"make your changes, and issue a pull request. Someone will review your "
|
||||
"changes as soon as possible. Please refer to the :doc:`How to Contribute "
|
||||
"<contribute>` section for more details."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:26
|
||||
msgid ""
|
||||
"You can also contribute by creating themes and improving the "
|
||||
"documentation."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:29
|
||||
msgid "Is the Pelican settings file mandatory?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:31
|
||||
msgid ""
|
||||
"Configuration files are optional and are just an easy way to configure "
|
||||
"Pelican. For basic operations, it's possible to specify options while "
|
||||
"invoking Pelican via the command line. See ``pelican --help`` for more "
|
||||
"information."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:36
|
||||
msgid "Changes to the settings file take no effect"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:38
|
||||
msgid ""
|
||||
"When experimenting with different settings (especially the metadata ones)"
|
||||
" caching may interfere and the changes may not be visible. In such cases,"
|
||||
" ensure that caching is disabled via ``LOAD_CONTENT_CACHE = False`` or "
|
||||
"use the ``--ignore-cache`` command-line switch."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:44
|
||||
msgid "I'm creating my own theme. How do I use Pygments for syntax highlighting?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:46
|
||||
msgid ""
|
||||
"Pygments adds some classes to the generated content. These classes are "
|
||||
"used by themes to style code syntax highlighting via CSS. Specifically, "
|
||||
"you can customize the appearance of your syntax highlighting via the "
|
||||
"``.highlight pre`` class in your theme's CSS file. To see how various "
|
||||
"styles can be used to render Django code, for example, use the style "
|
||||
"selector drop-down at top-right on the `Pygments project demo site "
|
||||
"<https://pygments.org/demo/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:53
|
||||
msgid ""
|
||||
"You can use the following example commands to generate a starting CSS "
|
||||
"file from a Pygments built-in style (in this case, \"monokai\") and then "
|
||||
"copy the generated CSS file to your new theme::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:60
|
||||
msgid "Don't forget to import your ``pygment.css`` file from your main CSS file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:63
|
||||
msgid "How do I create my own theme?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:65
|
||||
msgid "Please refer to :ref:`theming-pelican`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:68
|
||||
msgid "I want to use Markdown, but I got an error."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:70
|
||||
msgid ""
|
||||
"If you try to generate Markdown content without first installing the "
|
||||
"Markdown library, may see a message that says ``No valid files found in "
|
||||
"content``. Markdown is not a hard dependency for Pelican, so if you have "
|
||||
"content in Markdown format, you will need to explicitly install the "
|
||||
"Markdown library. You can do so by typing the following command, "
|
||||
"prepending ``sudo`` if permissions require it::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:80
|
||||
msgid "Can I use arbitrary metadata in my templates?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:82
|
||||
msgid ""
|
||||
"Yes. For example, to include a modified date in a Markdown post, one "
|
||||
"could include the following at the top of the article::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:87
|
||||
msgid ""
|
||||
"For reStructuredText, this metadata should of course be prefixed with a "
|
||||
"colon::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:91
|
||||
msgid ""
|
||||
"This metadata can then be accessed in templates such as ``article.html`` "
|
||||
"via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:97
|
||||
msgid ""
|
||||
"If you want to include metadata in templates outside the article context "
|
||||
"(e.g., ``base.html``), the ``if`` statement should instead be::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:103
|
||||
msgid "How do I assign custom templates on a per-page basis?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:105
|
||||
msgid ""
|
||||
"It's as simple as adding an extra line of metadata to any page or article"
|
||||
" that you want to have its own template. For example, this is how it "
|
||||
"would be handled for content in reST format::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:111
|
||||
msgid "For content in Markdown format::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:115
|
||||
msgid ""
|
||||
"Then just make sure your theme contains the relevant template file (e.g. "
|
||||
"``template_name.html``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:119
|
||||
msgid "How can I override the generated URL of a specific page or article?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:121
|
||||
msgid ""
|
||||
"Include ``url`` and ``save_as`` metadata in any pages or articles that "
|
||||
"you want to override the generated URL. Here is an example page in reST "
|
||||
"format::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:130
|
||||
msgid ""
|
||||
"With this metadata, the page will be written to "
|
||||
"``override/url/index.html`` and Pelican will use url ``override/url/`` to"
|
||||
" link to this page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:134
|
||||
msgid "How can I use a static page as my home page?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:136
|
||||
msgid ""
|
||||
"The override feature mentioned above can be used to specify a static page"
|
||||
" as your home page. The following Markdown example could be stored in "
|
||||
"``content/pages/home.md``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:146
|
||||
msgid ""
|
||||
"If the original blog index is still wanted, it can then be saved in a "
|
||||
"different location by setting ``INDEX_SAVE_AS = 'blog_index.html'`` for "
|
||||
"the ``'index'`` direct template."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:151
|
||||
msgid "What if I want to disable feed generation?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:153
|
||||
msgid ""
|
||||
"To disable feed generation, all feed settings should be set to ``None``. "
|
||||
"All but three feed settings already default to ``None``, so if you want "
|
||||
"to disable all feed generation, you only need to specify the following "
|
||||
"settings::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:163
|
||||
msgid ""
|
||||
"The word ``None`` should not be surrounded by quotes. Please note that "
|
||||
"``None`` and ``''`` are not the same thing."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:167
|
||||
msgid ""
|
||||
"I'm getting a warning about feeds generated without SITEURL being set "
|
||||
"properly"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:169
|
||||
msgid ""
|
||||
"`RSS and Atom feeds require all URL links to be absolute "
|
||||
"<https://validator.w3.org/feed/docs/rss2.html#comments>`_. In order to "
|
||||
"properly generate links in Pelican you will need to set ``SITEURL`` to "
|
||||
"the full path of your site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:174
|
||||
msgid ""
|
||||
"Feeds are still generated when this warning is displayed, but links "
|
||||
"within may be malformed and thus the feed may not validate."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:178
|
||||
msgid "Can I force Atom feeds to show only summaries instead of article content?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:180
|
||||
msgid ""
|
||||
"Instead of having to open a separate browser window to read articles, the"
|
||||
" overwhelming majority of folks who use feed readers prefer to read "
|
||||
"content within the feed reader itself. Mainly for that reason, Pelican "
|
||||
"does not support restricting Atom feeds to only contain summaries. Unlike"
|
||||
" Atom feeds, the RSS feed specification does not include a separate "
|
||||
"``content`` field, so by default Pelican publishes RSS feeds that only "
|
||||
"contain summaries (but can optionally be set to instead publish full "
|
||||
"content RSS feeds). So the default feed generation behavior provides "
|
||||
"users with a choice: subscribe to Atom feeds for full content or to RSS "
|
||||
"feeds for just the summaries."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:191
|
||||
msgid "Is Pelican only suitable for blogs?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:193
|
||||
msgid ""
|
||||
"No. Pelican can be easily configured to create and maintain any type of "
|
||||
"static site. This may require a little customization of your theme and "
|
||||
"Pelican configuration. For example, if you are building a launch site for"
|
||||
" your product and do not need tags on your site, you could remove the "
|
||||
"relevant HTML code from your theme. You can also disable generation of "
|
||||
"tag-related pages via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:203
|
||||
msgid ""
|
||||
"Why does Pelican always write all HTML files even with content caching "
|
||||
"enabled?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:205
|
||||
msgid ""
|
||||
"In order to reliably determine whether the HTML output is different "
|
||||
"before writing it, a large part of the generation environment including "
|
||||
"the template contexts, imported plugins, etc. would have to be saved and "
|
||||
"compared, at least in the form of a hash (which would require special "
|
||||
"handling of unhashable types), because of all the possible combinations "
|
||||
"of plugins, pagination, etc. which may change in many different ways. "
|
||||
"This would require a lot more processing time and memory and storage "
|
||||
"space. Simply writing the files each time is a lot faster and a lot more "
|
||||
"reliable."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:214
|
||||
msgid ""
|
||||
"However, this means that the modification time of the files changes every"
|
||||
" time, so a ``rsync`` based upload will transfer them even if their "
|
||||
"content hasn't changed. A simple solution is to make ``rsync`` use the "
|
||||
"``--checksum`` option, which will make it compare the file checksums in a"
|
||||
" much faster way than Pelican would."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:220
|
||||
msgid ""
|
||||
"When only several specific output files are of interest (e.g. when "
|
||||
"working on some specific page or the theme templates), the "
|
||||
"``WRITE_SELECTED`` option may help, see "
|
||||
":ref:`writing_only_selected_content`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:225
|
||||
msgid "How to process only a subset of all articles?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:227
|
||||
msgid ""
|
||||
"It is often useful to process only e.g. 10 articles for debugging "
|
||||
"purposes. This can be achieved by explicitly specifying only the "
|
||||
"filenames of those articles in ``ARTICLE_PATHS``. A list of such "
|
||||
"filenames could be found using a command similar to ``cd content; find "
|
||||
"-name '*.md' | head -n 10``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:233
|
||||
msgid "My tag-cloud is missing/broken since I upgraded Pelican"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:235
|
||||
msgid ""
|
||||
"In an ongoing effort to streamline Pelican, tag cloud generation has been"
|
||||
" moved out of Pelican core and into a separate `plugin "
|
||||
"<https://github.com/pelican-plugins/tag-cloud>`_. See the :ref:`plugins` "
|
||||
"documentation for further information about the Pelican plugin system."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:241
|
||||
msgid "Since I upgraded Pelican my pages are no longer rendered"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:243
|
||||
msgid ""
|
||||
"Pages were available to themes as lowercase ``pages`` and uppercase "
|
||||
"``PAGES``. To bring this inline with the :ref:`templates-variables` "
|
||||
"section, ``PAGES`` has been removed. This is quickly resolved by updating"
|
||||
" your theme to iterate over ``pages`` instead of ``PAGES``. Just "
|
||||
"replace::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:250
|
||||
msgid "with something like::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:255
|
||||
msgid "How can I stop Pelican from trying to parse my static files as content?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:257
|
||||
msgid ""
|
||||
"Pelican's article and page generators run before it's static generator. "
|
||||
"That means if you use a setup similar to the default configuration, where"
|
||||
" a static source directory is defined inside a ``*_PATHS`` setting, all "
|
||||
"files that have a valid content file ending (``.html``, ``.rst``, "
|
||||
"``.md``, ...) will be treated as articles or pages before they get "
|
||||
"treated as static files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:263
|
||||
msgid ""
|
||||
"To circumvent this issue either use the appropriate ``*_EXCLUDES`` "
|
||||
"setting or disable the offending reader via ``READERS`` if you don't need"
|
||||
" it."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:267
|
||||
msgid "Why is [arbitrary Markdown syntax] not supported?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:269
|
||||
msgid ""
|
||||
"Pelican does not directly handle Markdown processing and instead "
|
||||
"delegates that task to the Python-Markdown_ project, the core of which "
|
||||
"purposefully follows the original Markdown syntax rules and not the "
|
||||
"myriad Markdown \"flavors\" that have subsequently propagated. That said,"
|
||||
" Python-Markdown_ is quite modular, and the syntax you are looking for "
|
||||
"may be provided by one of the many available `Markdown Extensions`_. "
|
||||
"Alternatively, some folks have created Pelican plugins that support "
|
||||
"Markdown variants, so that may be your best choice if there is a "
|
||||
"particular variant you want to use when writing your content."
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/importer.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/importer.mo
Normal file
Binary file not shown.
277
docs/locales/zh_CN/LC_MESSAGES/importer.po
Normal file
277
docs/locales/zh_CN/LC_MESSAGES/importer.po
Normal file
|
|
@ -0,0 +1,277 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../importer.rst:4
|
||||
msgid "Importing an existing site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:7
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:9
|
||||
msgid ""
|
||||
"``pelican-import`` is a command-line tool for converting articles from "
|
||||
"other software to reStructuredText or Markdown. The supported import "
|
||||
"formats are:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:12
|
||||
msgid "Blogger XML export"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:13
|
||||
msgid "Dotclear export"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:14
|
||||
msgid "Posterous API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:15
|
||||
msgid "Tumblr API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:16
|
||||
msgid "WordPress XML export"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:17
|
||||
msgid "RSS/Atom feed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:19
|
||||
msgid ""
|
||||
"The conversion from HTML to reStructuredText or Markdown relies on "
|
||||
"`Pandoc`_. For Dotclear, if the source posts are written with Markdown "
|
||||
"syntax, they will not be converted (as Pelican also supports Markdown)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:25
|
||||
msgid ""
|
||||
"Unlike Pelican, Wordpress supports multiple categories per article. These"
|
||||
" are imported as a comma-separated string. You have to resolve these "
|
||||
"manually, or use a plugin such as `More Categories`_ that enables "
|
||||
"multiple categories per article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:31
|
||||
msgid "Dependencies"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:33
|
||||
msgid ""
|
||||
"``pelican-import`` has some dependencies not required by the rest of "
|
||||
"Pelican:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:35
|
||||
msgid ""
|
||||
"*BeautifulSoup4* and *lxml*, for WordPress and Dotclear import. Can be "
|
||||
"installed like any other Python package (``pip install BeautifulSoup4 "
|
||||
"lxml``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:38
|
||||
msgid "*Feedparser*, for feed import (``pip install feedparser``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:39
|
||||
msgid ""
|
||||
"*Pandoc*, see the `Pandoc site`_ for installation instructions on your "
|
||||
"operating system."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:47
|
||||
msgid "Usage"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:57
|
||||
msgid "Positional arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:59
|
||||
msgid "``input``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:59
|
||||
msgid "The input file to read"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:60
|
||||
msgid "``api_token``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:60
|
||||
msgid "(Posterous only) api_token can be obtained from http://posterous.com/api/"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:61
|
||||
msgid "``api_key``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:61
|
||||
msgid ""
|
||||
"(Tumblr only) api_key can be obtained from "
|
||||
"https://www.tumblr.com/oauth/apps"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:65
|
||||
msgid "Optional arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:67
|
||||
msgid "Show this help message and exit"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:68
|
||||
msgid "Blogger XML export (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:69
|
||||
msgid "Dotclear export (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:70
|
||||
msgid "Posterous API (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:71
|
||||
msgid "Tumblr API (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:72
|
||||
msgid "WordPress XML export (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:73
|
||||
msgid "Feed to parse (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:75
|
||||
msgid "Output path (default: content)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:77
|
||||
msgid ""
|
||||
"Output markup format: ``rst``, ``markdown``, or ``asciidoc`` (default: "
|
||||
"``rst``)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:79
|
||||
msgid "Put files in directories with categories name (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:81
|
||||
msgid ""
|
||||
"Put files recognised as pages in \"pages/\" sub- directory (blogger and "
|
||||
"wordpress import only) (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:84
|
||||
msgid "Import only post from the specified author"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:85
|
||||
msgid ""
|
||||
"Strip raw HTML code that can't be converted to markup such as flash "
|
||||
"embeds or iframes (wordpress import only) (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:88
|
||||
msgid ""
|
||||
"Put wordpress custom post types in directories. If used with --dir-cat "
|
||||
"option directories will be created as \"/post_type/category/\" (wordpress"
|
||||
" import only)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:91
|
||||
msgid ""
|
||||
"Download files uploaded to wordpress as attachments. Files will be added "
|
||||
"to posts as a list in the post header and links to the files within the "
|
||||
"post will be updated. All files will be downloaded, even if they aren't "
|
||||
"associated with a post. Files will be downloaded with their original path"
|
||||
" inside the output directory, e.g. \"output/wp-"
|
||||
"uploads/date/postname/file.jpg\". (wordpress import only) (requires an "
|
||||
"internet connection)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:100
|
||||
msgid ""
|
||||
"Disable storing slugs from imported posts within output. With this "
|
||||
"disabled, your Pelican URLs may not be consistent with your original "
|
||||
"posts. (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:105
|
||||
msgid "Email used to authenticate Posterous API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:107
|
||||
msgid "Password used to authenticate Posterous API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:109
|
||||
msgid "Blog name used in Tumblr API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:113
|
||||
msgid "Examples"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:115
|
||||
msgid "For Blogger::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:119
|
||||
msgid "For Dotclear::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:123
|
||||
msgid "for Posterous::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:127
|
||||
msgid "For Tumblr::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:131
|
||||
msgid "For WordPress::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:136
|
||||
msgid "Tests"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:138
|
||||
msgid "To test the module, one can use sample files:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:140
|
||||
msgid ""
|
||||
"for WordPress: https://www.wpbeginner.com/wp-themes/how-to-add-dummy-"
|
||||
"content-for-theme-development-in-wordpress/"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:141
|
||||
msgid "for Dotclear: http://media.dotaddict.org/tda/downloads/lorem-backup.txt"
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/index.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/index.mo
Normal file
Binary file not shown.
133
docs/locales/zh_CN/LC_MESSAGES/index.po
Normal file
133
docs/locales/zh_CN/LC_MESSAGES/index.po
Normal file
|
|
@ -0,0 +1,133 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../index.rst:2
|
||||
msgid "Pelican |release|"
|
||||
msgstr "Pelican |release|"
|
||||
|
||||
#: ../../index.rst:13
|
||||
msgid ""
|
||||
"Pelican is a static site generator, written in Python_. Highlights "
|
||||
"include:"
|
||||
msgstr "Pelican是一个用 Python_ 写的静态站点生成器,"
|
||||
"它有诸多亮点:"
|
||||
|
||||
#: ../../index.rst:15
|
||||
msgid ""
|
||||
"Write your content directly with your editor of choice in "
|
||||
"reStructuredText_ or Markdown_ formats"
|
||||
msgstr "你可以直接在自己的编辑器中用 reStructuredText_ 或 Markdown_ 完成内容创作"
|
||||
|
||||
#: ../../index.rst:17
|
||||
msgid "Includes a simple CLI tool to (re)generate your site"
|
||||
msgstr "自带了一个简单的命令行工具,你可以用它来生成你的站点"
|
||||
|
||||
#: ../../index.rst:18
|
||||
msgid "Easy to interface with distributed version control systems and web hooks"
|
||||
msgstr "易于和分布式版本控制系统和webhook连接"
|
||||
|
||||
#: ../../index.rst:19
|
||||
msgid "Completely static output is easy to host anywhere"
|
||||
msgstr "生成的站点是完全静态的,可以在任何主机上轻松地部署"
|
||||
|
||||
#: ../../index.rst:21
|
||||
msgid "Ready to get started? Check out the :doc:`Quickstart<quickstart>` guide."
|
||||
msgstr "准备好开始体验了吗?请查看 :doc:`快速入门<quickstart>` 指南。"
|
||||
|
||||
#: ../../index.rst:24
|
||||
msgid "Features"
|
||||
msgstr "特性"
|
||||
|
||||
#: ../../index.rst:26
|
||||
msgid "Pelican’s feature highlights include:"
|
||||
msgstr "Pelican在特性上也有很多亮点:"
|
||||
|
||||
#: ../../index.rst:28
|
||||
msgid ""
|
||||
"Articles (e.g., blog posts) and pages (e.g., \"About\", \"Projects\", "
|
||||
"\"Contact\")"
|
||||
msgstr "可以生成文章(例如博客推文)和页面(例如“关于”、“联系我们”、“项目”)"
|
||||
|
||||
#: ../../index.rst:29
|
||||
msgid "Integration with external services"
|
||||
msgstr "可以和外部服务集成"
|
||||
|
||||
#: ../../index.rst:30
|
||||
msgid "Site themes (created using Jinja2_ templates)"
|
||||
msgstr "可以使用主题(主题使用 Jinja2_ 模板引擎创建的)"
|
||||
|
||||
#: ../../index.rst:31
|
||||
msgid "Publication of articles in multiple languages"
|
||||
msgstr "可以发布多语言文章(可切换语言)"
|
||||
|
||||
#: ../../index.rst:32
|
||||
msgid "Generation of Atom and RSS feeds"
|
||||
msgstr "可以生成Atom和Rss feeds"
|
||||
|
||||
#: ../../index.rst:33
|
||||
msgid "Code syntax highlighting"
|
||||
msgstr "可以显示代码高亮"
|
||||
|
||||
#: ../../index.rst:34
|
||||
msgid "Import existing content from WordPress, Dotclear, or RSS feeds"
|
||||
msgstr "可以从WordPress、Dotclear或Rss feeds导入已有的内容"
|
||||
|
||||
#: ../../index.rst:35
|
||||
msgid "Fast rebuild times thanks to content caching and selective output writing"
|
||||
msgstr "得益于内容缓存和选择性生成,可以快速的重新生成站点"
|
||||
|
||||
#: ../../index.rst:36
|
||||
msgid "Extensible via a rich plugin ecosystem: `Pelican Plugins`_"
|
||||
msgstr "可扩展性强,有丰富的插件生态: `Pelican Plugins`_"
|
||||
|
||||
#: ../../index.rst:39
|
||||
msgid "Why the name \"Pelican\"?"
|
||||
msgstr "为什么叫做“Pelican”?"
|
||||
|
||||
#: ../../index.rst:41
|
||||
msgid ""
|
||||
"\"Pelican\" is an anagram for *calepin*, which means \"notebook\" in "
|
||||
"French. ;)"
|
||||
msgstr "“Pelican”是法语词笔记本 *calepin* 读音的回文。;)"
|
||||
|
||||
#: ../../index.rst:44
|
||||
msgid "Source code"
|
||||
msgstr "源码"
|
||||
|
||||
#: ../../index.rst:46
|
||||
msgid "You can access the source code at: https://github.com/getpelican/pelican"
|
||||
msgstr "在这里可以获取Pelican的源码: https://github.com/getpelican/pelican"
|
||||
|
||||
#: ../../index.rst:49
|
||||
msgid "How to get help, contribute, or provide feedback"
|
||||
msgstr "如何获取帮助、贡献内容或是提供反馈"
|
||||
|
||||
#: ../../index.rst:51
|
||||
msgid ""
|
||||
"See our :doc:`feedback and contribution submission guidelines "
|
||||
"<contribute>`."
|
||||
msgstr "请查看文档 :doc:`反馈意见和贡献的提交指南 "
|
||||
"<contribute>`。"
|
||||
|
||||
#: ../../index.rst:54
|
||||
msgid "Documentation"
|
||||
msgstr "文档"
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/install.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/install.mo
Normal file
Binary file not shown.
205
docs/locales/zh_CN/LC_MESSAGES/install.po
Normal file
205
docs/locales/zh_CN/LC_MESSAGES/install.po
Normal file
|
|
@ -0,0 +1,205 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../install.rst:2
|
||||
msgid "Installing Pelican"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:4
|
||||
msgid ""
|
||||
"Pelican currently runs best on 3.7+; earlier versions of Python are not "
|
||||
"supported."
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:6
|
||||
msgid ""
|
||||
"You can install Pelican via several different methods. The simplest is "
|
||||
"via Pip_::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:10
|
||||
msgid "Or, if you plan on using Markdown::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:14
|
||||
msgid ""
|
||||
"(Keep in mind that some operating systems will require you to prefix the "
|
||||
"above command with ``sudo`` in order to install Pelican system-wide.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:17
|
||||
msgid ""
|
||||
"While the above is the simplest method, the recommended approach is to "
|
||||
"create a virtual environment for Pelican via virtualenv_ before "
|
||||
"installing Pelican. Assuming you have virtualenv_ installed, you can then"
|
||||
" open a new terminal session and create a new virtual environment for "
|
||||
"Pelican::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:26
|
||||
msgid ""
|
||||
"Once the virtual environment has been created and activated, Pelican can "
|
||||
"be installed via ``python -m pip install pelican`` as noted above. "
|
||||
"Alternatively, if you have the project source, you can install Pelican "
|
||||
"using the distutils method::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:33
|
||||
msgid ""
|
||||
"If you have Git installed and prefer to install the latest bleeding-edge "
|
||||
"version of Pelican rather than a stable release, use the following "
|
||||
"command::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:38
|
||||
msgid ""
|
||||
"Once Pelican is installed, you can run ``pelican --help`` to see basic "
|
||||
"usage options. For more detail, refer to the :doc:`Publish<publish>` "
|
||||
"section."
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:42
|
||||
msgid "Optional packages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:44
|
||||
msgid ""
|
||||
"If you plan on using `Markdown <https://pypi.org/project/Markdown/>`_ as "
|
||||
"a markup format, you can install Pelican with Markdown support::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:49
|
||||
msgid ""
|
||||
"Typographical enhancements can be enabled in your settings file, but "
|
||||
"first the requisite `Typogrify <https://pypi.org/project/typogrify/>`_ "
|
||||
"library must be installed::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:56
|
||||
msgid "Dependencies"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:58
|
||||
msgid ""
|
||||
"When Pelican is installed, the following dependent Python packages should"
|
||||
" be automatically installed without any action on your part:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:61
|
||||
msgid ""
|
||||
"`feedgenerator <https://pypi.org/project/feedgenerator/>`_, to generate "
|
||||
"the Atom feeds"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:63
|
||||
msgid "`jinja2 <https://pypi.org/project/Jinja2/>`_, for templating support"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:64
|
||||
msgid "`pygments <https://pypi.org/project/Pygments/>`_, for syntax highlighting"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:65
|
||||
msgid ""
|
||||
"`docutils <https://pypi.org/project/docutils/>`_, for supporting "
|
||||
"reStructuredText as an input format"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:67
|
||||
msgid "`pytz <https://pypi.org/project/pytz/>`_, for timezone definitions"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:68
|
||||
msgid ""
|
||||
"`blinker <https://pypi.org/project/blinker/>`_, an object-to-object and "
|
||||
"broadcast signaling system"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:70
|
||||
msgid ""
|
||||
"`unidecode <https://pypi.org/project/Unidecode/>`_, for ASCII "
|
||||
"transliterations of Unicode text utilities"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:73
|
||||
msgid ""
|
||||
"`MarkupSafe <https://pypi.org/project/MarkupSafe/>`_, for a markup-safe "
|
||||
"string implementation"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:75
|
||||
msgid ""
|
||||
"`python-dateutil <https://pypi.org/project/python-dateutil/>`_, to read "
|
||||
"the date metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:79
|
||||
msgid "Upgrading"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:81
|
||||
msgid ""
|
||||
"If you installed a stable Pelican release via Pip_ and wish to upgrade to"
|
||||
" the latest stable release, you can do so by adding ``--upgrade``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:86
|
||||
msgid ""
|
||||
"If you installed Pelican via distutils or the bleeding-edge method, "
|
||||
"simply perform the same step to install the most recent version."
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:90
|
||||
msgid "Kickstart your site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:92
|
||||
msgid ""
|
||||
"Once Pelican has been installed, you can create a skeleton project via "
|
||||
"the ``pelican-quickstart`` command, which begins by asking some questions"
|
||||
" about your site::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:98
|
||||
msgid ""
|
||||
"If run inside an activated virtual environment, ``pelican-quickstart`` "
|
||||
"will look for an associated project path inside "
|
||||
"``$VIRTUAL_ENV/.project``. If that file exists and contains a valid "
|
||||
"directory path, the new Pelican project will be saved at that location. "
|
||||
"Otherwise, the default is the current working directory. To set the new "
|
||||
"project path on initial invocation, use: ``pelican-quickstart --path "
|
||||
"/your/desired/directory``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:105
|
||||
msgid ""
|
||||
"Once you finish answering all the questions, your project will consist of"
|
||||
" the following hierarchy (except for *pages* — shown in parentheses below"
|
||||
" — which you can optionally add yourself if you plan to create non-"
|
||||
"chronological content)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../install.rst:119
|
||||
msgid ""
|
||||
"The next step is to begin to adding content to the *content* folder that "
|
||||
"has been created for you."
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/internals.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/internals.mo
Normal file
Binary file not shown.
145
docs/locales/zh_CN/LC_MESSAGES/internals.po
Normal file
145
docs/locales/zh_CN/LC_MESSAGES/internals.po
Normal file
|
|
@ -0,0 +1,145 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../internals.rst:2
|
||||
msgid "Pelican internals"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:4
|
||||
msgid ""
|
||||
"This section describe how Pelican works internally. As you'll see, it's "
|
||||
"quite simple, but a bit of documentation doesn't hurt. :)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:7
|
||||
msgid ""
|
||||
"You can also find in the :doc:`report` section an excerpt of a report the"
|
||||
" original author wrote with some software design information."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:13
|
||||
msgid "Overall structure"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:15
|
||||
msgid ""
|
||||
"What Pelican does is take a list of files and process them into some sort"
|
||||
" of output. Usually, the input files are reStructuredText and Markdown "
|
||||
"files, and the output is a blog, but both input and output can be "
|
||||
"anything you want."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:19
|
||||
msgid "The logic is separated into different classes and concepts:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:21
|
||||
msgid ""
|
||||
"**Writers** are responsible for writing files: .html files, RSS feeds, "
|
||||
"and so on. Since those operations are commonly used, the object is "
|
||||
"created once and then passed to the generators."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:25
|
||||
msgid ""
|
||||
"**Readers** are used to read from various formats (HTML, Markdown and "
|
||||
"reStructuredText for now, but the system is extensible). Given a file, "
|
||||
"they return metadata (author, tags, category, etc.) and content (HTML-"
|
||||
"formatted)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:29
|
||||
msgid ""
|
||||
"**Generators** generate the different outputs. For instance, Pelican "
|
||||
"comes with ``ArticlesGenerator`` and ``PageGenerator``. Given a "
|
||||
"configuration, they can do whatever they want. Most of the time, it's "
|
||||
"generating files from inputs."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:34
|
||||
msgid ""
|
||||
"Pelican also uses templates, so it's easy to write your own theme. The "
|
||||
"syntax is `Jinja2 <https://palletsprojects.com/p/jinja/>`_ and is very "
|
||||
"easy to learn, so don't hesitate to jump in and build your own theme."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:39
|
||||
msgid "How to implement a new reader?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:41
|
||||
msgid ""
|
||||
"Is there an awesome markup language you want to add to Pelican? Well, the"
|
||||
" only thing you have to do is to create a class with a ``read`` method "
|
||||
"that returns HTML content and some metadata."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:45
|
||||
msgid "Take a look at the Markdown reader::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:71
|
||||
msgid "Simple, isn't it?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:73
|
||||
msgid ""
|
||||
"If your new reader requires additional Python dependencies, then you "
|
||||
"should wrap their ``import`` statements in a ``try...except`` block. "
|
||||
"Then inside the reader's class, set the ``enabled`` class attribute to "
|
||||
"mark import success or failure. This makes it possible for users to "
|
||||
"continue using their favourite markup method without needing to install "
|
||||
"modules for formats they don't use."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:80
|
||||
msgid "How to implement a new generator?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:82
|
||||
msgid ""
|
||||
"Generators have two important methods. You're not forced to create both; "
|
||||
"only the existing ones will be called."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:85
|
||||
msgid ""
|
||||
"``generate_context``, that is called first, for all the generators. Do "
|
||||
"whatever you have to do, and update the global context if needed. This "
|
||||
"context is shared between all generators, and will be passed to the "
|
||||
"templates. For instance, the ``PageGenerator`` ``generate_context`` "
|
||||
"method finds all the pages, transforms them into objects, and populates "
|
||||
"the context with them. Be careful *not* to output anything using this "
|
||||
"context at this stage, as it is likely to change by the effect of other "
|
||||
"generators."
|
||||
msgstr ""
|
||||
|
||||
#: ../../internals.rst:93
|
||||
msgid ""
|
||||
"``generate_output`` is then called. And guess what is it made for? Oh, "
|
||||
"generating the output. :) It's here that you may want to look at the "
|
||||
"context and call the methods of the ``writer`` object that is passed as "
|
||||
"the first argument of this function. In the ``PageGenerator`` example, "
|
||||
"this method will look at all the pages recorded in the global context and"
|
||||
" output a file on the disk (using the writer method ``write_file``) for "
|
||||
"each page encountered."
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/pelican-themes.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/pelican-themes.mo
Normal file
Binary file not shown.
185
docs/locales/zh_CN/LC_MESSAGES/pelican-themes.po
Normal file
185
docs/locales/zh_CN/LC_MESSAGES/pelican-themes.po
Normal file
|
|
@ -0,0 +1,185 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../pelican-themes.rst:2
|
||||
msgid "pelican-themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:7
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:9
|
||||
msgid ""
|
||||
"``pelican-themes`` is a command line tool for managing themes for "
|
||||
"Pelican. See :ref:`settings/themes` for settings related to themes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:14
|
||||
msgid "Usage"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:16
|
||||
msgid "pelican-themes [-h] [-l] [-i theme path [theme path ...]]"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:17
|
||||
msgid "[-r theme name [theme name ...]]"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:18
|
||||
msgid "[-s theme path [theme path ...]] [-v] [--version]"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:21
|
||||
msgid "Optional arguments:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:24
|
||||
msgid "Show the help an exit"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:26
|
||||
msgid "Show the themes already installed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:28
|
||||
msgid "One or more themes to install"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:30
|
||||
msgid "One or more themes to remove"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:32
|
||||
msgid ""
|
||||
"Same as \"--install\", but create a symbolic link instead of copying the "
|
||||
"theme. Useful for theme development"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:35
|
||||
msgid "Verbose output"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:37
|
||||
msgid "Print the version of this script"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:42
|
||||
msgid "Examples"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:46
|
||||
msgid "Listing the installed themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:48
|
||||
msgid ""
|
||||
"With ``pelican-themes``, you can see the available themes by using the "
|
||||
"``-l`` or ``--list`` option:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:62
|
||||
msgid ""
|
||||
"In this example, we can see there are three themes available: "
|
||||
"``notmyidea``, ``simple``, and ``two-column``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:65
|
||||
msgid ""
|
||||
"``two-column`` is prefixed with an ``@`` because this theme is not copied"
|
||||
" to the Pelican theme path, but is instead just linked to it (see "
|
||||
"`Creating symbolic links`_ for details about creating symbolic links)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:69
|
||||
msgid ""
|
||||
"Note that you can combine the ``--list`` option with the ``-v`` or "
|
||||
"``--verbose`` option to get more verbose output, like this:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:81
|
||||
msgid "Installing themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:83
|
||||
msgid ""
|
||||
"You can install one or more themes using the ``-i`` or ``--install`` "
|
||||
"option. This option takes as argument the path(s) of the theme(s) you "
|
||||
"want to install, and can be combined with the verbose option:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:103
|
||||
msgid "Removing themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:105
|
||||
msgid ""
|
||||
"The ``pelican-themes`` command can also remove themes from the Pelican "
|
||||
"themes path. The ``-r`` or ``--remove`` option takes as argument the "
|
||||
"name(s) of the theme(s) you want to remove, and can be combined with the "
|
||||
"``--verbose`` option."
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:122
|
||||
msgid "Creating symbolic links"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:124
|
||||
msgid ""
|
||||
"``pelican-themes`` can also install themes by creating symbolic links "
|
||||
"instead of copying entire themes into the Pelican themes path."
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:127
|
||||
msgid ""
|
||||
"To symbolically link a theme, you can use the ``-s`` or ``--symlink``, "
|
||||
"which works exactly as the ``--install`` option:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:134
|
||||
msgid ""
|
||||
"In this example, the ``two-column`` theme is now symbolically linked to "
|
||||
"the Pelican themes path, so we can use it, but we can also modify it "
|
||||
"without having to reinstall it after each modification."
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:138
|
||||
msgid "This is useful for theme development:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:155
|
||||
msgid "Doing several things at once"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:157
|
||||
msgid ""
|
||||
"The ``--install``, ``--remove`` and ``--symlink`` option are not mutually"
|
||||
" exclusive, so you can combine them in the same command line to do more "
|
||||
"than one operation at time, like this:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../pelican-themes.rst:169
|
||||
msgid ""
|
||||
"In this example, the theme ``notmyidea-cms`` is replaced by the theme "
|
||||
"``notmyidea-cms-fr``"
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/plugins.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/plugins.mo
Normal file
Binary file not shown.
623
docs/locales/zh_CN/LC_MESSAGES/plugins.po
Normal file
623
docs/locales/zh_CN/LC_MESSAGES/plugins.po
Normal file
|
|
@ -0,0 +1,623 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../plugins.rst:4
|
||||
msgid "Plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:6
|
||||
msgid ""
|
||||
"Beginning with version 3.0, Pelican supports plugins. Plugins are a way "
|
||||
"to add features to Pelican without having to directly modify the Pelican "
|
||||
"core."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:10
|
||||
msgid "How to use plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:12
|
||||
msgid ""
|
||||
"Starting with version 4.5, Pelican moved to a new plugin structure "
|
||||
"utilizing namespace packages that can be easily installed via Pip_. "
|
||||
"Plugins supporting this structure will install under the namespace "
|
||||
"package ``pelican.plugins`` and can be automatically discovered by "
|
||||
"Pelican. To see a list of Pip-installed namespace plugins that are active"
|
||||
" in your environment, run::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:20
|
||||
msgid ""
|
||||
"If you leave the ``PLUGINS`` setting as default (``None``), Pelican will "
|
||||
"automatically discover namespace plugins and register them. If, on the "
|
||||
"other hand, you specify a ``PLUGINS`` setting as a list of plugins, this "
|
||||
"auto-discovery will be disabled. At that point, only the plugins you "
|
||||
"specify will be registered, and you must explicitly list any namespace "
|
||||
"plugins as well."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:26
|
||||
msgid ""
|
||||
"If you are using the ``PLUGINS`` setting, you can specify plugins in two "
|
||||
"ways. The first method specifies plugins as a list of strings. Namespace "
|
||||
"plugins can be specified either by their full names "
|
||||
"(``pelican.plugins.myplugin``) or by their short names (``myplugin``)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:35
|
||||
msgid ""
|
||||
"Alternatively, you can import them in your settings file and pass the "
|
||||
"modules::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:43
|
||||
msgid ""
|
||||
"When experimenting with different plugins (especially the ones that deal "
|
||||
"with metadata and content) caching may interfere and the changes may not "
|
||||
"be visible. In such cases disable caching with ``LOAD_CONTENT_CACHE = "
|
||||
"False`` or use the ``--ignore-cache`` command-line switch."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:48
|
||||
msgid ""
|
||||
"If your plugins are not in an importable path, you can specify a list of "
|
||||
"paths via the ``PLUGIN_PATHS`` setting. As shown in the following "
|
||||
"example, paths in the ``PLUGIN_PATHS`` list can be absolute or relative "
|
||||
"to the settings file::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:56
|
||||
msgid "Where to find plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:57
|
||||
msgid ""
|
||||
"Namespace plugins can be found in the `pelican-plugins organization`_ as "
|
||||
"individual repositories. Legacy plugins are located in the `pelican-"
|
||||
"plugins repository`_ and will be gradually phased out in favor of the "
|
||||
"namespace versions."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:65
|
||||
msgid ""
|
||||
"Please note that while we do our best to review and maintain these "
|
||||
"plugins, they are submitted by the Pelican community and thus may have "
|
||||
"varying levels of support and interoperability."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:70
|
||||
msgid "How to create plugins"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:72
|
||||
msgid ""
|
||||
"Plugins are based on the concept of signals. Pelican sends signals, and "
|
||||
"plugins subscribe to those signals. The list of available signals is "
|
||||
"documented in a subsequent section."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:76
|
||||
msgid ""
|
||||
"The only rule to follow for plugins is to define a ``register`` callable,"
|
||||
" in which you map the signals to your plugin logic. Let's take a simple "
|
||||
"example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:93
|
||||
msgid ""
|
||||
"Signal receivers are weakly-referenced and thus must not be defined "
|
||||
"within your ``register`` callable or they will be garbage-collected "
|
||||
"before the signal is emitted."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:97
|
||||
msgid ""
|
||||
"If multiple plugins connect to the same signal, there is no way to "
|
||||
"guarantee or control in which order the plugins will be executed. This is"
|
||||
" a limitation inherited from Blinker_, the dependency Pelican uses to "
|
||||
"implement signals."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:102
|
||||
msgid "Namespace plugin structure"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:104
|
||||
msgid ""
|
||||
"Namespace plugins must adhere to a certain structure in order to function"
|
||||
" properly. They need to be installable (i.e. contain ``setup.py`` or "
|
||||
"equivalent) and have a folder structure as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:117
|
||||
msgid ""
|
||||
"It is crucial that ``pelican`` or ``pelican/plugins`` folder **not** "
|
||||
"contain an ``__init__.py`` file. In fact, it is best to have those "
|
||||
"folders empty besides the listed folders in the above structure and keep "
|
||||
"your plugin related files contained solely in the "
|
||||
"``pelican/plugins/myplugin`` folder to avoid any issues."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:123
|
||||
msgid ""
|
||||
"To easily set up the proper structure, a `cookiecutter template for "
|
||||
"plugins`_ is provided. Refer to that project's README for instructions on"
|
||||
" how to use it."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:129
|
||||
msgid "List of signals"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:131
|
||||
msgid "Here is the list of currently implemented signals:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:134
|
||||
msgid "Signal"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:134
|
||||
msgid "Arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:134
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:136
|
||||
msgid "initialized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:136 ../../plugins.rst:137 ../../plugins.rst:155
|
||||
#: ../../plugins.rst:158
|
||||
msgid "pelican object"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:137
|
||||
msgid "finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:137
|
||||
msgid ""
|
||||
"invoked after all the generators are executed and just before pelican "
|
||||
"exits useful for custom post processing actions, such as: - minifying "
|
||||
"js/css assets. - notify/ping search engines with an updated sitemap."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:141
|
||||
msgid "generator_init"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:141
|
||||
msgid "generator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:141
|
||||
msgid "invoked in the Generator.__init__"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:142
|
||||
msgid "all_generators_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:142
|
||||
msgid "generators"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:142
|
||||
msgid "invoked after all the generators are executed and before writing output"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:143
|
||||
msgid "readers_init"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:143
|
||||
msgid "readers"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:143
|
||||
msgid "invoked in the Readers.__init__"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:144 ../../plugins.rst:198
|
||||
msgid "article_generator_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:144
|
||||
msgid "article_generator, metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:145 ../../plugins.rst:200
|
||||
msgid "article_generator_preread"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:145 ../../plugins.rst:147 ../../plugins.rst:148
|
||||
#: ../../plugins.rst:151
|
||||
msgid "article_generator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:145
|
||||
msgid ""
|
||||
"invoked before a article is read in ArticlesGenerator.generate_context; "
|
||||
"use if code needs to do something before every article is parsed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:147
|
||||
msgid "article_generator_init"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:147
|
||||
msgid "invoked in the ArticlesGenerator.__init__"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:148
|
||||
msgid "article_generator_pretaxonomy"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:148
|
||||
msgid ""
|
||||
"invoked before categories and tags lists are created useful when e.g. "
|
||||
"modifying the list of articles to be generated so that removed articles "
|
||||
"are not leaked in categories or tags"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:151 ../../plugins.rst:199
|
||||
msgid "article_generator_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:151
|
||||
msgid "invoked at the end of ArticlesGenerator.generate_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:152
|
||||
msgid "article_generator_write_article"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:152
|
||||
msgid "article_generator, content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:152
|
||||
msgid "invoked before writing each article, the article is passed as content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:153
|
||||
msgid "article_writer_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:153
|
||||
msgid "article_generator, writer"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:153
|
||||
msgid ""
|
||||
"invoked after all articles and related pages have been written, but "
|
||||
"before the article generator is closed."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:155
|
||||
msgid "get_generators"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:155
|
||||
msgid ""
|
||||
"invoked in Pelican.get_generator_classes, can return a Generator, or "
|
||||
"several generators in a tuple or in a list."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:158
|
||||
msgid "get_writer"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:158
|
||||
msgid "invoked in Pelican.get_writer, can return a custom Writer."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:160 ../../plugins.rst:201
|
||||
msgid "page_generator_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:160
|
||||
msgid "page_generator, metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:161 ../../plugins.rst:202
|
||||
msgid "page_generator_preread"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:161 ../../plugins.rst:163 ../../plugins.rst:164
|
||||
msgid "page_generator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:161
|
||||
msgid ""
|
||||
"invoked before a page is read in PageGenerator.generate_context; use if "
|
||||
"code needs to do something before every page is parsed."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:163 ../../plugins.rst:204
|
||||
msgid "page_generator_init"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:163
|
||||
msgid "invoked in the PagesGenerator.__init__"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:164 ../../plugins.rst:203
|
||||
msgid "page_generator_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:164
|
||||
msgid "invoked at the end of PagesGenerator.generate_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:165
|
||||
msgid "page_generator_write_page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:165
|
||||
msgid "page_generator, content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:165
|
||||
msgid "invoked before writing each page, the page is passed as content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:166
|
||||
msgid "page_writer_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:166
|
||||
msgid "page_generator, writer"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:166
|
||||
msgid ""
|
||||
"invoked after all pages have been written, but before the page generator "
|
||||
"is closed."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:168 ../../plugins.rst:205
|
||||
msgid "static_generator_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:168
|
||||
msgid "static_generator, metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:169 ../../plugins.rst:206
|
||||
msgid "static_generator_preread"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:169 ../../plugins.rst:172 ../../plugins.rst:173
|
||||
msgid "static_generator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:169
|
||||
msgid ""
|
||||
"invoked before a static file is read in StaticGenerator.generate_context;"
|
||||
" use if code needs to do something before every static file is added to "
|
||||
"the staticfiles list."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:172
|
||||
msgid "static_generator_init"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:172
|
||||
msgid "invoked in the StaticGenerator.__init__"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:173
|
||||
msgid "static_generator_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:173
|
||||
msgid "invoked at the end of StaticGenerator.generate_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:174
|
||||
msgid "content_object_init"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:174
|
||||
msgid "content_object"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:174
|
||||
msgid "invoked at the end of Content.__init__"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:175
|
||||
msgid "content_written"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:175
|
||||
msgid "path, context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:175
|
||||
msgid "invoked each time a content file is written."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:176
|
||||
msgid "feed_generated"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:176
|
||||
msgid "context, feed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:176
|
||||
msgid ""
|
||||
"invoked each time a feed gets generated. Can be used to modify a feed "
|
||||
"object before it gets written."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:178
|
||||
msgid "feed_written"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:178
|
||||
msgid "path, context, feed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:178
|
||||
msgid "invoked each time a feed file is written."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:183
|
||||
msgid ""
|
||||
"Avoid ``content_object_init`` signal if you intend to read ``summary`` or"
|
||||
" ``content`` properties of the content object. That combination can "
|
||||
"result in unresolved links when :ref:`ref-linking-to-internal-content` "
|
||||
"(see `pelican-plugins bug #314`_). Use ``_summary`` and ``_content`` "
|
||||
"properties instead, or, alternatively, run your plugin at a later stage "
|
||||
"(e.g. ``all_generators_finalized``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:192
|
||||
msgid ""
|
||||
"After Pelican 3.2, signal names were standardized. Older plugins may "
|
||||
"need to be updated to use the new names:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:196
|
||||
msgid "Old name"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:196
|
||||
msgid "New name"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:198
|
||||
msgid "article_generate_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:199
|
||||
msgid "article_generate_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:200
|
||||
msgid "article_generate_preread"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:201
|
||||
msgid "pages_generate_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:202
|
||||
msgid "pages_generate_preread"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:203
|
||||
msgid "pages_generator_finalized"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:204
|
||||
msgid "pages_generator_init"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:205
|
||||
msgid "static_generate_context"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:206
|
||||
msgid "static_generate_preread"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:210
|
||||
msgid "Recipes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:212
|
||||
msgid ""
|
||||
"We eventually realised some of the recipes to create plugins would be "
|
||||
"best shared in the documentation somewhere, so here they are!"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:216
|
||||
msgid "How to create a new reader"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:218
|
||||
msgid ""
|
||||
"One thing you might want is to add support for your very own input "
|
||||
"format. While it might make sense to add this feature in Pelican core, we"
|
||||
" wisely chose to avoid this situation and instead have the different "
|
||||
"readers defined via plugins."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:223
|
||||
msgid ""
|
||||
"The rationale behind this choice is mainly that plugins are really easy "
|
||||
"to write and don't slow down Pelican itself when they're not active."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:226
|
||||
msgid "No more talking — here is an example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:262
|
||||
msgid "Adding a new generator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:264
|
||||
msgid ""
|
||||
"Adding a new generator is also really easy. You might want to have a look"
|
||||
" at :doc:`internals` for more information on how to create your own "
|
||||
"generator."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:278
|
||||
msgid "Adding a new writer"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:280
|
||||
msgid ""
|
||||
"Adding a writer will allow you to output additional file formats to disk,"
|
||||
" or change how the existing formats are written to disk. Note that only "
|
||||
"one writer will be active at a time, so be sure to either subclass the "
|
||||
"built-in Writer, or completely re-implement it."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:285
|
||||
msgid "Here is a basic example of how to set up your own writer::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:305
|
||||
msgid "Using Plugins to Inject Content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:307
|
||||
msgid ""
|
||||
"You can programmatically inject articles or pages using plugins. This can"
|
||||
" be useful if you plan to fetch articles from an API, for example."
|
||||
msgstr ""
|
||||
|
||||
#: ../../plugins.rst:310
|
||||
msgid ""
|
||||
"Following is a simple example of how one can build a plugin that injects "
|
||||
"a custom article, using the ``article_generator_pretaxonomy`` signal::"
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/publish.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/publish.mo
Normal file
Binary file not shown.
281
docs/locales/zh_CN/LC_MESSAGES/publish.po
Normal file
281
docs/locales/zh_CN/LC_MESSAGES/publish.po
Normal file
|
|
@ -0,0 +1,281 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../publish.rst:2
|
||||
msgid "Publish your site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:7
|
||||
msgid "Site generation"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:9
|
||||
msgid ""
|
||||
"Once Pelican is installed and you have some content (e.g., in Markdown or"
|
||||
" reST format), you can convert your content into HTML via the ``pelican``"
|
||||
" command, specifying the path to your content and (optionally) the path "
|
||||
"to your :doc:`settings<settings>` file::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:16
|
||||
msgid ""
|
||||
"The above command will generate your site and save it in the ``output/`` "
|
||||
"folder, using the default theme to produce a simple site. The default "
|
||||
"theme consists of very simple HTML without styling and is provided so "
|
||||
"folks may use it as a basis for creating their own themes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:21
|
||||
msgid ""
|
||||
"When working on a single article or page, it is possible to generate only"
|
||||
" the file that corresponds to that content. To do this, use the "
|
||||
"``--write-selected`` argument, like so::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:27
|
||||
msgid ""
|
||||
"Note that you must specify the path to the generated *output* file — not "
|
||||
"the source content. To determine the output file name and location, use "
|
||||
"the ``--debug`` flag. If desired, ``--write-selected`` can take a comma-"
|
||||
"separated list of paths or can be configured as a setting. (See: "
|
||||
":ref:`writing_only_selected_content`)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:33
|
||||
msgid ""
|
||||
"You can also tell Pelican to watch for your modifications, instead of "
|
||||
"manually re-running it every time you want to see your changes. To enable"
|
||||
" this, run the ``pelican`` command with the ``-r`` or ``--autoreload`` "
|
||||
"option. On non-Windows environments, this option can also be combined "
|
||||
"with the ``-l`` or ``--listen`` option to simultaneously both auto-"
|
||||
"regenerate *and* serve the output at http://localhost:8000::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:42
|
||||
msgid ""
|
||||
"Pelican has other command-line switches available. Have a look at the "
|
||||
"help to see all the options you can use::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:48
|
||||
msgid "Viewing the generated files"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:50
|
||||
msgid ""
|
||||
"The files generated by Pelican are static files, so you don't actually "
|
||||
"need anything special to view them. You can use your browser to open the "
|
||||
"generated HTML files directly::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:56
|
||||
msgid ""
|
||||
"Because the above method may have trouble locating your CSS and other "
|
||||
"linked assets, running Pelican's simple built-in web server will often "
|
||||
"provide a more reliable previewing experience::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:62
|
||||
msgid ""
|
||||
"Once the web server has been started, you can preview your site at: "
|
||||
"http://localhost:8000/"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:66
|
||||
msgid "Deployment"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:68
|
||||
msgid ""
|
||||
"After you have generated your site, previewed it in your local "
|
||||
"development environment, and are ready to deploy it to production, you "
|
||||
"might first re-generate your site with any production-specific settings "
|
||||
"(e.g., analytics feeds, etc.) that you may have defined::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:75
|
||||
msgid ""
|
||||
"To base your publish configuration on top of your ``pelicanconf.py``, you"
|
||||
" can import your ``pelicanconf`` settings by including the following line"
|
||||
" in your ``publishconf.py``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:81
|
||||
msgid ""
|
||||
"If you have generated a ``publishconf.py`` using ``pelican-quickstart``, "
|
||||
"this line is included by default."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:84
|
||||
msgid ""
|
||||
"The steps for deploying your site will depend on where it will be hosted."
|
||||
" If you have SSH access to a server running Nginx or Apache, you might "
|
||||
"use the ``rsync`` tool to transmit your site files::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:90
|
||||
msgid ""
|
||||
"There are many other deployment options, some of which can be configured "
|
||||
"when first setting up your site via the ``pelican-quickstart`` command. "
|
||||
"See the :doc:`Tips<tips>` page for detail on publishing via GitHub Pages."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:95
|
||||
msgid "Automation"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:97
|
||||
msgid ""
|
||||
"While the ``pelican`` command is the canonical way to generate your site,"
|
||||
" automation tools can be used to streamline the generation and "
|
||||
"publication flow. One of the questions asked during the ``pelican-"
|
||||
"quickstart`` process pertains to whether you want to automate site "
|
||||
"generation and publication. If you answered \"yes\" to that question, a "
|
||||
"``tasks.py`` and ``Makefile`` will be generated in the root of your "
|
||||
"project. These files, pre-populated with certain information gleaned from"
|
||||
" other answers provided during the ``pelican-quickstart`` process, are "
|
||||
"meant as a starting point and should be customized to fit your particular"
|
||||
" needs and usage patterns. If you find one or both of these automation "
|
||||
"tools to be of limited utility, these files can be deleted at any time "
|
||||
"and will not affect usage of the canonical ``pelican`` command."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:110
|
||||
msgid ""
|
||||
"Following are automation tools that \"wrap\" the ``pelican`` command and "
|
||||
"can simplify the process of generating, previewing, and uploading your "
|
||||
"site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:114
|
||||
msgid "Invoke"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:116
|
||||
msgid ""
|
||||
"The advantage of Invoke_ is that it is written in Python and thus can be "
|
||||
"used in a wide range of environments. The downside is that it must be "
|
||||
"installed separately. Use the following command to install Invoke, "
|
||||
"prefixing with ``sudo`` if your environment requires it::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:123
|
||||
msgid ""
|
||||
"Take a moment to open the ``tasks.py`` file that was generated in your "
|
||||
"project root. You will see a number of commands, any one of which can be "
|
||||
"renamed, removed, and/or customized to your liking. Using the out-of-the-"
|
||||
"box configuration, you can generate your site via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:130 ../../publish.rst:178
|
||||
msgid ""
|
||||
"If you'd prefer to have Pelican automatically regenerate your site every "
|
||||
"time a change is detected (which is handy when testing locally), use the "
|
||||
"following command instead::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:136 ../../publish.rst:184
|
||||
msgid ""
|
||||
"To serve the generated site so it can be previewed in your browser at "
|
||||
"http://localhost:8000/::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:141
|
||||
msgid ""
|
||||
"To serve the generated site with automatic browser reloading every time a"
|
||||
" change is detected, first ``python -m pip install livereload``, then use"
|
||||
" the following command::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:147
|
||||
msgid ""
|
||||
"If during the ``pelican-quickstart`` process you answered \"yes\" when "
|
||||
"asked whether you want to upload your site via SSH, you can use the "
|
||||
"following command to publish your site via rsync over SSH::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:153
|
||||
msgid ""
|
||||
"These are just a few of the commands available by default, so feel free "
|
||||
"to explore ``tasks.py`` and see what other commands are available. More "
|
||||
"importantly, don't hesitate to customize ``tasks.py`` to suit your "
|
||||
"specific needs and preferences."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:159
|
||||
msgid "Make"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:161
|
||||
msgid ""
|
||||
"A ``Makefile`` is also automatically created for you when you say \"yes\""
|
||||
" to the relevant question during the ``pelican-quickstart`` process. The "
|
||||
"advantage of this method is that the ``make`` command is built into most "
|
||||
"POSIX systems and thus doesn't require installing anything else in order "
|
||||
"to use it. The downside is that non-POSIX systems (e.g., Windows) do not "
|
||||
"include ``make``, and installing it on those systems can be a non-trivial"
|
||||
" task."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:168
|
||||
msgid ""
|
||||
"If you want to use ``make`` to generate your site using the settings in "
|
||||
"``pelicanconf.py``, run::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:173
|
||||
msgid ""
|
||||
"To generate the site for production, using the settings in "
|
||||
"``publishconf.py``, run::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:189
|
||||
msgid ""
|
||||
"Normally you would need to run ``make regenerate`` and ``make serve`` in "
|
||||
"two separate terminal sessions, but you can run both at once via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:194
|
||||
msgid ""
|
||||
"The above command will simultaneously run Pelican in regeneration mode as"
|
||||
" well as serve the output at http://localhost:8000."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:197
|
||||
msgid ""
|
||||
"When you're ready to publish your site, you can upload it via the "
|
||||
"method(s) you chose during the ``pelican-quickstart`` questionnaire. For "
|
||||
"this example, we'll use rsync over ssh::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:203
|
||||
msgid "That's it! Your site should now be live."
|
||||
msgstr ""
|
||||
|
||||
#: ../../publish.rst:205
|
||||
msgid ""
|
||||
"(The default ``Makefile`` and ``devserver.sh`` scripts use the ``python``"
|
||||
" and ``pelican`` executables to complete its tasks. If you want to use "
|
||||
"different executables, such as ``python3``, you can set the ``PY`` and "
|
||||
"``PELICAN`` environment variables, respectively, to override the default "
|
||||
"executable names.)"
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/quickstart.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/quickstart.mo
Normal file
Binary file not shown.
132
docs/locales/zh_CN/LC_MESSAGES/quickstart.po
Normal file
132
docs/locales/zh_CN/LC_MESSAGES/quickstart.po
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../quickstart.rst:2
|
||||
msgid "Quickstart"
|
||||
msgstr "快速入门"
|
||||
|
||||
#: ../../quickstart.rst:4
|
||||
msgid ""
|
||||
"Reading through all the documentation is highly recommended, but for the "
|
||||
"truly impatient, following are some quick steps to get started."
|
||||
msgstr "强烈建议将所有文档完整地看一遍,"
|
||||
"但如果你真的非常没有耐心看完,下面的步骤可以帮助你快速地开始使用Pelican。"
|
||||
|
||||
#: ../../quickstart.rst:8
|
||||
msgid "Installation"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:10
|
||||
msgid ""
|
||||
"Install Pelican (and optionally Markdown if you intend to use it) on "
|
||||
"Python 3.7+ by running the following command in your preferred terminal, "
|
||||
"prefixing with ``sudo`` if permissions warrant::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:17
|
||||
msgid "Create a project"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:19
|
||||
msgid ""
|
||||
"First, choose a name for your project, create an appropriately-named "
|
||||
"directory for your site, and switch to that directory::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:25
|
||||
msgid ""
|
||||
"Create a skeleton project via the ``pelican-quickstart`` command, which "
|
||||
"begins by asking some questions about your site::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:30
|
||||
msgid ""
|
||||
"For questions that have default values denoted in brackets, feel free to "
|
||||
"use the Return key to accept those default values [#tzlocal_fn]_. When "
|
||||
"asked for your URL prefix, enter your domain name as indicated (e.g., "
|
||||
"``https://example.com``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:36
|
||||
msgid "Create an article"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:38
|
||||
msgid ""
|
||||
"You cannot run Pelican until you have created some content. Use your "
|
||||
"preferred text editor to create your first article with the following "
|
||||
"content::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:47
|
||||
msgid ""
|
||||
"Given that this example article is in Markdown format, save it as "
|
||||
"``~/projects/yoursite/content/keyboard-review.md``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:51
|
||||
msgid "Generate your site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:53
|
||||
msgid ""
|
||||
"From your project root directory, run the ``pelican`` command to generate"
|
||||
" your site::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:57
|
||||
msgid ""
|
||||
"Your site has now been generated inside the ``output/`` directory. (You "
|
||||
"may see a warning related to feeds, but that is normal when developing "
|
||||
"locally and can be ignored for now.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:62
|
||||
msgid "Preview your site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:64
|
||||
msgid ""
|
||||
"Open a new terminal session, navigate to your project root directory, and"
|
||||
" run the following command to launch Pelican's web server::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:69
|
||||
msgid "Preview your site by navigating to http://localhost:8000/ in your browser."
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:71
|
||||
msgid ""
|
||||
"Continue reading the other documentation sections for more detail, and "
|
||||
"check out the Pelican wiki's Tutorials_ page for links to community-"
|
||||
"published tutorials."
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:78
|
||||
msgid "Footnotes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../quickstart.rst:80
|
||||
msgid ""
|
||||
"You can help localize default fields by installing the optional `tzlocal "
|
||||
"<https://pypi.org/project/tzlocal/>`_ module."
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/report.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/report.mo
Normal file
Binary file not shown.
204
docs/locales/zh_CN/LC_MESSAGES/report.po
Normal file
204
docs/locales/zh_CN/LC_MESSAGES/report.po
Normal file
|
|
@ -0,0 +1,204 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../report.rst:2
|
||||
msgid "Some history about Pelican"
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:6
|
||||
msgid ""
|
||||
"This page comes from a report the original author (Alexis Métaireau) "
|
||||
"wrote right after writing Pelican, in December 2010. The information may "
|
||||
"not be up-to-date."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:10
|
||||
msgid ""
|
||||
"Pelican is a simple static blog generator. It parses markup files "
|
||||
"(Markdown or reStructuredText for now) and generates an HTML folder with "
|
||||
"all the files in it. I've chosen to use Python to implement Pelican "
|
||||
"because it seemed to be simple and to fit to my needs. I did not wanted "
|
||||
"to define a class for each thing, but still wanted to keep my things "
|
||||
"loosely coupled. It turns out that it was exactly what I wanted. From "
|
||||
"time to time, thanks to the feedback of some users, it took me a very few"
|
||||
" time to provide fixes on it. So far, I've re-factored the Pelican code "
|
||||
"by two times; each time took less than 30 minutes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:21
|
||||
msgid "Use case"
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:23
|
||||
msgid ""
|
||||
"I was previously using WordPress, a solution you can host on a web server"
|
||||
" to manage your blog. Most of the time, I prefer using markup languages "
|
||||
"such as Markdown or reStructuredText to type my articles. To do so, I use"
|
||||
" vim. I think it is important to let the people choose the tool they want"
|
||||
" to write the articles. In my opinion, a blog manager should just allow "
|
||||
"you to take any kind of input and transform it to a weblog. That's what "
|
||||
"Pelican does. You can write your articles using the tool you want, and "
|
||||
"the markup language you want, and then generate a static HTML weblog."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:34
|
||||
msgid ""
|
||||
"To be flexible enough, Pelican has template support, so you can easily "
|
||||
"write your own themes if you want to."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:38
|
||||
msgid "Design process"
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:40
|
||||
msgid ""
|
||||
"Pelican came from a need I have. I started by creating a single file "
|
||||
"application, and I have make it grow to support what it does by now. To "
|
||||
"start, I wrote a piece of documentation about what I wanted to do. Then, "
|
||||
"I created the content I wanted to parse (the reStructuredText files) and "
|
||||
"started experimenting with the code. Pelican was 200 lines long and "
|
||||
"contained almost ten functions and one class when it was first usable."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:47
|
||||
msgid ""
|
||||
"I have been facing different problems all over the time and wanted to add"
|
||||
" features to Pelican while using it. The first change I have done was to "
|
||||
"add the support of a settings file. It is possible to pass the options to"
|
||||
" the command line, but can be tedious if there is a lot of them. In the "
|
||||
"same way, I have added the support of different things over time: Atom "
|
||||
"feeds, multiple themes, multiple markup support, etc. At some point, it "
|
||||
"appears that the \"only one file\" mantra was not good enough for "
|
||||
"Pelican, so I decided to rework a bit all that, and split this in "
|
||||
"multiple different files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:56
|
||||
msgid "I’ve separated the logic in different classes and concepts:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:58
|
||||
msgid ""
|
||||
"*writers* are responsible of all the writing process of the files. They "
|
||||
"are responsible of writing .html files, RSS feeds and so on. Since those "
|
||||
"operations are commonly used, the object is created once, and then passed"
|
||||
" to the generators."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:63
|
||||
msgid ""
|
||||
"*readers* are used to read from various formats (Markdown and "
|
||||
"reStructuredText for now, but the system is extensible). Given a file, "
|
||||
"they return metadata (author, tags, category, etc) and content (HTML "
|
||||
"formatted)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:67
|
||||
msgid ""
|
||||
"*generators* generate the different outputs. For instance, Pelican comes "
|
||||
"with an ArticlesGenerator and PagesGenerator, into others. Given a "
|
||||
"configuration, they can do whatever you want them to do. Most of the time"
|
||||
" it's generating files from inputs (user inputs and files)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:72
|
||||
msgid ""
|
||||
"I also deal with contents objects. They can be ``Articles``, ``Pages``, "
|
||||
"``Quotes``, or whatever you want. They are defined in the ``contents.py``"
|
||||
" module and represent some content to be used by the program."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:77
|
||||
msgid "In more detail"
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:79
|
||||
msgid "Here is an overview of the classes involved in Pelican."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:83
|
||||
msgid ""
|
||||
"The interface does not really exist, and I have added it only to clarify "
|
||||
"the whole picture. I do use duck typing and not interfaces."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:86
|
||||
msgid "Internally, the following process is followed:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:88
|
||||
msgid ""
|
||||
"First of all, the command line is parsed, and some content from the user "
|
||||
"is used to initialize the different generator objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:91
|
||||
msgid ""
|
||||
"A ``context`` is created. It contains the settings from the command line "
|
||||
"and a settings file if provided."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:93
|
||||
msgid ""
|
||||
"The ``generate_context`` method of each generator is called, updating the"
|
||||
" context."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:95
|
||||
msgid ""
|
||||
"The writer is created and given to the ``generate_output`` method of each"
|
||||
" generator."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:98
|
||||
msgid ""
|
||||
"I make two calls because it is important that when the output is "
|
||||
"generated by the generators, the context will not change. In other words,"
|
||||
" the first method ``generate_context`` should modify the context, whereas"
|
||||
" the second ``generate_output`` method should not."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:103
|
||||
msgid ""
|
||||
"Then, it is up to the generators to do what the want, in the "
|
||||
"``generate_context`` and ``generate_content`` method. Taking the "
|
||||
"``ArticlesGenerator`` class will help to understand some others concepts."
|
||||
" Here is what happens when calling the ``generate_context`` method:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:108
|
||||
msgid ""
|
||||
"Read the folder “path”, looking for restructured text files, load each of"
|
||||
" them, and construct a content object (``Article``) with it. To do so, "
|
||||
"use ``Reader`` objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:111
|
||||
msgid "Update the ``context`` with all those articles."
|
||||
msgstr ""
|
||||
|
||||
#: ../../report.rst:113
|
||||
msgid ""
|
||||
"Then, the ``generate_content`` method uses the ``context`` and the "
|
||||
"``writer`` to generate the wanted output."
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/settings.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/settings.mo
Normal file
Binary file not shown.
1637
docs/locales/zh_CN/LC_MESSAGES/settings.po
Normal file
1637
docs/locales/zh_CN/LC_MESSAGES/settings.po
Normal file
File diff suppressed because it is too large
Load diff
BIN
docs/locales/zh_CN/LC_MESSAGES/sphinx.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/sphinx.mo
Normal file
Binary file not shown.
59
docs/locales/zh_CN/LC_MESSAGES/sphinx.po
Normal file
59
docs/locales/zh_CN/LC_MESSAGES/sphinx.po
Normal file
|
|
@ -0,0 +1,59 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../_templates/page.html:68
|
||||
msgid "Back to top"
|
||||
msgstr ""
|
||||
|
||||
#: ../../_templates/page.html:101
|
||||
msgid "Next"
|
||||
msgstr ""
|
||||
|
||||
#: ../../_templates/page.html:113
|
||||
msgid "Previous"
|
||||
msgstr ""
|
||||
|
||||
#: ../../_templates/page.html:116
|
||||
msgid "Home"
|
||||
msgstr ""
|
||||
|
||||
#: ../../_templates/page.html:129
|
||||
#, python-format
|
||||
msgid "<a href=\"%(path)s\">Copyright</a> © %(copyright)s"
|
||||
msgstr ""
|
||||
|
||||
#: ../../_templates/page.html:133
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Copyright © %(copyright)s, <a "
|
||||
"href=\"https://justinmayer.com\">Justin Mayer</a>, Alexis Metaireau, and "
|
||||
"contributors"
|
||||
msgstr ""
|
||||
|
||||
#: ../../_templates/page.html:141
|
||||
#, python-format
|
||||
msgid "Last updated on %(last_updated)s"
|
||||
msgstr ""
|
||||
|
||||
#: ../../_templates/page.html:187
|
||||
msgid "On this page"
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/themes.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/themes.mo
Normal file
Binary file not shown.
954
docs/locales/zh_CN/LC_MESSAGES/themes.po
Normal file
954
docs/locales/zh_CN/LC_MESSAGES/themes.po
Normal file
|
|
@ -0,0 +1,954 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../themes.rst:4
|
||||
msgid "Themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:6
|
||||
msgid ""
|
||||
"There is a community-managed repository of `Pelican Themes`_ for people "
|
||||
"to share and use."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:9
|
||||
msgid ""
|
||||
"Please note that while we do our best to review and merge theme "
|
||||
"contributions, they are submitted by the Pelican community and thus may "
|
||||
"have varying levels of support and interoperability."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:14
|
||||
msgid "Creating Themes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:16
|
||||
msgid ""
|
||||
"To generate its HTML output, Pelican uses the `Jinja "
|
||||
"<https://palletsprojects.com/p/jinja/>`_ templating engine due to its "
|
||||
"flexibility and straightforward syntax. If you want to create your own "
|
||||
"theme, feel free to take inspiration from the `\"simple\" theme "
|
||||
"<https://github.com/getpelican/pelican/tree/master/pelican/themes/simple/templates>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:22
|
||||
msgid ""
|
||||
"To generate your site using a theme you have created (or downloaded "
|
||||
"manually and then modified), you can specify that theme via the ``-t`` "
|
||||
"flag::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:27
|
||||
msgid ""
|
||||
"If you'd rather not specify the theme on every invocation, you can define"
|
||||
" ``THEME`` in your settings to point to the location of your preferred "
|
||||
"theme."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:32
|
||||
msgid "Structure"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:34
|
||||
msgid "To make your own theme, you must follow the following structure::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:52
|
||||
msgid ""
|
||||
"`static` contains all the static assets, which will be copied to the "
|
||||
"output `theme` folder. The above filesystem layout includes CSS and image"
|
||||
" folders, but those are just examples. Put what you need here."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:56
|
||||
msgid ""
|
||||
"`templates` contains all the templates that will be used to generate the "
|
||||
"content. The template files listed above are mandatory; you can add your "
|
||||
"own templates if it helps you keep things organized while creating your "
|
||||
"theme."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:64
|
||||
msgid "Templates and Variables"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:66
|
||||
msgid ""
|
||||
"The idea is to use a simple syntax that you can embed into your HTML "
|
||||
"pages. This document describes which templates should exist in a theme, "
|
||||
"and which variables will be passed to each template at generation time."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:70
|
||||
msgid ""
|
||||
"All templates will receive the variables defined in your settings file, "
|
||||
"as long as they are in all-caps. You can access them directly."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:75
|
||||
msgid "Common Variables"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:77
|
||||
msgid "All of these settings will be available to all templates."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:80 ../../themes.rst:147 ../../themes.rst:176
|
||||
#: ../../themes.rst:210 ../../themes.rst:243 ../../themes.rst:283
|
||||
#: ../../themes.rst:299 ../../themes.rst:332
|
||||
msgid "Variable"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:80 ../../themes.rst:147 ../../themes.rst:176
|
||||
#: ../../themes.rst:210 ../../themes.rst:243 ../../themes.rst:283
|
||||
#: ../../themes.rst:299 ../../themes.rst:332 ../../themes.rst:366
|
||||
#: ../../themes.rst:410 ../../themes.rst:429
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:82
|
||||
msgid "output_file"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:82
|
||||
msgid ""
|
||||
"The name of the file currently being generated. For instance, when "
|
||||
"Pelican is rendering the home page, output_file will be \"index.html\"."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:85 ../../themes.rst:179 ../../themes.rst:213
|
||||
#: ../../themes.rst:302
|
||||
msgid "articles"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:85
|
||||
msgid ""
|
||||
"The list of articles, ordered descending by date. All the elements are "
|
||||
"`Article` objects, so you can access their attributes (e.g. title, "
|
||||
"summary, author etc.). Sometimes this is shadowed (for instance, in the "
|
||||
"tags page). You will then find info about it in the `all_articles` "
|
||||
"variable."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:91 ../../themes.rst:180 ../../themes.rst:214
|
||||
#: ../../themes.rst:303
|
||||
msgid "dates"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:91
|
||||
msgid "The same list of articles, but ordered by date, ascending."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:93
|
||||
msgid "hidden_articles"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:93
|
||||
msgid "The list of hidden articles"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:94
|
||||
msgid "drafts"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:94
|
||||
msgid "The list of draft articles"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:95 ../../themes.rst:370
|
||||
msgid "authors"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:95
|
||||
msgid ""
|
||||
"A list of (author, articles) tuples, containing all the authors and "
|
||||
"corresponding articles (values)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:97
|
||||
msgid "categories"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:97
|
||||
msgid ""
|
||||
"A list of (category, articles) tuples, containing all the categories and "
|
||||
"corresponding articles (values)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:99 ../../themes.rst:390 ../../themes.rst:449
|
||||
msgid "tags"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:99
|
||||
msgid ""
|
||||
"A list of (tag, articles) tuples, containing all the tags and "
|
||||
"corresponding articles (values)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:101
|
||||
msgid "pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:101
|
||||
msgid "The list of pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:102
|
||||
msgid "hidden_pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:102
|
||||
msgid "The list of hidden pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:103
|
||||
msgid "draft_pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:103
|
||||
msgid "The list of draft pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:108
|
||||
msgid "Sorting"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:110
|
||||
msgid ""
|
||||
"URL wrappers (currently categories, tags, and authors), have comparison "
|
||||
"methods that allow them to be easily sorted by name::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:115
|
||||
msgid ""
|
||||
"If you want to sort based on different criteria, `Jinja's sort command`__"
|
||||
" has a number of options."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:122
|
||||
msgid "Date Formatting"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:124
|
||||
msgid ""
|
||||
"Pelican formats the date according to your settings and locale "
|
||||
"(``DATE_FORMATS``/``DEFAULT_DATE_FORMAT``) and provides a ``locale_date``"
|
||||
" attribute. On the other hand, the ``date`` attribute will be a "
|
||||
"`datetime`_ object. If you need custom formatting for a date different "
|
||||
"than your settings, use the Jinja filter ``strftime`` that comes with "
|
||||
"Pelican. Usage is same as Python `strftime`_ format, but the filter will "
|
||||
"do the right thing and format your date according to the locale given in "
|
||||
"your settings::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:139
|
||||
msgid "index.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:141
|
||||
msgid "This is the home page or index of your blog, generated at ``index.html``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:143
|
||||
msgid ""
|
||||
"If pagination is active, subsequent pages will reside in "
|
||||
"``index{number}.html``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:149 ../../themes.rst:182 ../../themes.rst:216
|
||||
#: ../../themes.rst:305
|
||||
msgid "articles_paginator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:149 ../../themes.rst:182 ../../themes.rst:216
|
||||
#: ../../themes.rst:305
|
||||
msgid "A paginator object for the list of articles"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:150 ../../themes.rst:183 ../../themes.rst:217
|
||||
#: ../../themes.rst:306
|
||||
msgid "articles_page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:150 ../../themes.rst:183 ../../themes.rst:217
|
||||
#: ../../themes.rst:306
|
||||
msgid "The current page of articles"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:151 ../../themes.rst:184 ../../themes.rst:218
|
||||
#: ../../themes.rst:307
|
||||
msgid "articles_previous_page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:151 ../../themes.rst:184 ../../themes.rst:218
|
||||
#: ../../themes.rst:307
|
||||
msgid "The previous page of articles (``None`` if page does not exist)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:153 ../../themes.rst:186 ../../themes.rst:220
|
||||
#: ../../themes.rst:309
|
||||
msgid "articles_next_page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:153 ../../themes.rst:186 ../../themes.rst:220
|
||||
#: ../../themes.rst:309
|
||||
msgid "The next page of articles (``None`` if page does not exist)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:155 ../../themes.rst:188 ../../themes.rst:222
|
||||
#: ../../themes.rst:311
|
||||
msgid "dates_paginator"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:155 ../../themes.rst:188
|
||||
msgid "A paginator object for the article list, ordered by date, ascending."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:157 ../../themes.rst:190 ../../themes.rst:224
|
||||
#: ../../themes.rst:313
|
||||
msgid "dates_page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:157 ../../themes.rst:190
|
||||
msgid "The current page of articles, ordered by date, ascending."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:159 ../../themes.rst:192 ../../themes.rst:226
|
||||
#: ../../themes.rst:315
|
||||
msgid "dates_previous_page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:159 ../../themes.rst:192 ../../themes.rst:226
|
||||
#: ../../themes.rst:315
|
||||
msgid ""
|
||||
"The previous page of articles, ordered by date, ascending (``None`` if "
|
||||
"page does not exist)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:161 ../../themes.rst:194 ../../themes.rst:228
|
||||
#: ../../themes.rst:317
|
||||
msgid "dates_next_page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:161 ../../themes.rst:194 ../../themes.rst:228
|
||||
#: ../../themes.rst:317
|
||||
msgid ""
|
||||
"The next page of articles, ordered by date, ascending (``None`` if page "
|
||||
"does not exist)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:163 ../../themes.rst:196 ../../themes.rst:230
|
||||
#: ../../themes.rst:319 ../../themes.rst:413
|
||||
msgid "page_name"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:163
|
||||
msgid "'index' -- useful for pagination links"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:168
|
||||
msgid "author.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:170
|
||||
msgid ""
|
||||
"This template will be processed for each of the existing authors, with "
|
||||
"output generated according to the ``AUTHOR_SAVE_AS`` setting (`Default:` "
|
||||
"``author/{slug}.html``). If pagination is active, subsequent pages will "
|
||||
"by default reside at ``author/{slug}{number}.html``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:178 ../../themes.rst:368 ../../themes.rst:431
|
||||
msgid "author"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:178
|
||||
msgid "The name of the author being processed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:179
|
||||
msgid "Articles by this author"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:180
|
||||
msgid "Articles by this author, but ordered by date, ascending"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:196
|
||||
msgid ""
|
||||
"AUTHOR_URL where everything after `{slug}` is removed -- useful for "
|
||||
"pagination links"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:202
|
||||
msgid "category.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:204
|
||||
msgid ""
|
||||
"This template will be processed for each of the existing categories, with"
|
||||
" output generated according to the ``CATEGORY_SAVE_AS`` setting "
|
||||
"(`Default:` ``category/{slug}.html``). If pagination is active, "
|
||||
"subsequent pages will by default reside at "
|
||||
"``category/{slug}{number}.html``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:212 ../../themes.rst:246 ../../themes.rst:372
|
||||
msgid "category"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:212
|
||||
msgid "The name of the category being processed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:213
|
||||
msgid "Articles for this category"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:214
|
||||
msgid "Articles for this category, but ordered by date, ascending"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:222 ../../themes.rst:311
|
||||
msgid "A paginator object for the list of articles, ordered by date, ascending"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:224 ../../themes.rst:313
|
||||
msgid "The current page of articles, ordered by date, ascending"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:230
|
||||
msgid ""
|
||||
"CATEGORY_URL where everything after `{slug}` is removed -- useful for "
|
||||
"pagination links"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:236
|
||||
msgid "article.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:238
|
||||
msgid ""
|
||||
"This template will be processed for each article, with output generated "
|
||||
"according to the ``ARTICLE_SAVE_AS`` setting (`Default:` "
|
||||
"``{slug}.html``). The following variables are available when rendering."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:245
|
||||
msgid "article"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:245
|
||||
msgid "The article object to be displayed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:246
|
||||
msgid "The name of the category for the current article"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:249
|
||||
msgid ""
|
||||
"Any metadata that you put in the header of the article source file will "
|
||||
"be available as fields on the ``article`` object. The field name will be "
|
||||
"the same as the name of the metadata field, except in all-lowercase "
|
||||
"characters."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:253
|
||||
msgid ""
|
||||
"For example, you could add a field called `FacebookImage` to your article"
|
||||
" metadata, as shown below:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:266
|
||||
msgid ""
|
||||
"This new metadata will be made available as `article.facebookimage` in "
|
||||
"your `article.html` template. This would allow you, for example, to "
|
||||
"specify an image for the Facebook open graph tags that will change for "
|
||||
"each article:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:276
|
||||
msgid "page.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:278
|
||||
msgid ""
|
||||
"This template will be processed for each page, with output generated "
|
||||
"according to the ``PAGE_SAVE_AS`` setting (`Default:` "
|
||||
"``pages/{slug}.html``). The following variables are available when "
|
||||
"rendering."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:285
|
||||
msgid "page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:285
|
||||
msgid ""
|
||||
"The page object to be displayed. You can access its title, slug, and "
|
||||
"content."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:291
|
||||
msgid "tag.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:293
|
||||
msgid ""
|
||||
"This template will be processed for each tag, with output generated "
|
||||
"according to the ``TAG_SAVE_AS`` setting (`Default:` "
|
||||
"``tag/{slug}.html``). If pagination is active, subsequent pages will by "
|
||||
"default reside at ``tag/{slug}{number}.html``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:301
|
||||
msgid "tag"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:301
|
||||
msgid "The name of the tag being processed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:302
|
||||
msgid "Articles related to this tag"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:303
|
||||
msgid "Articles related to this tag, but ordered by date, ascending"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:319
|
||||
msgid ""
|
||||
"TAG_URL where everything after `{slug}` is removed -- useful for "
|
||||
"pagination links"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:325
|
||||
msgid "period_archives.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:327
|
||||
msgid ""
|
||||
"This template will be processed for each year of your posts if a path for"
|
||||
" ``YEAR_ARCHIVE_SAVE_AS`` is defined, each month if "
|
||||
"``MONTH_ARCHIVE_SAVE_AS`` is defined, and each day if "
|
||||
"``DAY_ARCHIVE_SAVE_AS`` is defined."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:334
|
||||
msgid "period"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:334
|
||||
msgid ""
|
||||
"A tuple of the form (`year`, `month`, `day`) that indicates the current "
|
||||
"time period. `year` and `day` are numbers while `month` is a string. This"
|
||||
" tuple only contains `year` if the time period is a given year. It "
|
||||
"contains both `year` and `month` if the time period is over years and "
|
||||
"months and so on."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:341
|
||||
msgid "period_num"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:341
|
||||
msgid ""
|
||||
"A tuple of the form (``year``, ``month``, ``day``), as in ``period``, "
|
||||
"except all values are numbers."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:346
|
||||
msgid ""
|
||||
"You can see an example of how to use `period` in the `\"simple\" theme "
|
||||
"period_archives.html template "
|
||||
"<https://github.com/getpelican/pelican/blob/master/pelican/themes/simple/templates/period_archives.html>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:352
|
||||
msgid "Objects"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:354
|
||||
msgid ""
|
||||
"Detail objects attributes that are available and useful in templates. Not"
|
||||
" all attributes are listed here, this is a selection of attributes "
|
||||
"considered useful in a template."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:361
|
||||
msgid "Article"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:363
|
||||
msgid "The string representation of an Article is the `source_path` attribute."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:366 ../../themes.rst:410 ../../themes.rst:429
|
||||
msgid "Attribute"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:368
|
||||
msgid "The :ref:`Author <object-author_cat_tag>` of this article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:370
|
||||
msgid "A list of :ref:`Authors <object-author_cat_tag>` of this article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:372
|
||||
msgid "The :ref:`Category <object-author_cat_tag>` of this article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:374 ../../themes.rst:433
|
||||
msgid "content"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:374
|
||||
msgid "The rendered content of the article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:375 ../../themes.rst:434
|
||||
msgid "date"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:375
|
||||
msgid "Datetime object representing the article date."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:376 ../../themes.rst:435
|
||||
msgid "date_format"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:376 ../../themes.rst:435
|
||||
msgid "Either default date format or locale date format."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:377 ../../themes.rst:436
|
||||
msgid "default_template"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:377 ../../themes.rst:436
|
||||
msgid "Default template name."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:378 ../../themes.rst:437
|
||||
msgid "in_default_lang"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:378 ../../themes.rst:437
|
||||
msgid "Boolean representing if the article is written in the default language."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:380 ../../themes.rst:439
|
||||
msgid "lang"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:380 ../../themes.rst:439
|
||||
msgid "Language of the article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:381 ../../themes.rst:440
|
||||
msgid "locale_date"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:381 ../../themes.rst:440
|
||||
msgid "Date formatted by the `date_format`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:382 ../../themes.rst:441
|
||||
msgid "metadata"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:382
|
||||
msgid "Article header metadata `dict`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:383 ../../themes.rst:414 ../../themes.rst:442
|
||||
msgid "save_as"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:383
|
||||
msgid "Location to save the article page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:384 ../../themes.rst:415 ../../themes.rst:443
|
||||
msgid "slug"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:384 ../../themes.rst:415 ../../themes.rst:443
|
||||
msgid "Page slug."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:385 ../../themes.rst:444
|
||||
msgid "source_path"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:385
|
||||
msgid "Full system path of the article source file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:386 ../../themes.rst:445
|
||||
msgid "relative_source_path"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:386
|
||||
msgid "Relative path from PATH_ to the article source file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:387 ../../themes.rst:446
|
||||
msgid "status"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:387
|
||||
msgid "The article status, can be any of 'published' or 'draft'."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:389 ../../themes.rst:448
|
||||
msgid "summary"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:389 ../../themes.rst:448
|
||||
msgid "Rendered summary content."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:390 ../../themes.rst:449
|
||||
msgid "List of :ref:`Tag <object-author_cat_tag>` objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:392 ../../themes.rst:451
|
||||
msgid "template"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:392 ../../themes.rst:451
|
||||
msgid "Template name to use for rendering."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:393 ../../themes.rst:452
|
||||
msgid "title"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:393
|
||||
msgid "Title of the article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:394 ../../themes.rst:453
|
||||
msgid "translations"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:394 ../../themes.rst:453
|
||||
msgid "List of translations :ref:`Article <object-article>` objects."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:396 ../../themes.rst:416 ../../themes.rst:455
|
||||
msgid "url"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:396
|
||||
msgid "URL to the article page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:405
|
||||
msgid "Author / Category / Tag"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:407
|
||||
msgid "The string representation of those objects is the `name` attribute."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:412
|
||||
msgid "name"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:412
|
||||
msgid "Name of this object [1]_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:413
|
||||
msgid "Author page name."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:414
|
||||
msgid "Location to save the author page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:416
|
||||
msgid "URL to the author page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:419
|
||||
msgid "for Author object, coming from `:authors:` or `AUTHOR`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:424
|
||||
msgid "Page"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:426
|
||||
msgid "The string representation of a Page is the `source_path` attribute."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:431
|
||||
msgid "The :ref:`Author <object-author_cat_tag>` of this page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:433
|
||||
msgid "The rendered content of the page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:434
|
||||
msgid "Datetime object representing the page date."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:441
|
||||
msgid "Page header metadata `dict`."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:442
|
||||
msgid "Location to save the page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:444
|
||||
msgid "Full system path of the page source file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:445
|
||||
msgid "Relative path from PATH_ to the page source file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:446
|
||||
msgid "The page status, can be any of 'published', 'hidden' or 'draft'."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:452
|
||||
msgid "Title of the page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:455
|
||||
msgid "URL to the page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:462
|
||||
msgid "Feeds"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:464
|
||||
msgid ""
|
||||
"The feed variables changed in 3.0. Each variable now explicitly lists "
|
||||
"ATOM or RSS in the name. ATOM is still the default. Old themes will need "
|
||||
"to be updated. Here is a complete list of the feed variables::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:483
|
||||
msgid "Inheritance"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:485
|
||||
msgid ""
|
||||
"Since version 3.0, Pelican supports inheritance from the ``simple`` "
|
||||
"theme, so you can re-use the ``simple`` theme templates in your own "
|
||||
"themes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:488
|
||||
msgid ""
|
||||
"If one of the mandatory files in the ``templates/`` directory of your "
|
||||
"theme is missing, it will be replaced by the matching template from the "
|
||||
"``simple`` theme. So if the HTML structure of a template in the "
|
||||
"``simple`` theme is right for you, you don't have to write a new template"
|
||||
" from scratch."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:493
|
||||
#, python-format
|
||||
msgid ""
|
||||
"You can also extend templates from the ``simple`` theme in your own "
|
||||
"themes by using the ``{% extends %}`` directive as in the following "
|
||||
"example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:504
|
||||
msgid "Example"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:506
|
||||
msgid "With this system, it is possible to create a theme with just two files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:509
|
||||
msgid "base.html"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:511
|
||||
msgid "The first file is the ``templates/base.html`` template:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:522
|
||||
msgid ""
|
||||
"On the first line, we extend the ``base.html`` template from the "
|
||||
"``simple`` theme, so we don't have to rewrite the entire file."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:524
|
||||
msgid ""
|
||||
"On the third line, we open the ``head`` block which has already been "
|
||||
"defined in the ``simple`` theme."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:526
|
||||
msgid ""
|
||||
"On the fourth line, the function ``super()`` keeps the content previously"
|
||||
" inserted in the ``head`` block."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:528
|
||||
msgid "On the fifth line, we append a stylesheet to the page."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:529
|
||||
msgid "On the last line, we close the ``head`` block."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:531
|
||||
msgid ""
|
||||
"This file will be extended by all the other templates, so the stylesheet "
|
||||
"will be linked from all pages."
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:535
|
||||
msgid "style.css"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:537
|
||||
msgid "The second file is the ``static/css/style.css`` CSS stylesheet:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:581
|
||||
msgid "Download"
|
||||
msgstr ""
|
||||
|
||||
#: ../../themes.rst:583
|
||||
msgid ""
|
||||
"You can download this example theme :download:`here <_static/theme-"
|
||||
"basic.zip>`."
|
||||
msgstr ""
|
||||
|
||||
BIN
docs/locales/zh_CN/LC_MESSAGES/tips.mo
Normal file
BIN
docs/locales/zh_CN/LC_MESSAGES/tips.mo
Normal file
Binary file not shown.
259
docs/locales/zh_CN/LC_MESSAGES/tips.po
Normal file
259
docs/locales/zh_CN/LC_MESSAGES/tips.po
Normal file
|
|
@ -0,0 +1,259 @@
|
|||
# SOME DESCRIPTIVE TITLE.
|
||||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
#
|
||||
#, fuzzy
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
"Language-Team: zh_CN <LL@li.org>\n"
|
||||
"Plural-Forms: nplurals=1; plural=0;\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
|
||||
#: ../../tips.rst:2
|
||||
msgid "Tips"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:4
|
||||
msgid "Here are some tips about Pelican that you might find useful."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:7 ../../tips.rst:114
|
||||
msgid "Custom 404 Pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:9
|
||||
msgid ""
|
||||
"When a browser requests a resource that the web server cannot find, the "
|
||||
"web server usually displays a generic \"File not found\" (404) error page"
|
||||
" that can be stark and unsightly. One way to provide an error page that "
|
||||
"matches the theme of your site is to create a custom 404 page (*not* an "
|
||||
"article), such as this Markdown-formatted example stored in "
|
||||
"``content/pages/404.md``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:22
|
||||
msgid ""
|
||||
"The next step is to configure your web server to display this custom page"
|
||||
" instead of its default 404 page. For Nginx, add the following to your "
|
||||
"configuration file's ``location`` block::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:28
|
||||
msgid "For Apache::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:32
|
||||
msgid ""
|
||||
"For Amazon S3, first navigate to the ``Static Site Hosting`` menu in the "
|
||||
"bucket settings on your AWS console. From there::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:38
|
||||
msgid "Publishing to GitHub"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:40
|
||||
msgid ""
|
||||
"`GitHub Pages <https://help.github.com/categories/20/articles>`_ offer an"
|
||||
" easy and convenient way to publish Pelican sites. There are `two types "
|
||||
"of GitHub Pages <https://help.github.com/articles/user-organization-and-"
|
||||
"project-pages>`_: *Project Pages* and *User Pages*. Pelican sites can be "
|
||||
"published as both Project Pages and User Pages."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:47
|
||||
msgid "Project Pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:49
|
||||
msgid ""
|
||||
"To publish a Pelican site as a Project Page you need to *push* the "
|
||||
"content of the ``output`` dir generated by Pelican to a repository's "
|
||||
"``gh-pages`` branch on GitHub."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:53
|
||||
msgid ""
|
||||
"The excellent `ghp-import <https://github.com/davisp/ghp-import>`_, which"
|
||||
" can be installed with ``pip``, makes this process really easy."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:56
|
||||
msgid ""
|
||||
"For example, if the source of your Pelican site is contained in a GitHub "
|
||||
"repository, and if you want to publish that Pelican site in the form of "
|
||||
"Project Pages to this repository, you can then use the following::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:64
|
||||
msgid ""
|
||||
"The ``ghp-import output`` command updates the local ``gh-pages`` branch "
|
||||
"with the content of the ``output`` directory (creating the branch if it "
|
||||
"doesn't already exist). The ``git push origin gh-pages`` command updates "
|
||||
"the remote ``gh-pages`` branch, effectively publishing the Pelican site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:71
|
||||
msgid ""
|
||||
"The ``github`` target of the Makefile (and the ``gh_pages`` task of "
|
||||
"``tasks.py``) created by the ``pelican-quickstart`` command publishes the"
|
||||
" Pelican site as Project Pages, as described above."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:76
|
||||
msgid "User Pages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:78
|
||||
msgid ""
|
||||
"To publish a Pelican site in the form of User Pages, you need to *push* "
|
||||
"the content of the ``output`` dir generated by Pelican to the ``master`` "
|
||||
"branch of your ``<username>.github.io`` repository on GitHub."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:82
|
||||
msgid "Again, you can take advantage of ``ghp-import``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:88
|
||||
msgid ""
|
||||
"The ``git push`` command pushes the local ``gh-pages`` branch (freshly "
|
||||
"updated by the ``ghp-import`` command) to the ``elemoine.github.io`` "
|
||||
"repository's ``master`` branch on GitHub."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:94
|
||||
msgid ""
|
||||
"To publish your Pelican site as User Pages, feel free to adjust the "
|
||||
"``github`` target of the Makefile."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:97
|
||||
msgid ""
|
||||
"Another option for publishing to User Pages is to generate the output "
|
||||
"files in the root directory of the project."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:100
|
||||
msgid ""
|
||||
"For example, your main project folder is ``<username>.github.io`` and you"
|
||||
" can create the Pelican project in a subdirectory called ``Pelican``. "
|
||||
"Then from inside the ``Pelican`` folder you can run::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:106
|
||||
msgid ""
|
||||
"Now you can push the whole project ``<username>.github.io`` to the master"
|
||||
" branch of your GitHub repository::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:111
|
||||
msgid "(assuming origin is set to your remote repository)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:116
|
||||
msgid ""
|
||||
"GitHub Pages will display the custom 404 page described above, as noted "
|
||||
"in the relevant `GitHub docs "
|
||||
"<https://help.github.com/articles/custom-404-pages/>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:120
|
||||
msgid "Update your site on each commit"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:122
|
||||
msgid ""
|
||||
"To automatically update your Pelican site on each commit, you can create "
|
||||
"a post-commit hook. For example, you can add the following to "
|
||||
"``.git/hooks/post-commit``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:129
|
||||
msgid "Copy static files to the root of your site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:131
|
||||
msgid ""
|
||||
"To use a `custom domain <https://help.github.com/articles/setting-up-a"
|
||||
"-custom-domain-with-pages>`_ with GitHub Pages, you need to put the "
|
||||
"domain of your site (e.g., ``blog.example.com``) inside a ``CNAME`` file "
|
||||
"at the root of your site. To do this, create the ``content/extra/`` "
|
||||
"directory and add a ``CNAME`` file to it. Then use the ``STATIC_PATHS`` "
|
||||
"setting to tell Pelican to copy this file to your output directory. For "
|
||||
"example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:142
|
||||
msgid "Note: use forward slashes, ``/``, even on Windows."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:144
|
||||
msgid ""
|
||||
"You can also use the ``EXTRA_PATH_METADATA`` mechanism to place a "
|
||||
"``favicon.ico`` or ``robots.txt`` at the root of any site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:148
|
||||
msgid "How to add YouTube or Vimeo Videos"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:150
|
||||
msgid ""
|
||||
"The easiest way is to paste the embed code of the video from these sites "
|
||||
"directly into your source content."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:153
|
||||
msgid ""
|
||||
"Alternatively, you can also use Pelican plugins like ``liquid_tags``, "
|
||||
"``pelican_youtube``, or ``pelican_vimeo`` to embed videos in your "
|
||||
"content."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:156
|
||||
msgid ""
|
||||
"Moreover, markup languages like reST and Markdown have plugins that let "
|
||||
"you embed videos in the markup. You can use `reST video directive "
|
||||
"<https://gist.github.com/dbrgn/2922648>`_ for reST or `mdx_video plugin "
|
||||
"<https://github.com/italomaia/mdx-video>`_ for Markdown."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:163
|
||||
msgid "Develop Locally Using SSL"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:165
|
||||
msgid "Here's how you can set up your local pelican server to support SSL."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:167
|
||||
msgid ""
|
||||
"First, create a self-signed certificate and key using ``openssl`` (this "
|
||||
"creates ``cert.pem`` and ``key.pem``)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:171
|
||||
msgid ""
|
||||
"And use this command to launch the server (the server starts within your "
|
||||
"``output`` directory)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:175
|
||||
msgid "If you are using ``develop-server.sh``, add this to the top::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:180
|
||||
msgid "and modify the ``pelican.server`` line as follows::"
|
||||
msgstr ""
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue