mirror of
https://github.com/getpelican/pelican.git
synced 2025-10-15 20:28:56 +02:00
update previous translation
This commit is contained in:
parent
4da471211a
commit
9f7bf97e7e
23 changed files with 2050 additions and 1438 deletions
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-10-11 10:44+0800\n"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -175,38 +175,48 @@ msgid ""
|
|||
" to make that determination."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:83
|
||||
#: ../../../CONTRIBUTING.rst:82
|
||||
msgid ""
|
||||
"Also, if you intend to submit a pull request to address something for "
|
||||
"which there is no existing issue, there is no need to create a new issue "
|
||||
"and then immediately submit a pull request that closes it. You can submit"
|
||||
" the pull request by itself."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:87
|
||||
msgid "Using Git and GitHub"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:85
|
||||
#: ../../../CONTRIBUTING.rst:89
|
||||
msgid ""
|
||||
"`Create a new branch`_ specific to your change (as opposed to making your"
|
||||
" commits in the master branch)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:87
|
||||
#: ../../../CONTRIBUTING.rst:91
|
||||
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."
|
||||
"branch and pull request** for the bugfix. Similarly, any proposed changes"
|
||||
" to code style formatting should be in a completely separate pull "
|
||||
"request."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:91
|
||||
#: ../../../CONTRIBUTING.rst:96
|
||||
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
|
||||
#: ../../../CONTRIBUTING.rst:104
|
||||
msgid ""
|
||||
"Check for unnecessary whitespace via ``git diff --check`` before "
|
||||
"committing."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:100
|
||||
#: ../../../CONTRIBUTING.rst:105
|
||||
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 "
|
||||
|
|
@ -216,73 +226,56 @@ msgid ""
|
|||
"automatically closed upon PR merge)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:105
|
||||
#: ../../../CONTRIBUTING.rst:110
|
||||
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
|
||||
#: ../../../CONTRIBUTING.rst:112
|
||||
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
|
||||
#: ../../../CONTRIBUTING.rst:114
|
||||
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 "
|
||||
"system will run the test suite on all supported Python versions and check"
|
||||
" for code style 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
|
||||
#: ../../../CONTRIBUTING.rst:121
|
||||
msgid "Contribution quality standards"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:125
|
||||
#: ../../../CONTRIBUTING.rst:123
|
||||
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."
|
||||
"Adhere to the project's code style standards. See: `Development "
|
||||
"Environment`_"
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:132
|
||||
#: ../../../CONTRIBUTING.rst:124
|
||||
msgid ""
|
||||
"Ensure your code is compatible with the `officially-supported Python "
|
||||
"releases`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:133
|
||||
#: ../../../CONTRIBUTING.rst:125
|
||||
msgid ""
|
||||
"Add docs and tests for your changes. Undocumented and untested features "
|
||||
"will not be accepted."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:135
|
||||
#: ../../../CONTRIBUTING.rst:127
|
||||
msgid ""
|
||||
":pelican-doc:`Run all the tests <contribute>` **on all versions of Python"
|
||||
" supported by Pelican** to ensure nothing was accidentally broken."
|
||||
msgstr ""
|
||||
|
||||
#: ../../../CONTRIBUTING.rst:138
|
||||
#: ../../../CONTRIBUTING.rst:130
|
||||
msgid ""
|
||||
"Check out our `Git Tips`_ page or `ask for help`_ if you need assistance "
|
||||
"or have any questions about these guidelines."
|
||||
|
|
@ -295,21 +288,21 @@ 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."
|
||||
"following instructions will utilize Pip_ and PDM_. 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."
|
||||
msgid "Please note that Python |min_python| 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::"
|
||||
"*(Optional)* If you prefer to `install PDM "
|
||||
"<https://pdm.fming.dev/latest/#installation>`_ once for use with multiple"
|
||||
" projects, you can install it via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:29
|
||||
|
|
@ -321,39 +314,39 @@ 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::"
|
||||
"While PDM 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
|
||||
#: ../../contribute.rst:45 ../../contribute.rst:145
|
||||
msgid "Install the needed dependencies and set up the project::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:51
|
||||
#: ../../contribute.rst:50
|
||||
msgid "Your local environment should now be ready to go!"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:58
|
||||
#: ../../contribute.rst:57
|
||||
msgid "Development"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:60
|
||||
#: ../../contribute.rst:59
|
||||
msgid ""
|
||||
"Once Pelican has been set up for local development, create a topic branch"
|
||||
" for your bug fix or feature::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:65
|
||||
#: ../../contribute.rst:64
|
||||
msgid ""
|
||||
"Now you can make changes to Pelican, its documentation, and/or other "
|
||||
"aspects of the project."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:69
|
||||
#: ../../contribute.rst:68
|
||||
msgid "Running the test suite"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:71
|
||||
#: ../../contribute.rst:70
|
||||
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 "
|
||||
|
|
@ -361,14 +354,20 @@ msgid ""
|
|||
"``pelican/tests``, and you can run them via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:78
|
||||
#: ../../contribute.rst:77
|
||||
msgid ""
|
||||
"(For more on Invoke, see ``invoke -l`` to list tasks, or "
|
||||
"https://pyinvoke.org for documentation.)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:80
|
||||
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
|
||||
#: ../../contribute.rst:85
|
||||
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. "
|
||||
|
|
@ -376,7 +375,7 @@ msgid ""
|
|||
"did not touch."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:87
|
||||
#: ../../contribute.rst:89
|
||||
msgid ""
|
||||
"After making your changes and running the tests, you may see a test "
|
||||
"failure mentioning that \"some generated files differ from the expected "
|
||||
|
|
@ -388,7 +387,7 @@ msgid ""
|
|||
" and then run the following command::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:97
|
||||
#: ../../contribute.rst:99
|
||||
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 "
|
||||
|
|
@ -396,7 +395,7 @@ msgid ""
|
|||
"tests are not affected by your changes."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:102
|
||||
#: ../../contribute.rst:104
|
||||
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 "
|
||||
|
|
@ -404,17 +403,17 @@ msgid ""
|
|||
"``virtualenv`` environments."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:110
|
||||
#: ../../contribute.rst:112
|
||||
msgid "Building the docs"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:112
|
||||
#: ../../contribute.rst:114
|
||||
msgid ""
|
||||
"If you make changes to the documentation, you should build and inspect "
|
||||
"your changes before committing them::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:117
|
||||
#: ../../contribute.rst:119
|
||||
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 "
|
||||
|
|
@ -422,24 +421,24 @@ msgid ""
|
|||
"reloads when it detects changes to the documentation source files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:123
|
||||
#: ../../contribute.rst:125
|
||||
msgid "Plugin development"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:125
|
||||
#: ../../contribute.rst:127
|
||||
msgid ""
|
||||
"To create a *new* Pelican plugin, please refer to the `plugin template`_ "
|
||||
"repository for detailed instructions."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:128
|
||||
#: ../../contribute.rst:130
|
||||
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
|
||||
#: ../../contribute.rst:136
|
||||
msgid ""
|
||||
"Assuming you wanted to contribute to the Simple Footnotes plugin, you "
|
||||
"would first browse to the `Simple Footnotes`_ repository on GitHub and "
|
||||
|
|
@ -447,34 +446,34 @@ msgid ""
|
|||
" and add the upstream project as a Git remote::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:147
|
||||
#: ../../contribute.rst:149
|
||||
msgid "Create a topic branch for your plugin bug fix or feature::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:151
|
||||
#: ../../contribute.rst:153
|
||||
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
|
||||
#: ../../contribute.rst:159
|
||||
msgid ""
|
||||
"If style violations are found, many of them can be addressed "
|
||||
"automatically via::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:162
|
||||
#: ../../contribute.rst:163
|
||||
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
|
||||
#: ../../contribute.rst:171
|
||||
msgid "Submitting your changes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:172
|
||||
#: ../../contribute.rst:173
|
||||
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, "
|
||||
|
|
@ -482,29 +481,29 @@ msgid ""
|
|||
"changelog entry. For example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:181
|
||||
#: ../../contribute.rst:182
|
||||
msgid "Commit your changes and push your topic branch::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:187
|
||||
#: ../../contribute.rst:188
|
||||
msgid ""
|
||||
"Finally, browse to your repository fork on GitHub and submit a pull "
|
||||
"request."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:191
|
||||
#: ../../contribute.rst:192
|
||||
msgid "Logging tips"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:193
|
||||
#: ../../contribute.rst:194
|
||||
msgid "Try to use logging with appropriate levels."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:195
|
||||
#: ../../contribute.rst:196
|
||||
msgid "For logging messages that are not repeated, use the usual Python way::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:204
|
||||
#: ../../contribute.rst:205
|
||||
#, python-format
|
||||
msgid ""
|
||||
"Do not format log messages yourself. Use ``%s`` formatting in messages "
|
||||
|
|
@ -512,24 +511,24 @@ msgid ""
|
|||
"logger will preprocess some arguments, such as exceptions."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:209
|
||||
#: ../../contribute.rst:210
|
||||
msgid "Limiting extraneous log messages"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:211
|
||||
#: ../../contribute.rst:212
|
||||
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
|
||||
#: ../../contribute.rst:219
|
||||
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
|
||||
#: ../../contribute.rst:222
|
||||
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 "
|
||||
|
|
@ -537,21 +536,21 @@ msgid ""
|
|||
"corresponding log messages will be ignored."
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:226
|
||||
#: ../../contribute.rst:227
|
||||
msgid ""
|
||||
"For example, if you want to log missing resources, use the following "
|
||||
"code::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:234
|
||||
#: ../../contribute.rst:235
|
||||
msgid "The log messages will be displayed as follows::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:244
|
||||
#: ../../contribute.rst:245
|
||||
msgid "Outputting traceback in the logs"
|
||||
msgstr ""
|
||||
|
||||
#: ../../contribute.rst:246
|
||||
#: ../../contribute.rst:247
|
||||
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`` "
|
||||
|
|
@ -588,3 +587,89 @@ msgstr ""
|
|||
#~ "accidentally broken."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
#~ msgid "Please note that Python 3.7+ is required for Pelican development."
|
||||
#~ msgstr ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "While Poetry can dynamically create and"
|
||||
#~ " manage virtual environments, we're going"
|
||||
#~ " to manually create and activate a"
|
||||
#~ " virtual environment::"
|
||||
#~ msgstr ""
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-10-11 10:44+0800\n"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -318,19 +318,11 @@ msgid ""
|
|||
" 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
|
||||
#: ../../faq.rst:221
|
||||
msgid "How to process only a subset of all articles?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:227
|
||||
#: ../../faq.rst:223
|
||||
msgid ""
|
||||
"It is often useful to process only e.g. 10 articles for debugging "
|
||||
"purposes. This can be achieved by explicitly specifying only the "
|
||||
|
|
@ -339,11 +331,11 @@ msgid ""
|
|||
"-name '*.md' | head -n 10``."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:233
|
||||
#: ../../faq.rst:229
|
||||
msgid "My tag cloud is missing/broken since I upgraded Pelican"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:235
|
||||
#: ../../faq.rst:231
|
||||
msgid ""
|
||||
"In an ongoing effort to streamline Pelican, tag cloud generation has been"
|
||||
" moved out of Pelican core and into a separate `plugin "
|
||||
|
|
@ -351,11 +343,11 @@ msgid ""
|
|||
"documentation for further information about the Pelican plugin system."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:241
|
||||
#: ../../faq.rst:237
|
||||
msgid "Since I upgraded Pelican my pages are no longer rendered"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:243
|
||||
#: ../../faq.rst:239
|
||||
msgid ""
|
||||
"Pages were available to themes as lowercase ``pages`` and uppercase "
|
||||
"``PAGES``. To bring this inline with the :ref:`templates-variables` "
|
||||
|
|
@ -364,15 +356,15 @@ msgid ""
|
|||
"replace::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:250
|
||||
#: ../../faq.rst:246
|
||||
msgid "with something like::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:255
|
||||
#: ../../faq.rst:251
|
||||
msgid "How can I stop Pelican from trying to parse my static files as content?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:257
|
||||
#: ../../faq.rst:253
|
||||
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"
|
||||
|
|
@ -382,18 +374,18 @@ msgid ""
|
|||
"treated as static files."
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:263
|
||||
#: ../../faq.rst:259
|
||||
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
|
||||
#: ../../faq.rst:263
|
||||
msgid "Why is [arbitrary Markdown syntax] not supported?"
|
||||
msgstr ""
|
||||
|
||||
#: ../../faq.rst:269
|
||||
#: ../../faq.rst:265
|
||||
msgid ""
|
||||
"Pelican does not directly handle Markdown processing and instead "
|
||||
"delegates that task to the Python-Markdown_ project, the core of which "
|
||||
|
|
@ -443,3 +435,12 @@ msgstr ""
|
|||
#~ msgid "My tag-cloud is missing/broken since I upgraded Pelican"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -17,7 +17,7 @@ msgstr ""
|
|||
"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"
|
||||
"Generated-By: Babel 2.13.0\n"
|
||||
|
||||
#: ../../importer.rst:4
|
||||
msgid "Importing an existing site"
|
||||
|
|
@ -43,29 +43,25 @@ msgid "Dotclear export"
|
|||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:14
|
||||
msgid "Posterous API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:15
|
||||
msgid "Tumblr API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:16
|
||||
#: ../../importer.rst:15
|
||||
msgid "WordPress XML export"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:17
|
||||
#: ../../importer.rst:16
|
||||
msgid "RSS/Atom feed"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:19
|
||||
#: ../../importer.rst:18
|
||||
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
|
||||
#: ../../importer.rst:24
|
||||
msgid ""
|
||||
"Unlike Pelican, Wordpress supports multiple categories per article. These"
|
||||
" are imported as a comma-separated string. You have to resolve these "
|
||||
|
|
@ -73,137 +69,125 @@ msgid ""
|
|||
"multiple categories per article."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:31
|
||||
#: ../../importer.rst:30
|
||||
msgid "Dependencies"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:33
|
||||
#: ../../importer.rst:32
|
||||
msgid ""
|
||||
"``pelican-import`` has some dependencies not required by the rest of "
|
||||
"Pelican:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:35
|
||||
#: ../../importer.rst:34
|
||||
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
|
||||
#: ../../importer.rst:37
|
||||
msgid "*Feedparser*, for feed import (``pip install feedparser``)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:39
|
||||
#: ../../importer.rst:38
|
||||
msgid ""
|
||||
"*Pandoc*, see the `Pandoc site`_ for installation instructions on your "
|
||||
"operating system."
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:47
|
||||
#: ../../importer.rst:46
|
||||
msgid "Usage"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:57
|
||||
#: ../../importer.rst:56
|
||||
msgid "Positional arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:59
|
||||
#: ../../importer.rst:58
|
||||
msgid "``input``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:59
|
||||
#: ../../importer.rst:58
|
||||
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
|
||||
#: ../../importer.rst:59
|
||||
msgid "``api_key``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:61
|
||||
#: ../../importer.rst:59
|
||||
msgid ""
|
||||
"(Tumblr only) api_key can be obtained from "
|
||||
"https://www.tumblr.com/oauth/apps"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:65
|
||||
#: ../../importer.rst:63
|
||||
msgid "Optional arguments"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:67
|
||||
#: ../../importer.rst:65
|
||||
msgid "Show this help message and exit"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:68
|
||||
#: ../../importer.rst:66
|
||||
msgid "Blogger XML export (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:69
|
||||
#: ../../importer.rst:67
|
||||
msgid "Dotclear export (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:70
|
||||
msgid "Posterous API (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:71
|
||||
#: ../../importer.rst:68
|
||||
msgid "Tumblr API (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:72
|
||||
#: ../../importer.rst:69
|
||||
msgid "WordPress XML export (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:73
|
||||
#: ../../importer.rst:70
|
||||
msgid "Feed to parse (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:75
|
||||
#: ../../importer.rst:72
|
||||
msgid "Output path (default: content)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:77
|
||||
#: ../../importer.rst:74
|
||||
msgid ""
|
||||
"Output markup format: ``rst``, ``markdown``, or ``asciidoc`` (default: "
|
||||
"``rst``)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:79
|
||||
#: ../../importer.rst:76
|
||||
msgid "Put files in directories with categories name (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:81
|
||||
#: ../../importer.rst:78
|
||||
msgid ""
|
||||
"Put files recognised as pages in \"pages/\" sub- directory (blogger and "
|
||||
"wordpress import only) (default: False)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:84
|
||||
#: ../../importer.rst:81
|
||||
msgid "Import only post from the specified author"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:85
|
||||
#: ../../importer.rst:82
|
||||
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
|
||||
#: ../../importer.rst:85
|
||||
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
|
||||
#: ../../importer.rst:88
|
||||
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 "
|
||||
|
|
@ -214,64 +198,75 @@ msgid ""
|
|||
"internet connection)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:100
|
||||
#: ../../importer.rst:97
|
||||
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
|
||||
#: ../../importer.rst:102
|
||||
msgid "Blog name used in Tumblr API"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:113
|
||||
#: ../../importer.rst:106
|
||||
msgid "Examples"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:115
|
||||
#: ../../importer.rst:108
|
||||
msgid "For Blogger::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:119
|
||||
#: ../../importer.rst:112
|
||||
msgid "For Dotclear::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:123
|
||||
msgid "for Posterous::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:127
|
||||
#: ../../importer.rst:116
|
||||
msgid "For Tumblr::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:131
|
||||
#: ../../importer.rst:120
|
||||
msgid "For WordPress::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:136
|
||||
#: ../../importer.rst:125
|
||||
msgid "Tests"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:138
|
||||
#: ../../importer.rst:127
|
||||
msgid "To test the module, one can use sample files:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:140
|
||||
#: ../../importer.rst:129
|
||||
msgid ""
|
||||
"for WordPress: https://www.wpbeginner.com/wp-themes/how-to-add-dummy-"
|
||||
"content-for-theme-development-in-wordpress/"
|
||||
msgstr ""
|
||||
|
||||
#: ../../importer.rst:141
|
||||
#: ../../importer.rst:130
|
||||
msgid "for Dotclear: http://media.dotaddict.org/tda/downloads/lorem-backup.txt"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Posterous API"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "``api_token``"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid ""
|
||||
#~ "(Posterous only) api_token can be "
|
||||
#~ "obtained from http://posterous.com/api/"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "Posterous API (default: False)"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "Email used to authenticate Posterous API"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "Password used to authenticate Posterous API"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "for Posterous::"
|
||||
#~ msgstr ""
|
||||
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
|
|
@ -3,12 +3,11 @@
|
|||
# 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-10-11 10:44+0800\n"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -25,9 +24,9 @@ msgstr "安装Pelican"
|
|||
|
||||
#: ../../install.rst:4
|
||||
msgid ""
|
||||
"Pelican currently runs best on 3.7+; earlier versions of Python are not "
|
||||
"supported."
|
||||
msgstr "Pelican需要运行在3.7版本以上的Python,低版本的Python是不支持的。"
|
||||
"Pelican currently runs best on |min_python|; earlier versions of Python "
|
||||
"are not supported."
|
||||
msgstr "Pelican需要运行在 |min_python| 版本以上的Python,低版本的Python是不支持的。"
|
||||
|
||||
#: ../../install.rst:6
|
||||
msgid ""
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -2,12 +2,11 @@
|
|||
# Copyright (C) 2010–2023
|
||||
# This file is distributed under the same license as the Pelican package.
|
||||
# FIRST AUTHOR <EMAIL@ADDRESS>, 2023.
|
||||
|
||||
msgid ""
|
||||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -16,7 +15,7 @@ msgstr ""
|
|||
"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"
|
||||
"Generated-By: Babel 2.13.0\n"
|
||||
|
||||
#: ../../plugins.rst:4
|
||||
msgid "Plugins"
|
||||
|
|
@ -27,8 +26,7 @@ msgid ""
|
|||
"Beginning with version 3.0, Pelican supports plugins. Plugins are a way "
|
||||
"to add features to Pelican without having to directly modify the Pelican "
|
||||
"core."
|
||||
msgstr "Pelican从3.0版本开始支持插件。通过插件可以在给Pelican添加功能的同时,"
|
||||
"不直接修改Pelican的核心代码。"
|
||||
msgstr "Pelican从3.0版本开始支持插件。通过插件可以在给Pelican添加功能的同时,不直接修改Pelican的核心代码。"
|
||||
|
||||
#: ../../plugins.rst:10
|
||||
msgid "How to use plugins"
|
||||
|
|
@ -42,9 +40,10 @@ msgid ""
|
|||
"package ``pelican.plugins`` and can be automatically discovered by "
|
||||
"Pelican. To see a list of Pip-installed namespace plugins that are active"
|
||||
" in your environment, run::"
|
||||
msgstr "Pelican从4.5版本开始使用了一种全新的插件结构,利用了命名空间包,并且可以轻松地"
|
||||
"通过 Pip_ 进行安装。支持此结构地插件都会被安装在命名空间包 ``pelican.plugins`` 下,因此"
|
||||
"Pelican可以自动发现他们。下面的命令可以用于查看环境中用Pip安装的所有插件:"
|
||||
msgstr ""
|
||||
"Pelican从4.5版本开始使用了一种全新的插件结构,利用了命名空间包,并且可以轻松地通过 Pip_ "
|
||||
"进行安装。支持此结构地插件都会被安装在命名空间包 ``pelican.plugins`` "
|
||||
"下,因此Pelican可以自动发现他们。下面的命令可以用于查看环境中用Pip安装的所有插件:"
|
||||
|
||||
#: ../../plugins.rst:20
|
||||
msgid ""
|
||||
|
|
@ -54,9 +53,10 @@ msgid ""
|
|||
"auto-discovery will be disabled. At that point, only the plugins you "
|
||||
"specify will be registered, and you must explicitly list any namespace "
|
||||
"plugins as well."
|
||||
msgstr "若将 ``PLUGINS`` 设置项留为默认的 ``None`` ,Pelican会自动发现命名空间中的插件并且"
|
||||
"将他们全部登记上;若你在 ``PLUGINS`` 设置项中指定了一系列的插件,Pelican就不会去自动发现插件,"
|
||||
"也就是说,你需要显示地指定所有要使用的插件,包括在plugins命名空间中的。"
|
||||
msgstr ""
|
||||
"若将 ``PLUGINS`` 设置项留为默认的 ``None`` ,Pelican会自动发现命名空间中的插件并且将他们全部登记上;若你在 "
|
||||
"``PLUGINS`` "
|
||||
"设置项中指定了一系列的插件,Pelican就不会去自动发现插件,也就是说,你需要显示地指定所有要使用的插件,包括在plugins命名空间中的。"
|
||||
|
||||
#: ../../plugins.rst:26
|
||||
msgid ""
|
||||
|
|
@ -64,8 +64,9 @@ msgid ""
|
|||
"ways. The first method specifies plugins as a list of strings. Namespace "
|
||||
"plugins can be specified either by their full names "
|
||||
"(``pelican.plugins.myplugin``) or by their short names (``myplugin``)::"
|
||||
msgstr "在使用 ``PLUGINS`` 设置项时,有两种方式。一是用字符串列表指定插件的名称,可以是"
|
||||
"包含命名空间的完整名称(例如 ``pelican.plugins.myplugin`` ),也可以是简短名称( ``myplugin``):"
|
||||
msgstr ""
|
||||
"在使用 ``PLUGINS`` 设置项时,有两种方式。一是用字符串列表指定插件的名称,可以是包含命名空间的完整名称(例如 "
|
||||
"``pelican.plugins.myplugin`` ),也可以是简短名称( ``myplugin``):"
|
||||
|
||||
#: ../../plugins.rst:35
|
||||
msgid ""
|
||||
|
|
@ -79,9 +80,9 @@ msgid ""
|
|||
"with metadata and content) caching may interfere and the changes may not "
|
||||
"be visible. In such cases disable caching with ``LOAD_CONTENT_CACHE = "
|
||||
"False`` or use the ``--ignore-cache`` command-line switch."
|
||||
msgstr "在尝试不同的插件时(尤其是那些处理元数据和内容的插件),缓存可能会相互干扰,一些更改"
|
||||
"可能会不显示。发生这种情况时,就需要通过设置 ``LOAD_CONTENT_CACHE = False`` 或使用 ``--ignore-cache`` "
|
||||
"命令行选项禁用缓存。"
|
||||
msgstr ""
|
||||
"在尝试不同的插件时(尤其是那些处理元数据和内容的插件),缓存可能会相互干扰,一些更改可能会不显示。发生这种情况时,就需要通过设置 "
|
||||
"``LOAD_CONTENT_CACHE = False`` 或使用 ``--ignore-cache`` 命令行选项禁用缓存。"
|
||||
|
||||
#: ../../plugins.rst:48
|
||||
msgid ""
|
||||
|
|
@ -89,8 +90,9 @@ msgid ""
|
|||
"paths via the ``PLUGIN_PATHS`` setting. As shown in the following "
|
||||
"example, paths in the ``PLUGIN_PATHS`` list can be absolute or relative "
|
||||
"to the settings file::"
|
||||
msgstr "如果插件处于无法直接进行import的路径,可以在 ``PLUGIN_PATHS`` 设置项中指定这些路径。"
|
||||
"如下例所示, ``PLUGIN_PATHS`` 中的路径可以是绝对的,也可以是相对于设置文件的:"
|
||||
msgstr ""
|
||||
"如果插件处于无法直接进行import的路径,可以在 ``PLUGIN_PATHS`` 设置项中指定这些路径。如下例所示, "
|
||||
"``PLUGIN_PATHS`` 中的路径可以是绝对的,也可以是相对于设置文件的:"
|
||||
|
||||
#: ../../plugins.rst:56
|
||||
msgid "Where to find plugins"
|
||||
|
|
@ -102,17 +104,17 @@ msgid ""
|
|||
"individual repositories. Legacy plugins are located in the `pelican-"
|
||||
"plugins repository`_ and will be gradually phased out in favor of the "
|
||||
"namespace versions."
|
||||
msgstr "新的命名空间插件可以在GitHub的 `pelican-plugins 组织`_ 中找到,每个插件都是一个"
|
||||
"独立的仓库。而老的插件则可以在GitHub的 `pelican-plugins 仓库`_ 中找到。这些老的插件会逐步"
|
||||
"淘汰并转移到新的命名空间版本。"
|
||||
msgstr ""
|
||||
"新的命名空间插件可以在GitHub的 `pelican-plugins 组织`_ "
|
||||
"中找到,每个插件都是一个独立的仓库。而老的插件则可以在GitHub的 `pelican-plugins 仓库`_ "
|
||||
"中找到。这些老的插件会逐步淘汰并转移到新的命名空间版本。"
|
||||
|
||||
#: ../../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 "请注意,尽管我们尽全力审查和维护这些插件,但这些插件是Pelican社区提交的,因此支持性和"
|
||||
"互操作性水平各不相同。"
|
||||
msgstr "请注意,尽管我们尽全力审查和维护这些插件,但这些插件是Pelican社区提交的,因此支持性和互操作性水平各不相同。"
|
||||
|
||||
#: ../../plugins.rst:70
|
||||
msgid "How to create plugins"
|
||||
|
|
@ -123,395 +125,393 @@ msgid ""
|
|||
"Plugins are based on the concept of signals. Pelican sends signals, and "
|
||||
"plugins subscribe to those signals. The list of available signals is "
|
||||
"documented in a subsequent section."
|
||||
msgstr "插件是基于信号这一概念的。Pelican会发送信号,插件则订阅这些信号。可用的信号在下一节"
|
||||
"会贴出来。"
|
||||
msgstr "插件是基于信号这一概念的。Pelican会发送信号,插件则订阅这些信号。可用的信号在下一节会贴出来。"
|
||||
|
||||
#: ../../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 "对于插件来说,唯一需要遵循的规则就是一定要定义一个可调用的 ``register`` ,"
|
||||
"在 ``register`` 中需要将信号映射到插件逻辑上。下面是一个简单的例子:"
|
||||
msgstr ""
|
||||
"对于插件来说,唯一需要遵循的规则就是一定要定义一个可调用的 ``register`` ,在 ``register`` "
|
||||
"中需要将信号映射到插件逻辑上。下面是一个简单的例子:"
|
||||
|
||||
#: ../../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 "信号接收器在Pelican中是弱引用的,因此不能将它定义在可调用的 ``register`` 中,"
|
||||
"否则接收器在信号发送之前就会被回收。"
|
||||
msgstr "信号接收器在Pelican中是弱引用的,因此不能将它定义在可调用的 ``register`` 中,否则接收器在信号发送之前就会被回收。"
|
||||
|
||||
#: ../../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 "若一个信号连接有多个插件,则不能保证也不能控制这些插件的执行顺序。Pelican使用 "
|
||||
"Blinker_ 来实现信号,这个缺陷就是从此处继承而来的。"
|
||||
"If multiple plugins connect to the same signal, plugins will be executed "
|
||||
"in the order they are connected. With ``PLUGINS`` setting, order will be "
|
||||
"as defined in the setting. If you rely on auto-discovered namespace "
|
||||
"plugins, no ``PLUGINS`` setting, they will be connected in the same order"
|
||||
" they are discovered (same order as ``pelican-plugins`` output). If you "
|
||||
"want to specify the order explicitly, disable auto-discovery by defining "
|
||||
"``PLUGINS`` in the desired order."
|
||||
msgstr "如果多个插件关联到同一个信号,插件将按照它们关联的前后顺序执行。但若设置了 ``PLUGINS`` 配置项"
|
||||
"会以此配置项中的顺序为准。如果您使用了无需PLUGINS设置的新版命名空间插件,它们将按照被探测到的顺序进行连接"
|
||||
"(与 pelican-plugins 输出的顺序相同)。"
|
||||
|
||||
#: ../../plugins.rst:102
|
||||
#: ../../plugins.rst:105
|
||||
msgid "Namespace plugin structure"
|
||||
msgstr "命名空间插件的结构"
|
||||
|
||||
#: ../../plugins.rst:104
|
||||
#: ../../plugins.rst:107
|
||||
msgid ""
|
||||
"Namespace plugins must adhere to a certain structure in order to function"
|
||||
" properly. They need to be installable (i.e. contain ``setup.py`` or "
|
||||
"equivalent) and have a folder structure as follows::"
|
||||
msgstr "命名空间插件必须遵循特定的结构才能正常工作。这些插件需要是可安装的(即包含 ``setup.py`` 或"
|
||||
"其他等效文件),并且遵循下述文件夹结构:"
|
||||
msgstr "命名空间插件必须遵循特定的结构才能正常工作。这些插件需要是可安装的(即包含 ``setup.py`` 或其他等效文件),并且遵循下述文件夹结构:"
|
||||
|
||||
#: ../../plugins.rst:117
|
||||
#: ../../plugins.rst:120
|
||||
msgid ""
|
||||
"It is crucial that ``pelican`` or ``pelican/plugins`` folder **not** "
|
||||
"contain an ``__init__.py`` file. In fact, it is best to have those "
|
||||
"folders empty besides the listed folders in the above structure and keep "
|
||||
"your plugin related files contained solely in the "
|
||||
"``pelican/plugins/myplugin`` folder to avoid any issues."
|
||||
msgstr "非常关键的一点就是, ``pelican`` 和 ``pelican/plugins`` 文件夹下都 **不能** 包含"
|
||||
" ``__init__.py`` 文件。事实上,这两个文件夹下最好是只有上面列出的文件夹,并且保证与插件相关"
|
||||
"的文件都仅包含在 ``pelican/plugins/myplugin`` 文件夹中,以避免奇奇怪怪的问题。"
|
||||
msgstr ""
|
||||
"非常关键的一点就是, ``pelican`` 和 ``pelican/plugins`` 文件夹下都 **不能** 包含 "
|
||||
"``__init__.py`` 文件。事实上,这两个文件夹下最好是只有上面列出的文件夹,并且保证与插件相关的文件都仅包含在 "
|
||||
"``pelican/plugins/myplugin`` 文件夹中,以避免奇奇怪怪的问题。"
|
||||
|
||||
#: ../../plugins.rst:123
|
||||
#: ../../plugins.rst:126
|
||||
msgid ""
|
||||
"To easily set up the proper structure, a `cookiecutter template for "
|
||||
"plugins`_ is provided. Refer to that project's README for instructions on"
|
||||
" how to use it."
|
||||
msgstr "为了让大家更容易就能建立正确的结构,我们为插件提供了一个 `cookiecutter模板`_ ,"
|
||||
"使用方法参考此项目README文件中的指示即可。"
|
||||
msgstr "为了让大家更容易就能建立正确的结构,我们为插件提供了一个 `cookiecutter模板`_ ,使用方法参考此项目README文件中的指示即可。"
|
||||
|
||||
#: ../../plugins.rst:129
|
||||
#: ../../plugins.rst:132
|
||||
msgid "List of signals"
|
||||
msgstr "信号列表"
|
||||
|
||||
#: ../../plugins.rst:131
|
||||
#: ../../plugins.rst:134
|
||||
msgid "Here is the list of currently implemented signals:"
|
||||
msgstr "下面是目前已经实现了的信号:"
|
||||
|
||||
#: ../../plugins.rst:134
|
||||
#: ../../plugins.rst:137
|
||||
msgid "Signal"
|
||||
msgstr "信号"
|
||||
|
||||
#: ../../plugins.rst:134
|
||||
#: ../../plugins.rst:137
|
||||
msgid "Arguments"
|
||||
msgstr "参数"
|
||||
|
||||
#: ../../plugins.rst:134
|
||||
#: ../../plugins.rst:137
|
||||
msgid "Description"
|
||||
msgstr "描述"
|
||||
|
||||
#: ../../plugins.rst:136
|
||||
#: ../../plugins.rst:139
|
||||
msgid "initialized"
|
||||
msgstr "initialized"
|
||||
|
||||
#: ../../plugins.rst:136 ../../plugins.rst:137 ../../plugins.rst:155
|
||||
#: ../../plugins.rst:158
|
||||
#: ../../plugins.rst:139 ../../plugins.rst:140 ../../plugins.rst:158
|
||||
#: ../../plugins.rst:161
|
||||
msgid "pelican object"
|
||||
msgstr "pelican对象"
|
||||
|
||||
#: ../../plugins.rst:137
|
||||
#: ../../plugins.rst:140
|
||||
msgid "finalized"
|
||||
msgstr "finalized"
|
||||
|
||||
#: ../../plugins.rst:137
|
||||
#: ../../plugins.rst:140
|
||||
msgid ""
|
||||
"invoked after all the generators are executed and just before pelican "
|
||||
"exits useful for custom post processing actions, such as: - minifying "
|
||||
"js/css assets. - notify/ping search engines with an updated sitemap."
|
||||
msgstr "所有generator执行完成后调用,即pelican退出之前。这对于自定义后处理操作是非常有用的,"
|
||||
"例如:- 简化js/css资源。- 向搜索引擎告知更新后的sitemap。"
|
||||
msgstr ""
|
||||
"所有generator执行完成后调用,即pelican退出之前。这对于自定义后处理操作是非常有用的,例如:- 简化js/css资源。- "
|
||||
"向搜索引擎告知更新后的sitemap。"
|
||||
|
||||
#: ../../plugins.rst:141
|
||||
#: ../../plugins.rst:144
|
||||
msgid "generator_init"
|
||||
msgstr "generator_init"
|
||||
|
||||
#: ../../plugins.rst:141
|
||||
#: ../../plugins.rst:144
|
||||
msgid "generator"
|
||||
msgstr "generator"
|
||||
|
||||
#: ../../plugins.rst:141
|
||||
#: ../../plugins.rst:144
|
||||
msgid "invoked in the Generator.__init__"
|
||||
msgstr "在Generator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:142
|
||||
#: ../../plugins.rst:145
|
||||
msgid "all_generators_finalized"
|
||||
msgstr "all_generators_finalized"
|
||||
|
||||
#: ../../plugins.rst:142
|
||||
#: ../../plugins.rst:145
|
||||
msgid "generators"
|
||||
msgstr "generators"
|
||||
|
||||
#: ../../plugins.rst:142
|
||||
#: ../../plugins.rst:145
|
||||
msgid "invoked after all the generators are executed and before writing output"
|
||||
msgstr "在所有generator执行完后,写入输出内容前调用,"
|
||||
|
||||
#: ../../plugins.rst:143
|
||||
#: ../../plugins.rst:146
|
||||
msgid "readers_init"
|
||||
msgstr "readers_init"
|
||||
|
||||
#: ../../plugins.rst:143
|
||||
#: ../../plugins.rst:146
|
||||
msgid "readers"
|
||||
msgstr "readers"
|
||||
|
||||
#: ../../plugins.rst:143
|
||||
#: ../../plugins.rst:146
|
||||
msgid "invoked in the Readers.__init__"
|
||||
msgstr "在Readers.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:144 ../../plugins.rst:198
|
||||
#: ../../plugins.rst:147 ../../plugins.rst:201
|
||||
msgid "article_generator_context"
|
||||
msgstr "article_generator_context"
|
||||
|
||||
#: ../../plugins.rst:144
|
||||
#: ../../plugins.rst:147
|
||||
msgid "article_generator, metadata"
|
||||
msgstr "article_generator, metadata"
|
||||
|
||||
#: ../../plugins.rst:145 ../../plugins.rst:200
|
||||
#: ../../plugins.rst:148 ../../plugins.rst:203
|
||||
msgid "article_generator_preread"
|
||||
msgstr "article_generator_preread"
|
||||
|
||||
#: ../../plugins.rst:145 ../../plugins.rst:147 ../../plugins.rst:148
|
||||
#: ../../plugins.rst:151
|
||||
#: ../../plugins.rst:148 ../../plugins.rst:150 ../../plugins.rst:151
|
||||
#: ../../plugins.rst:154
|
||||
msgid "article_generator"
|
||||
msgstr "article_generator"
|
||||
|
||||
#: ../../plugins.rst:145
|
||||
#: ../../plugins.rst:148
|
||||
msgid ""
|
||||
"invoked before a article is read in ArticlesGenerator.generate_context; "
|
||||
"use if code needs to do something before every article is parsed"
|
||||
msgstr "在ArticlesGenerator.generate_context读取文章之前调用;若代码需要在解析每篇文章前"
|
||||
"执行某些操作,就可以使用此信号。"
|
||||
msgstr "在ArticlesGenerator.generate_context读取文章之前调用;若代码需要在解析每篇文章前执行某些操作,就可以使用此信号。"
|
||||
|
||||
#: ../../plugins.rst:147
|
||||
#: ../../plugins.rst:150
|
||||
msgid "article_generator_init"
|
||||
msgstr "article_generator_init"
|
||||
|
||||
#: ../../plugins.rst:147
|
||||
#: ../../plugins.rst:150
|
||||
msgid "invoked in the ArticlesGenerator.__init__"
|
||||
msgstr "在ArticlesGenerator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:148
|
||||
#: ../../plugins.rst:151
|
||||
msgid "article_generator_pretaxonomy"
|
||||
msgstr "article_generator_pretaxonomy"
|
||||
|
||||
#: ../../plugins.rst:148
|
||||
#: ../../plugins.rst:151
|
||||
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 "在创建类别和标签列表之前调用。例如,当需要变更要生成的文章列表时可以使用,"
|
||||
"如此可以避免一些已移除文章在分类或标签列表中泄露。"
|
||||
msgstr "在创建类别和标签列表之前调用。例如,当需要变更要生成的文章列表时可以使用,如此可以避免一些已移除文章在分类或标签列表中泄露。"
|
||||
|
||||
#: ../../plugins.rst:151 ../../plugins.rst:199
|
||||
#: ../../plugins.rst:154 ../../plugins.rst:202
|
||||
msgid "article_generator_finalized"
|
||||
msgstr "article_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:151
|
||||
#: ../../plugins.rst:154
|
||||
msgid "invoked at the end of ArticlesGenerator.generate_context"
|
||||
msgstr "在ArticlesGenerator.generate_context的最后调用"
|
||||
|
||||
#: ../../plugins.rst:152
|
||||
#: ../../plugins.rst:155
|
||||
msgid "article_generator_write_article"
|
||||
msgstr "article_generator_write_article"
|
||||
|
||||
#: ../../plugins.rst:152
|
||||
#: ../../plugins.rst:155
|
||||
msgid "article_generator, content"
|
||||
msgstr "article_generator, content"
|
||||
|
||||
#: ../../plugins.rst:152
|
||||
#: ../../plugins.rst:155
|
||||
msgid "invoked before writing each article, the article is passed as content"
|
||||
msgstr "在写入每篇文章前调用,文章以内容的形式作为参数传入。"
|
||||
|
||||
#: ../../plugins.rst:153
|
||||
#: ../../plugins.rst:156
|
||||
msgid "article_writer_finalized"
|
||||
msgstr "article_writer_finalized"
|
||||
|
||||
#: ../../plugins.rst:153
|
||||
#: ../../plugins.rst:156
|
||||
msgid "article_generator, writer"
|
||||
msgstr "article_generator, writer"
|
||||
|
||||
#: ../../plugins.rst:153
|
||||
#: ../../plugins.rst:156
|
||||
msgid ""
|
||||
"invoked after all articles and related pages have been written, but "
|
||||
"before the article generator is closed."
|
||||
msgstr "在所有文章及相关联页面写入完成后,在文章generator关闭前调用。"
|
||||
|
||||
#: ../../plugins.rst:155
|
||||
#: ../../plugins.rst:158
|
||||
msgid "get_generators"
|
||||
msgstr "get_generators"
|
||||
|
||||
#: ../../plugins.rst:155
|
||||
#: ../../plugins.rst:158
|
||||
msgid ""
|
||||
"invoked in Pelican.get_generator_classes, can return a Generator, or "
|
||||
"several generators in a tuple or in a list."
|
||||
msgstr "在Pelican.get_generator_classes中调用,可以返回一个Generator,也可以"
|
||||
"以一个元组或列表的形式返回多个generator"
|
||||
msgstr "在Pelican.get_generator_classes中调用,可以返回一个Generator,也可以以一个元组或列表的形式返回多个generator"
|
||||
|
||||
#: ../../plugins.rst:158
|
||||
#: ../../plugins.rst:161
|
||||
msgid "get_writer"
|
||||
msgstr "get_writer"
|
||||
|
||||
#: ../../plugins.rst:158
|
||||
#: ../../plugins.rst:161
|
||||
msgid "invoked in Pelican.get_writer, can return a custom Writer."
|
||||
msgstr "在Pelican.get_writer前调用,可以返回一个自定义Writer。"
|
||||
|
||||
#: ../../plugins.rst:160 ../../plugins.rst:201
|
||||
#: ../../plugins.rst:163 ../../plugins.rst:204
|
||||
msgid "page_generator_context"
|
||||
msgstr "page_generator_context"
|
||||
|
||||
#: ../../plugins.rst:160
|
||||
#: ../../plugins.rst:163
|
||||
msgid "page_generator, metadata"
|
||||
msgstr "page_generator, metadata"
|
||||
|
||||
#: ../../plugins.rst:161 ../../plugins.rst:202
|
||||
#: ../../plugins.rst:164 ../../plugins.rst:205
|
||||
msgid "page_generator_preread"
|
||||
msgstr "page_generator_preread"
|
||||
|
||||
#: ../../plugins.rst:161 ../../plugins.rst:163 ../../plugins.rst:164
|
||||
#: ../../plugins.rst:164 ../../plugins.rst:166 ../../plugins.rst:167
|
||||
msgid "page_generator"
|
||||
msgstr "page_generator"
|
||||
|
||||
#: ../../plugins.rst:161
|
||||
#: ../../plugins.rst:164
|
||||
msgid ""
|
||||
"invoked before a page is read in PageGenerator.generate_context; use if "
|
||||
"code needs to do something before every page is parsed."
|
||||
msgstr "在PageGenerator.generate_context读取页面前调用,若代码需要在解析每个页面前"
|
||||
"执行某些操作,就可以使用此信号。"
|
||||
msgstr "在PageGenerator.generate_context读取页面前调用,若代码需要在解析每个页面前执行某些操作,就可以使用此信号。"
|
||||
|
||||
#: ../../plugins.rst:163 ../../plugins.rst:204
|
||||
#: ../../plugins.rst:166 ../../plugins.rst:207
|
||||
msgid "page_generator_init"
|
||||
msgstr "page_generator_init"
|
||||
|
||||
#: ../../plugins.rst:163
|
||||
#: ../../plugins.rst:166
|
||||
msgid "invoked in the PagesGenerator.__init__"
|
||||
msgstr "在PagesGenerator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:164 ../../plugins.rst:203
|
||||
#: ../../plugins.rst:167 ../../plugins.rst:206
|
||||
msgid "page_generator_finalized"
|
||||
msgstr "page_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:164
|
||||
#: ../../plugins.rst:167
|
||||
msgid "invoked at the end of PagesGenerator.generate_context"
|
||||
msgstr "PagesGenerator.generate_context的最后调用"
|
||||
|
||||
#: ../../plugins.rst:165
|
||||
#: ../../plugins.rst:168
|
||||
msgid "page_generator_write_page"
|
||||
msgstr "page_generator_write_page"
|
||||
|
||||
#: ../../plugins.rst:165
|
||||
#: ../../plugins.rst:168
|
||||
msgid "page_generator, content"
|
||||
msgstr "page_generator, content"
|
||||
|
||||
#: ../../plugins.rst:165
|
||||
#: ../../plugins.rst:168
|
||||
msgid "invoked before writing each page, the page is passed as content"
|
||||
msgstr "在写入每个页面前调用,页面以内容形式作为参数传入"
|
||||
|
||||
#: ../../plugins.rst:166
|
||||
#: ../../plugins.rst:169
|
||||
msgid "page_writer_finalized"
|
||||
msgstr "page_writer_finalized"
|
||||
|
||||
#: ../../plugins.rst:166
|
||||
#: ../../plugins.rst:169
|
||||
msgid "page_generator, writer"
|
||||
msgstr "page_generator, writer"
|
||||
|
||||
#: ../../plugins.rst:166
|
||||
#: ../../plugins.rst:169
|
||||
msgid ""
|
||||
"invoked after all pages have been written, but before the page generator "
|
||||
"is closed."
|
||||
msgstr "在所有页面写入完成后,在页面generator关闭前调用。"
|
||||
|
||||
#: ../../plugins.rst:168 ../../plugins.rst:205
|
||||
#: ../../plugins.rst:171 ../../plugins.rst:208
|
||||
msgid "static_generator_context"
|
||||
msgstr "static_generator_context"
|
||||
|
||||
#: ../../plugins.rst:168
|
||||
#: ../../plugins.rst:171
|
||||
msgid "static_generator, metadata"
|
||||
msgstr "static_generator, metadata"
|
||||
|
||||
#: ../../plugins.rst:169 ../../plugins.rst:206
|
||||
#: ../../plugins.rst:172 ../../plugins.rst:209
|
||||
msgid "static_generator_preread"
|
||||
msgstr "static_generator_preread"
|
||||
|
||||
#: ../../plugins.rst:169 ../../plugins.rst:172 ../../plugins.rst:173
|
||||
#: ../../plugins.rst:172 ../../plugins.rst:175 ../../plugins.rst:176
|
||||
msgid "static_generator"
|
||||
msgstr "static_generator"
|
||||
|
||||
#: ../../plugins.rst:169
|
||||
#: ../../plugins.rst:172
|
||||
msgid ""
|
||||
"invoked before a static file is read in StaticGenerator.generate_context;"
|
||||
" use if code needs to do something before every static file is added to "
|
||||
"the staticfiles list."
|
||||
msgstr "在StaticGenerator.generate_context读取静态文件前调用,若代码需要在每个静态文件加入"
|
||||
"静态文件列表前进行一些修改,就可以使用此信号。"
|
||||
msgstr "在StaticGenerator.generate_context读取静态文件前调用,若代码需要在每个静态文件加入静态文件列表前进行一些修改,就可以使用此信号。"
|
||||
|
||||
#: ../../plugins.rst:172
|
||||
#: ../../plugins.rst:175
|
||||
msgid "static_generator_init"
|
||||
msgstr "static_generator_init"
|
||||
|
||||
#: ../../plugins.rst:172
|
||||
#: ../../plugins.rst:175
|
||||
msgid "invoked in the StaticGenerator.__init__"
|
||||
msgstr "在StaticGenerator.__init__中调用"
|
||||
|
||||
#: ../../plugins.rst:173
|
||||
#: ../../plugins.rst:176
|
||||
msgid "static_generator_finalized"
|
||||
msgstr "static_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:173
|
||||
#: ../../plugins.rst:176
|
||||
msgid "invoked at the end of StaticGenerator.generate_context"
|
||||
msgstr "在StaticGenerator.generate_context的最后调用"
|
||||
|
||||
#: ../../plugins.rst:174
|
||||
#: ../../plugins.rst:177
|
||||
msgid "content_object_init"
|
||||
msgstr "content_object_init"
|
||||
|
||||
#: ../../plugins.rst:174
|
||||
#: ../../plugins.rst:177
|
||||
msgid "content_object"
|
||||
msgstr "content_object"
|
||||
|
||||
#: ../../plugins.rst:174
|
||||
#: ../../plugins.rst:177
|
||||
msgid "invoked at the end of Content.__init__"
|
||||
msgstr "在Content.__init__的最后调用"
|
||||
|
||||
#: ../../plugins.rst:175
|
||||
#: ../../plugins.rst:178
|
||||
msgid "content_written"
|
||||
msgstr "content_written"
|
||||
|
||||
#: ../../plugins.rst:175
|
||||
#: ../../plugins.rst:178
|
||||
msgid "path, context"
|
||||
msgstr "path, context"
|
||||
|
||||
#: ../../plugins.rst:175
|
||||
#: ../../plugins.rst:178
|
||||
msgid "invoked each time a content file is written."
|
||||
msgstr "每一次内容文件写入后调用。"
|
||||
|
||||
#: ../../plugins.rst:176
|
||||
#: ../../plugins.rst:179
|
||||
msgid "feed_generated"
|
||||
msgstr "feed_generated"
|
||||
|
||||
#: ../../plugins.rst:176
|
||||
#: ../../plugins.rst:179
|
||||
msgid "context, feed"
|
||||
msgstr "context, feed"
|
||||
|
||||
#: ../../plugins.rst:176
|
||||
#: ../../plugins.rst:179
|
||||
msgid ""
|
||||
"invoked each time a feed gets generated. Can be used to modify a feed "
|
||||
"object before it gets written."
|
||||
msgstr "每个feed生成前调用。可以用于在feed写入前修改之。"
|
||||
|
||||
#: ../../plugins.rst:178
|
||||
#: ../../plugins.rst:181
|
||||
msgid "feed_written"
|
||||
msgstr "feed_written"
|
||||
|
||||
#: ../../plugins.rst:178
|
||||
#: ../../plugins.rst:181
|
||||
msgid "path, context, feed"
|
||||
msgstr "path, context, feed"
|
||||
|
||||
#: ../../plugins.rst:178
|
||||
#: ../../plugins.rst:181
|
||||
msgid "invoked each time a feed file is written."
|
||||
msgstr "每一个feed文件写入后调用。"
|
||||
|
||||
#: ../../plugins.rst:183
|
||||
#: ../../plugins.rst:186
|
||||
msgid ""
|
||||
"Avoid ``content_object_init`` signal if you intend to read ``summary`` or"
|
||||
" ``content`` properties of the content object. That combination can "
|
||||
|
|
@ -519,137 +519,146 @@ msgid ""
|
|||
"(see `pelican-plugins bug #314`_). Use ``_summary`` and ``_content`` "
|
||||
"properties instead, or, alternatively, run your plugin at a later stage "
|
||||
"(e.g. ``all_generators_finalized``)."
|
||||
msgstr "请避免使用 ``content_object_init`` 信号读取content对象的 ``summary`` 或"
|
||||
" ``content`` 属性,这可能导致在 :ref:`ref-linking-to-internal-content` 时无法解析链接"
|
||||
"(请参阅 `pelican-plugins bug #314`_ )。请改用 ``_summary`` 和 ``_content`` 属性,"
|
||||
"或者就在后续阶段再运行插件(例如 ``all_generators_finalized`` 时)。"
|
||||
msgstr ""
|
||||
"请避免使用 ``content_object_init`` 信号读取content对象的 ``summary`` 或 ``content`` "
|
||||
"属性,这可能导致在 :ref:`ref-linking-to-internal-content` 时无法解析链接(请参阅 `pelican-"
|
||||
"plugins bug #314`_ )。请改用 ``_summary`` 和 ``_content`` 属性,或者就在后续阶段再运行插件(例如 "
|
||||
"``all_generators_finalized`` 时)。"
|
||||
|
||||
#: ../../plugins.rst:192
|
||||
#: ../../plugins.rst:195
|
||||
msgid ""
|
||||
"After Pelican 3.2, signal names were standardized. Older plugins may "
|
||||
"need to be updated to use the new names:"
|
||||
msgstr "Pelican3.2之后,信号名都进行了标准化,较老的插件可能需要进行更新:"
|
||||
|
||||
#: ../../plugins.rst:196
|
||||
#: ../../plugins.rst:199
|
||||
msgid "Old name"
|
||||
msgstr "旧名称"
|
||||
|
||||
#: ../../plugins.rst:196
|
||||
#: ../../plugins.rst:199
|
||||
msgid "New name"
|
||||
msgstr "新名称"
|
||||
|
||||
#: ../../plugins.rst:198
|
||||
#: ../../plugins.rst:201
|
||||
msgid "article_generate_context"
|
||||
msgstr "article_generate_context"
|
||||
|
||||
#: ../../plugins.rst:199
|
||||
#: ../../plugins.rst:202
|
||||
msgid "article_generate_finalized"
|
||||
msgstr "article_generate_finalized"
|
||||
|
||||
#: ../../plugins.rst:200
|
||||
#: ../../plugins.rst:203
|
||||
msgid "article_generate_preread"
|
||||
msgstr "article_generate_preread"
|
||||
|
||||
#: ../../plugins.rst:201
|
||||
#: ../../plugins.rst:204
|
||||
msgid "pages_generate_context"
|
||||
msgstr "pages_generate_context"
|
||||
|
||||
#: ../../plugins.rst:202
|
||||
#: ../../plugins.rst:205
|
||||
msgid "pages_generate_preread"
|
||||
msgstr "pages_generate_preread"
|
||||
|
||||
#: ../../plugins.rst:203
|
||||
#: ../../plugins.rst:206
|
||||
msgid "pages_generator_finalized"
|
||||
msgstr "pages_generator_finalized"
|
||||
|
||||
#: ../../plugins.rst:204
|
||||
#: ../../plugins.rst:207
|
||||
msgid "pages_generator_init"
|
||||
msgstr "pages_generator_init"
|
||||
|
||||
#: ../../plugins.rst:205
|
||||
#: ../../plugins.rst:208
|
||||
msgid "static_generate_context"
|
||||
msgstr "static_generate_context"
|
||||
|
||||
#: ../../plugins.rst:206
|
||||
#: ../../plugins.rst:209
|
||||
msgid "static_generate_preread"
|
||||
msgstr "static_generate_preread"
|
||||
|
||||
#: ../../plugins.rst:210
|
||||
#: ../../plugins.rst:213
|
||||
msgid "Recipes"
|
||||
msgstr "具体使用方法举例"
|
||||
|
||||
#: ../../plugins.rst:212
|
||||
#: ../../plugins.rst:215
|
||||
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
|
||||
#: ../../plugins.rst:219
|
||||
msgid "How to create a new reader"
|
||||
msgstr "如何创建一个新的reader"
|
||||
|
||||
#: ../../plugins.rst:218
|
||||
#: ../../plugins.rst:221
|
||||
msgid ""
|
||||
"One thing you might want is to add support for your very own input "
|
||||
"format. While it might make sense to add this feature in Pelican core, we"
|
||||
" wisely chose to avoid this situation and instead have the different "
|
||||
"readers defined via plugins."
|
||||
msgstr "你可能需要添加对输入文件格式的特殊支持。这似乎可以作为Pelican核心的一个功能,但"
|
||||
"我们选择避免将此功能放在核心中,而是通过插件实现不同的reader。"
|
||||
msgstr "你可能需要添加对输入文件格式的特殊支持。这似乎可以作为Pelican核心的一个功能,但我们选择避免将此功能放在核心中,而是通过插件实现不同的reader。"
|
||||
|
||||
#: ../../plugins.rst:223
|
||||
#: ../../plugins.rst:226
|
||||
msgid ""
|
||||
"The rationale behind this choice is mainly that plugins are really easy "
|
||||
"to write and don't slow down Pelican itself when they're not active."
|
||||
msgstr "做出这个决定主要是因为实现这样的格式支持插件非常容易,而且这样在不需要此功能时"
|
||||
"也不会影响Pelican自身的速度。"
|
||||
msgstr "做出这个决定主要是因为实现这样的格式支持插件非常容易,而且这样在不需要此功能时也不会影响Pelican自身的速度。"
|
||||
|
||||
#: ../../plugins.rst:226
|
||||
#: ../../plugins.rst:229
|
||||
msgid "No more talking — here is an example::"
|
||||
msgstr "多说无益,下面就是例子:"
|
||||
|
||||
#: ../../plugins.rst:262
|
||||
#: ../../plugins.rst:265
|
||||
msgid "Adding a new generator"
|
||||
msgstr "添加新的generator"
|
||||
|
||||
#: ../../plugins.rst:264
|
||||
#: ../../plugins.rst:267
|
||||
msgid ""
|
||||
"Adding a new generator is also really easy. You might want to have a look"
|
||||
" at :doc:`internals` for more information on how to create your own "
|
||||
"generator."
|
||||
msgstr "添加一个generator也非常简单,你可能会想要看一看 :doc:`internals` ,其中"
|
||||
"有关于如何创建generator的内容。"
|
||||
msgstr "添加一个generator也非常简单,你可能会想要看一看 :doc:`internals` ,其中有关于如何创建generator的内容。"
|
||||
|
||||
#: ../../plugins.rst:278
|
||||
#: ../../plugins.rst:281
|
||||
msgid "Adding a new writer"
|
||||
msgstr "添加新的writer"
|
||||
|
||||
#: ../../plugins.rst:280
|
||||
#: ../../plugins.rst:283
|
||||
msgid ""
|
||||
"Adding a writer will allow you to output additional file formats to disk,"
|
||||
" or change how the existing formats are written to disk. Note that only "
|
||||
"one writer will be active at a time, so be sure to either subclass the "
|
||||
"built-in Writer, or completely re-implement it."
|
||||
msgstr "添加writer可以让你将其他文件格式输出到磁盘,或者可以改变现有格式写入磁盘的方式。"
|
||||
"请注意,一次只能启用一个writer,因此请确保继承了内置的Writer,并且完全重新实现之。"
|
||||
msgstr "添加writer可以让你将其他文件格式输出到磁盘,或者可以改变现有格式写入磁盘的方式。请注意,一次只能启用一个writer,因此请确保继承了内置的Writer,并且完全重新实现之。"
|
||||
|
||||
#: ../../plugins.rst:285
|
||||
#: ../../plugins.rst:288
|
||||
msgid "Here is a basic example of how to set up your own writer::"
|
||||
msgstr "下面是启用你的自定义writer的一个基本例子:"
|
||||
|
||||
#: ../../plugins.rst:305
|
||||
#: ../../plugins.rst:308
|
||||
msgid "Using Plugins to Inject Content"
|
||||
msgstr "使用插件添加内容"
|
||||
|
||||
#: ../../plugins.rst:307
|
||||
#: ../../plugins.rst:310
|
||||
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 "可以通过插件以可编程的方式添加文章或页面。如果你打算从某些API获取文章,这就会很有用。"
|
||||
|
||||
#: ../../plugins.rst:310
|
||||
#: ../../plugins.rst:313
|
||||
msgid ""
|
||||
"Following is a simple example of how one can build a plugin that injects "
|
||||
"a custom article, using the ``article_generator_pretaxonomy`` signal::"
|
||||
msgstr "下面是一个简单的示例,说明了如何使用 ``article_generator_pretaxonomy`` 信号"
|
||||
"构建一个添加自定义文章的插件:"
|
||||
msgstr "下面是一个简单的示例,说明了如何使用 ``article_generator_pretaxonomy`` 信号构建一个添加自定义文章的插件:"
|
||||
|
||||
#~ 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 ""
|
||||
#~ "若一个信号连接有多个插件,则不能保证也不能控制这些插件的执行顺序。Pelican使用 Blinker_ "
|
||||
#~ "来实现信号,这个缺陷就是从此处继承而来的。"
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -3,12 +3,11 @@
|
|||
# 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-10-11 10:44+0800\n"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -49,25 +48,6 @@ 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 ""
|
||||
"可以注意到的是,指定的是已生成的 *输出* 文件,而不是源内容文件。在命令中加上 ``--debug`` "
|
||||
"选项就可以让Pelican显示源文件和输出文件的位置对应关系。另外, ``--write-selected`` "
|
||||
"的参数可以是用逗号分隔的多个路径(具体请参阅设置: :ref:`writing_only_selected_content` )"
|
||||
|
||||
#: ../../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`` "
|
||||
|
|
@ -79,50 +59,49 @@ msgstr ""
|
|||
"``-r`` 或者 ``--autoreload`` 选项就可以做到这一点。在非Windows环境下,这个选项还可以和 ``-l`` 或 "
|
||||
"``--listen`` 搭配使用,这样就可以在自动重生成站点的基础上,同时提供在 http://localhost:8000 上的访问:"
|
||||
|
||||
#: ../../publish.rst:42
|
||||
#: ../../publish.rst:30
|
||||
msgid ""
|
||||
"Pelican has other command-line switches available. Have a look at the "
|
||||
"help to see all the options you can use::"
|
||||
msgstr "Pelican还有一些其他的命令行选项。可以在帮助中看到所有可用选项:"
|
||||
|
||||
#: ../../publish.rst:48
|
||||
#: ../../publish.rst:36
|
||||
msgid "Viewing the generated files"
|
||||
msgstr "浏览生成的文件"
|
||||
|
||||
#: ../../publish.rst:50
|
||||
#: ../../publish.rst:38
|
||||
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 "Pelican生成的文件都是静态的,也就是说不需要使用什么特殊的手段就可以浏览。您可以直接使用浏览器打开生成的HTML文件"
|
||||
|
||||
#: ../../publish.rst:56
|
||||
#: ../../publish.rst:44
|
||||
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 "事实上,上面的这种浏览方法可能会在CSS或其他链接上出点问题,可以运行Pelican自带的简易web服务器,如此可以获得可靠的预览体验:"
|
||||
|
||||
#: ../../publish.rst:62
|
||||
#: ../../publish.rst:50
|
||||
msgid ""
|
||||
"Once the web server has been started, you can preview your site at: "
|
||||
"http://localhost:8000/"
|
||||
msgstr "当web服务器启动后,可以访问 http://localhost:8000/ 来预览您的站点。"
|
||||
|
||||
#: ../../publish.rst:66
|
||||
#: ../../publish.rst:54
|
||||
msgid "Deployment"
|
||||
msgstr "部署"
|
||||
|
||||
#: ../../publish.rst:68
|
||||
#, fuzzy
|
||||
#: ../../publish.rst:56
|
||||
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 "当您生成好站点后,可以在本地先进行预览,确认无误后再将其部署到生产环境,期间您可能需要使用针对某生产环境特定的配置文件:"
|
||||
msgstr "当您生成好站点后,可以在本地先进行预览,确认无误后,在部署前可能还需使用针对生产环境特定的配置文件重新生成站点:"
|
||||
|
||||
#: ../../publish.rst:75
|
||||
#: ../../publish.rst:63
|
||||
msgid ""
|
||||
"To base your publish configuration on top of your ``pelicanconf.py``, you"
|
||||
" can import your ``pelicanconf`` settings by including the following line"
|
||||
|
|
@ -131,13 +110,13 @@ msgstr ""
|
|||
"您可以基于 ``pelicanconf.py`` 进行设置文件的配置, 在``publishconf.py`` 中import "
|
||||
"``pelicanconf`` 就可实现(译者注:配置文件其实本质上就是一些Python变量,因此import后就可以全部引入):"
|
||||
|
||||
#: ../../publish.rst:81
|
||||
#: ../../publish.rst:69
|
||||
msgid ""
|
||||
"If you have generated a ``publishconf.py`` using ``pelican-quickstart``, "
|
||||
"this line is included by default."
|
||||
msgstr "如果是使用 ``pelican-quickstart`` 生成的 ``publishconf.py`` ,上面这行默认就有。"
|
||||
|
||||
#: ../../publish.rst:84
|
||||
#: ../../publish.rst:72
|
||||
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 "
|
||||
|
|
@ -146,7 +125,7 @@ msgstr ""
|
|||
"部署站点的方法步骤取决于网站托管的位置。对于使用SSH访问的运行着Nginx或Apache的服务器,您可能需要使用 ``rsync`` "
|
||||
"工具来传输站点文件:"
|
||||
|
||||
#: ../../publish.rst:90
|
||||
#: ../../publish.rst:78
|
||||
msgid ""
|
||||
"There are many other deployment options, some of which can be configured "
|
||||
"when first setting up your site via the ``pelican-quickstart`` command. "
|
||||
|
|
@ -155,11 +134,11 @@ msgstr ""
|
|||
"还有很多其他的部署选项,有一些在第一次通过 ``pelican-quickstart`` 命令建立站点时就已经配置。在 "
|
||||
":doc:`小技巧<tips>` 中可以查看如何通过Github Pages部署站点。"
|
||||
|
||||
#: ../../publish.rst:95
|
||||
#: ../../publish.rst:83
|
||||
msgid "Automation"
|
||||
msgstr "自动化"
|
||||
|
||||
#: ../../publish.rst:97
|
||||
#: ../../publish.rst:85
|
||||
msgid ""
|
||||
"While the ``pelican`` command is the canonical way to generate your site,"
|
||||
" automation tools can be used to streamline the generation and "
|
||||
|
|
@ -174,25 +153,25 @@ msgid ""
|
|||
"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 ""
|
||||
" ``pelican`` 命令是生成站点的标准方法,但同时也有自动化工具可以用来简化生成与发布流程。在 ``pelican-"
|
||||
"``pelican`` 命令是生成站点的标准方法,但同时也有自动化工具可以用来简化生成与发布流程。在 ``pelican-"
|
||||
"quickstart`` 的过程中,其中一个问题就是是否要自动站点生成与发布。若您选择了 "
|
||||
"\"yes\",在项目的根目录中会生成``tasks.py`` and ``Makefile`` 。这些文件中预填充了一些从 ``pelican-"
|
||||
"quickstart`` "
|
||||
"过程中收集的信息,您应该从这个生成好的文件出发来进一步根据实际需要修改。另外,如果您认为这些自动化脚本文件没什么用,完全可以将他们删除,这不会对标准命令"
|
||||
" ``pelican`` 产生任何影响。"
|
||||
"``pelican`` 产生任何影响。"
|
||||
|
||||
#: ../../publish.rst:110
|
||||
#: ../../publish.rst:98
|
||||
msgid ""
|
||||
"Following are automation tools that \"wrap\" the ``pelican`` command and "
|
||||
"can simplify the process of generating, previewing, and uploading your "
|
||||
"site."
|
||||
msgstr "下面是一些用于包装 ``pelican`` 命令的自动化工具,可以简化生成、预览和上传站点的过程。"
|
||||
|
||||
#: ../../publish.rst:114
|
||||
#: ../../publish.rst:102
|
||||
msgid "Invoke"
|
||||
msgstr "Invoke"
|
||||
|
||||
#: ../../publish.rst:116
|
||||
#: ../../publish.rst:104
|
||||
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 "
|
||||
|
|
@ -202,7 +181,7 @@ msgstr ""
|
|||
"Invoke_ 工具使用Python作为书写语言,并且能够用在很多不同的环境中。它需要使用下面的命令单独安装,在某些操作系统中可能需要在前面加上 "
|
||||
"``sudo`` :"
|
||||
|
||||
#: ../../publish.rst:123
|
||||
#: ../../publish.rst:111
|
||||
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 "
|
||||
|
|
@ -212,20 +191,20 @@ msgstr ""
|
|||
"可以打开 ``tasks.py`` "
|
||||
"文件看看其中的代码,里面的命令可以重命名、删除,可以按照您的喜好自行修改。生成好的文件是开箱即用的,您可以通过下面的命令生成站点:"
|
||||
|
||||
#: ../../publish.rst:130 ../../publish.rst:178
|
||||
#: ../../publish.rst:118 ../../publish.rst:166
|
||||
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 "若您希望Pelican在检测到变化时自动重新生成站点(在本地测试的时候很实用),可以使用下面的命令:"
|
||||
|
||||
#: ../../publish.rst:136 ../../publish.rst:184
|
||||
#: ../../publish.rst:124 ../../publish.rst:172
|
||||
msgid ""
|
||||
"To serve the generated site so it can be previewed in your browser at "
|
||||
"http://localhost:8000/::"
|
||||
msgstr "下面的命令则可以让您在生成后通过浏览器访问 http://localhost:8000/ 来预览站点"
|
||||
|
||||
#: ../../publish.rst:141
|
||||
#: ../../publish.rst:129
|
||||
msgid ""
|
||||
"To serve the generated site with automatic browser reloading every time a"
|
||||
" change is detected, first ``python -m pip install livereload``, then use"
|
||||
|
|
@ -234,7 +213,7 @@ msgstr ""
|
|||
"在每次检测到修改重生成站点后,可以让浏览器自动进行重载。先运行 ``python -m pip install livereload`` "
|
||||
"安装,再运行下面的这条命令就可以实现:"
|
||||
|
||||
#: ../../publish.rst:147
|
||||
#: ../../publish.rst:135
|
||||
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 "
|
||||
|
|
@ -243,7 +222,7 @@ msgstr ""
|
|||
"如果在 ``pelican-quickstart`` 过程中,对是否要通过SSH上传站点问题回答了 \"yes\" "
|
||||
",您就可以使用下面的命令借助rsync在SSH上发布站点:"
|
||||
|
||||
#: ../../publish.rst:153
|
||||
#: ../../publish.rst:141
|
||||
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 "
|
||||
|
|
@ -253,11 +232,11 @@ msgstr ""
|
|||
"默认就可以使用的命令远不止这些,在 ``tasks.py`` 中可以找到更多可用的命令。更重要的是,当您有特定需求和偏好时,直接修改 "
|
||||
"``tasks.py`` 即可。"
|
||||
|
||||
#: ../../publish.rst:159
|
||||
#: ../../publish.rst:147
|
||||
msgid "Make"
|
||||
msgstr "Make"
|
||||
|
||||
#: ../../publish.rst:161
|
||||
#: ../../publish.rst:149
|
||||
msgid ""
|
||||
"A ``Makefile`` is also automatically created for you when you say \"yes\""
|
||||
" to the relevant question during the ``pelican-quickstart`` process. The "
|
||||
|
|
@ -267,22 +246,22 @@ msgid ""
|
|||
"include ``make``, and installing it on those systems can be a non-trivial"
|
||||
" task."
|
||||
msgstr ""
|
||||
" ``Makefile`` 也是自动生成的。在大多数POSIX系统中都内置了 ``make`` "
|
||||
"``Makefile`` 也是自动生成的。在大多数POSIX系统中都内置了 ``make`` "
|
||||
"命令,无需安装即可使用。但在非POSIX系统(例如Windows)中并没有 ``make`` ,在这些系统中安装 ``make`` 时非常困难的。"
|
||||
|
||||
#: ../../publish.rst:168
|
||||
#: ../../publish.rst:156
|
||||
msgid ""
|
||||
"If you want to use ``make`` to generate your site using the settings in "
|
||||
"``pelicanconf.py``, run::"
|
||||
msgstr "使用 ``make`` 命令是以 ``pelicanconf.py`` 作为配置文件来生成站点的:"
|
||||
|
||||
#: ../../publish.rst:173
|
||||
#: ../../publish.rst:161
|
||||
msgid ""
|
||||
"To generate the site for production, using the settings in "
|
||||
"``publishconf.py``, run::"
|
||||
msgstr "使用 ``publishconf.py`` 作为配置文件来为生产环境生成站点:"
|
||||
|
||||
#: ../../publish.rst:189
|
||||
#: ../../publish.rst:177
|
||||
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::"
|
||||
|
|
@ -290,13 +269,13 @@ msgstr ""
|
|||
"一般来说, ``make regenerate`` 和 ``make serve`` "
|
||||
"需要在单独的终端会话中运行,下面的命令相当于同时运行上述两个命令:"
|
||||
|
||||
#: ../../publish.rst:194
|
||||
#: ../../publish.rst:182
|
||||
msgid ""
|
||||
"The above command will simultaneously run Pelican in regeneration mode as"
|
||||
" well as serve the output at http://localhost:8000."
|
||||
msgstr "上面的命令会让Pelican在重生成模式下持续运行,同样地,您可以通过 http://localhost:8000 访问生成的站点。"
|
||||
|
||||
#: ../../publish.rst:197
|
||||
#: ../../publish.rst:185
|
||||
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 "
|
||||
|
|
@ -305,11 +284,11 @@ msgstr ""
|
|||
"当准备好发布站点时,可以使用在 ``pelican-quickstart`` "
|
||||
"过程中选择的方法进行上传。下面的例子使用rsync在ssh上完成这一工作:"
|
||||
|
||||
#: ../../publish.rst:203
|
||||
#: ../../publish.rst:191
|
||||
msgid "That's it! Your site should now be live."
|
||||
msgstr "OK!您的站点现在已经可以访问了。"
|
||||
|
||||
#: ../../publish.rst:205
|
||||
#: ../../publish.rst:193
|
||||
msgid ""
|
||||
"(The default ``Makefile`` and ``devserver.sh`` scripts use the ``python``"
|
||||
" and ``pelican`` executables to complete its tasks. If you want to use "
|
||||
|
|
@ -321,3 +300,28 @@ msgstr ""
|
|||
"来完成任务。若您希望使用其他的可执行文件,例如 ``python3`` ,设置环境变量 ``PY`` 和 ``PELICAN`` "
|
||||
"来覆盖默认的可执行文件名。)"
|
||||
|
||||
#~ 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 "当您在处理某篇文章或页面时,可以选择只生成和该内容相关的文件,使用下面的参数就可以实现这个目的:"
|
||||
|
||||
#~ 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 ""
|
||||
#~ "可以注意到的是,指定的是已生成的 *输出* 文件,而不是源内容文件。在命令中加上 ``--debug``"
|
||||
#~ " 选项就可以让Pelican显示源文件和输出文件的位置对应关系。另外, ``--write-"
|
||||
#~ "selected`` 的参数可以是用逗号分隔的多个路径(具体请参阅设置: "
|
||||
#~ ":ref:`writing_only_selected_content` )"
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -3,12 +3,11 @@
|
|||
# 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"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -17,7 +16,7 @@ msgstr ""
|
|||
"MIME-Version: 1.0\n"
|
||||
"Content-Type: text/plain; charset=utf-8\n"
|
||||
"Content-Transfer-Encoding: 8bit\n"
|
||||
"Generated-By: Babel 2.12.1\n"
|
||||
"Generated-By: Babel 2.13.0\n"
|
||||
|
||||
#: ../../quickstart.rst:2
|
||||
msgid "Quickstart"
|
||||
|
|
@ -27,8 +26,7 @@ msgstr "快速入门"
|
|||
msgid ""
|
||||
"Reading through all the documentation is highly recommended, but for the "
|
||||
"truly impatient, following are some quick steps to get started."
|
||||
msgstr "强烈建议将所有文档完整地看一遍,"
|
||||
"但如果您真的非常没有耐心看完,下面的步骤可以帮助您快速地开始使用Pelican。"
|
||||
msgstr "强烈建议将所有文档完整地看一遍,但如果您真的非常没有耐心看完,下面的步骤可以帮助您快速地开始使用Pelican。"
|
||||
|
||||
#: ../../quickstart.rst:8
|
||||
msgid "Installation"
|
||||
|
|
@ -37,10 +35,11 @@ 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 "在命令行中执行下面的命令就可以安装Pelican了(如果您需要Markdown支持的话,也可以同时安装)。"
|
||||
"Pelican需要使用3.7以上版本的Python,当然如果需要授权,请在命令前加上 ``sudo``"
|
||||
"Python |min_python| by running the following command in your preferred "
|
||||
"terminal, prefixing with ``sudo`` if permissions warrant::"
|
||||
msgstr ""
|
||||
"在命令行中执行下面的命令就可以安装Pelican了(如果您需要Markdown支持的话,也可以同时安装)。Pelican需要使用 |min_python| 以上版本的Python,当然如果需要授权,请在命令前加上"
|
||||
" ``sudo``"
|
||||
|
||||
#: ../../quickstart.rst:17
|
||||
msgid "Create a project"
|
||||
|
|
@ -50,15 +49,13 @@ msgstr "创建项目"
|
|||
msgid ""
|
||||
"First, choose a name for your project, create an appropriately-named "
|
||||
"directory for your site, and switch to that directory::"
|
||||
msgstr "首先,给您的项目想个名字,并以合适的名字创建一个文件夹来存放您的站点"
|
||||
"接着进入这个新创建的文件夹"
|
||||
msgstr "首先,给您的项目想个名字,并以合适的名字创建一个文件夹来存放您的站点接着进入这个新创建的文件夹"
|
||||
|
||||
#: ../../quickstart.rst:25
|
||||
msgid ""
|
||||
"Create a skeleton project via the ``pelican-quickstart`` command, which "
|
||||
"begins by asking some questions about your site::"
|
||||
msgstr "通过 ``pelican-quickstart`` 命令创建一个项目的框架,"
|
||||
"执行这个命令后,您需要输入一些站点相关的信息"
|
||||
msgstr "通过 ``pelican-quickstart`` 命令创建一个项目的框架,执行这个命令后,您需要输入一些站点相关的信息"
|
||||
|
||||
#: ../../quickstart.rst:30
|
||||
msgid ""
|
||||
|
|
@ -66,8 +63,10 @@ msgid ""
|
|||
"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 "对于那些在括号中写了默认值的问题,完全可以直接回车使用预先设定好的默认值 [#tzlocal_fn]_。"
|
||||
"在输入站点URL的前缀(prefix)时,请根据提示的格式输入站点的域名(例如 ``https://example.com`` )。"
|
||||
msgstr ""
|
||||
"对于那些在括号中写了默认值的问题,完全可以直接回车使用预先设定好的默认值 "
|
||||
"[#tzlocal_fn]_。在输入站点URL的前缀(prefix)时,请根据提示的格式输入站点的域名(例如 "
|
||||
"``https://example.com`` )。"
|
||||
|
||||
#: ../../quickstart.rst:36
|
||||
msgid "Create an article"
|
||||
|
|
@ -78,15 +77,15 @@ 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 "在运行Pelican前,您需要先写一些内容。您可以使用喜欢的文本编辑器来创建第一篇文章。"
|
||||
"下面是一个样例,可以将它作为您的第一篇文章:"
|
||||
msgstr "在运行Pelican前,您需要先写一些内容。您可以使用喜欢的文本编辑器来创建第一篇文章。下面是一个样例,可以将它作为您的第一篇文章:"
|
||||
|
||||
#: ../../quickstart.rst:47
|
||||
msgid ""
|
||||
"Given that this example article is in Markdown format, save it as "
|
||||
"``~/projects/yoursite/content/keyboard-review.md``."
|
||||
msgstr "上面这篇文章是以Markdown的格式完成的,请将它保存为(注意要保存在content文件夹下)"
|
||||
"``~/projects/yoursite/content/keyboard-review.md``。"
|
||||
msgstr ""
|
||||
"上面这篇文章是以Markdown的格式完成的,请将它保存为(注意要保存在content文件夹下)``~/projects/yoursite/content"
|
||||
"/keyboard-review.md``。"
|
||||
|
||||
#: ../../quickstart.rst:51
|
||||
msgid "Generate your site"
|
||||
|
|
@ -103,8 +102,7 @@ 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 "站点会生成在 ``output/`` 目录下。(可能会显示和feeds有关的警告,"
|
||||
"这和现在的本地开发环境有关,目前完全可以忽略它。)"
|
||||
msgstr "站点会生成在 ``output/`` 目录下。(可能会显示和feeds有关的警告,这和现在的本地开发环境有关,目前完全可以忽略它。)"
|
||||
|
||||
#: ../../quickstart.rst:62
|
||||
msgid "Preview your site"
|
||||
|
|
@ -125,8 +123,7 @@ 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 "请继续阅读文档中的其他部分来了解更多Pelican的用法,"
|
||||
"也可以前往Pelican的wiki 教程_ 页面获取社区发布的教程。"
|
||||
msgstr "请继续阅读文档中的其他部分来了解更多Pelican的用法,也可以前往Pelican的wiki 教程_ 页面获取社区发布的教程。"
|
||||
|
||||
#: ../../quickstart.rst:78
|
||||
msgid "Footnotes"
|
||||
|
|
|
|||
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Binary file not shown.
|
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: Pelican 4\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2023-04-29 21:43+0800\n"
|
||||
"POT-Creation-Date: 2023-11-19 20:08+0800\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language: zh_CN\n"
|
||||
|
|
@ -17,7 +17,7 @@ msgstr ""
|
|||
"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"
|
||||
"Generated-By: Babel 2.13.0\n"
|
||||
|
||||
#: ../../tips.rst:2
|
||||
msgid "Tips"
|
||||
|
|
@ -27,7 +27,7 @@ msgstr ""
|
|||
msgid "Here are some tips about Pelican that you might find useful."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:7 ../../tips.rst:114
|
||||
#: ../../tips.rst:7 ../../tips.rst:208
|
||||
msgid "Custom 404 Pages"
|
||||
msgstr ""
|
||||
|
||||
|
|
@ -59,43 +59,71 @@ msgid ""
|
|||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:38
|
||||
msgid "Publishing to GitHub"
|
||||
msgid "Publishing to GitHub Pages"
|
||||
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."
|
||||
"If you use `GitHub <https://github.com/>`_ for your Pelican site you can "
|
||||
"publish your site to `GitHub Pages <https://pages.github.com/>`_ for "
|
||||
"free. Your site will be published to ``https://<username>.github.io`` if "
|
||||
"it's a user or organization site or to "
|
||||
"``https://<username>.github.io/<repository>`` if it's a project site. "
|
||||
"It's also possible to `use a custom domain with GitHub Pages "
|
||||
"<https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-"
|
||||
"github-pages-site>`_."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:47
|
||||
msgid "Project Pages"
|
||||
#: ../../tips.rst:46
|
||||
msgid ""
|
||||
"There are `two ways to publish a site to GitHub Pages "
|
||||
"<https://docs.github.com/en/pages/getting-started-with-github-"
|
||||
"pages/configuring-a-publishing-source-for-your-github-pages-site>`_:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:49
|
||||
#: ../../tips.rst:48
|
||||
msgid ""
|
||||
"**Publishing from a branch:** run ``pelican`` locally and push the output"
|
||||
" directory to a special branch of your GitHub repo. GitHub will then "
|
||||
"publish the contents of this branch to your GitHub Pages site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:51
|
||||
msgid ""
|
||||
"**Publishing with a custom GitHub Actions workflow:** just push the "
|
||||
"source files of your Pelican site to your GitHub repo's default branch "
|
||||
"and have a custom GitHub Actions workflow run ``pelican`` for you to "
|
||||
"generate the output directory and publish it to your GitHub Pages site. "
|
||||
"This way you don't need to run ``pelican`` locally. You can even edit "
|
||||
"your site's source files using GitHub's web interface and any changes "
|
||||
"that you commit will be published."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:60
|
||||
msgid "Publishing a Project Site to GitHub Pages from a Branch"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:62
|
||||
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
|
||||
#: ../../tips.rst:66
|
||||
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
|
||||
#: ../../tips.rst:69
|
||||
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
|
||||
#: ../../tips.rst:77
|
||||
msgid ""
|
||||
"The ``ghp-import output`` command updates the local ``gh-pages`` branch "
|
||||
"with the content of the ``output`` directory (creating the branch if it "
|
||||
|
|
@ -103,87 +131,228 @@ msgid ""
|
|||
"the remote ``gh-pages`` branch, effectively publishing the Pelican site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:71
|
||||
#: ../../tips.rst:84
|
||||
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"
|
||||
#: ../../tips.rst:89
|
||||
msgid "Publishing a User Site to GitHub Pages from a Branch"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:78
|
||||
#: ../../tips.rst:91
|
||||
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
|
||||
#: ../../tips.rst:95
|
||||
msgid "Again, you can take advantage of ``ghp-import``::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:88
|
||||
#: ../../tips.rst:101
|
||||
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
|
||||
#: ../../tips.rst:107
|
||||
msgid ""
|
||||
"To publish your Pelican site as User Pages, feel free to adjust the "
|
||||
"``github`` target of the Makefile."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:97
|
||||
#: ../../tips.rst:110
|
||||
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
|
||||
#: ../../tips.rst:113
|
||||
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
|
||||
#: ../../tips.rst:119
|
||||
msgid ""
|
||||
"Now you can push the whole project ``<username>.github.io`` to the master"
|
||||
" branch of your GitHub repository::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:111
|
||||
#: ../../tips.rst:124
|
||||
msgid "(assuming origin is set to your remote repository)."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:116
|
||||
#: ../../tips.rst:127
|
||||
msgid "Publishing to GitHub Pages Using a Custom GitHub Actions Workflow"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:129
|
||||
msgid ""
|
||||
"Pelican comes with a `custom workflow "
|
||||
"<https://github.com/getpelican/pelican/blob/master/.github/workflows/github_pages.yml>`_"
|
||||
" for publishing a Pelican site. To use it:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:132
|
||||
msgid ""
|
||||
"Enable GitHub Pages in your repo: go to **Settings → Pages** and choose "
|
||||
"**GitHub Actions** for the **Source** setting."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:135
|
||||
msgid ""
|
||||
"Commit a ``.github/workflows/pelican.yml`` file to your repo with these "
|
||||
"contents:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:154
|
||||
msgid ""
|
||||
"Go to the **Actions** tab in your repo "
|
||||
"(``https://github.com/<username>/<repository>/actions``) and you should "
|
||||
"see a **Deploy to GitHub Pages** action running."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:158
|
||||
msgid ""
|
||||
"Once the action completes you should see your Pelican site deployed at "
|
||||
"your repo's GitHub Pages URL: ``https://<username>.github.io`` for a user"
|
||||
" or organization site or ``https://<username>.github.io/<repository>>`` "
|
||||
"for a project site."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:163
|
||||
msgid "Notes:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:165
|
||||
msgid ""
|
||||
"You don't need to set ``SITEURL`` in your Pelican settings: the workflow "
|
||||
"will set it for you"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:168
|
||||
msgid ""
|
||||
"You don't need to commit your ``--output`` / ``OUTPUT_PATH`` directory "
|
||||
"(``output/``) to git: the workflow will run ``pelican`` to build the "
|
||||
"output directory for you on GitHub Actions"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:172
|
||||
msgid ""
|
||||
"See `GitHub's docs about reusable workflows "
|
||||
"<https://docs.github.com/en/actions/using-workflows/reusing-workflows>`_ "
|
||||
"for more information."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:175
|
||||
msgid ""
|
||||
"A number of optional inputs can be added to the ``with:`` block when "
|
||||
"calling the workflow:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:179
|
||||
msgid "Name"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:179
|
||||
msgid "Required"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:179
|
||||
msgid "Description"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:179
|
||||
msgid "Type"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:179
|
||||
msgid "Default"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:181
|
||||
msgid "settings"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:181
|
||||
msgid "Yes"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:181
|
||||
msgid ""
|
||||
"The path to your Pelican settings file (``pelican``'s ``--settings`` "
|
||||
"option), for example: ``\"publishconf.py\"``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:181 ../../tips.rst:186 ../../tips.rst:193
|
||||
msgid "string"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:186
|
||||
msgid "requirements"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:186 ../../tips.rst:193
|
||||
msgid "No"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:186
|
||||
msgid ""
|
||||
"The Python requirements to install, for example to enable markdown and "
|
||||
"typogrify use: ``\"pelican[markdown] typogrify\"`` or if you have a "
|
||||
"requirements file: ``\"-r requirements.txt\"``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:186
|
||||
msgid "``\"pelican\"``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:193
|
||||
msgid "output-path"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:193
|
||||
msgid "Where to output the generated files (``pelican``'s ``--output`` option)"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:193
|
||||
msgid "``\"output/\"``"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:198
|
||||
msgid "For example:"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:210
|
||||
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
|
||||
#: ../../tips.rst:214
|
||||
msgid "Update your site on each commit"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:122
|
||||
#: ../../tips.rst:216
|
||||
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
|
||||
#: ../../tips.rst:223
|
||||
msgid "Copy static files to the root of your site"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:131
|
||||
#: ../../tips.rst:225
|
||||
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 "
|
||||
|
|
@ -194,34 +363,34 @@ msgid ""
|
|||
"example::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:142
|
||||
#: ../../tips.rst:236
|
||||
msgid "Note: use forward slashes, ``/``, even on Windows."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:144
|
||||
#: ../../tips.rst:238
|
||||
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
|
||||
#: ../../tips.rst:242
|
||||
msgid "How to add YouTube or Vimeo Videos"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:150
|
||||
#: ../../tips.rst:244
|
||||
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
|
||||
#: ../../tips.rst:247
|
||||
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
|
||||
#: ../../tips.rst:250
|
||||
msgid ""
|
||||
"Moreover, markup languages like reST and Markdown have plugins that let "
|
||||
"you embed videos in the markup. You can use `reST video directive "
|
||||
|
|
@ -229,31 +398,53 @@ msgid ""
|
|||
"<https://github.com/italomaia/mdx-video>`_ for Markdown."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:163
|
||||
#: ../../tips.rst:257
|
||||
msgid "Develop Locally Using SSL"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:165
|
||||
#: ../../tips.rst:259
|
||||
msgid "Here's how you can set up your local pelican server to support SSL."
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:167
|
||||
#: ../../tips.rst:261
|
||||
msgid ""
|
||||
"First, create a self-signed certificate and key using ``openssl`` (this "
|
||||
"creates ``cert.pem`` and ``key.pem``)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:171
|
||||
#: ../../tips.rst:265
|
||||
msgid ""
|
||||
"And use this command to launch the server (the server starts within your "
|
||||
"``output`` directory)::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:175
|
||||
#: ../../tips.rst:269
|
||||
msgid "If you are using ``develop-server.sh``, add this to the top::"
|
||||
msgstr ""
|
||||
|
||||
#: ../../tips.rst:180
|
||||
#: ../../tips.rst:274
|
||||
msgid "and modify the ``pelican.server`` line as follows::"
|
||||
msgstr ""
|
||||
|
||||
#~ msgid "Publishing to GitHub"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ 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 ""
|
||||
|
||||
#~ msgid "Project Pages"
|
||||
#~ msgstr ""
|
||||
|
||||
#~ msgid "User Pages"
|
||||
#~ msgstr ""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue