| 1 |
# SOME DESCRIPTIVE TITLE. |
| 2 |
# Copyright (C) 2010–2024 |
| 3 |
# This file is distributed under the same license as the PELICAN package. |
| 4 |
# FIRST AUTHOR <EMAIL@ADDRESS>, 2024. |
| 5 |
# |
| 6 |
msgid "" |
| 7 |
msgstr "" |
| 8 |
"Project-Id-Version: PELICAN 4\n" |
| 9 |
"Report-Msgid-Bugs-To: \n" |
| 10 |
"POT-Creation-Date: 2024-06-24 19:06+0800\n" |
| 11 |
"PO-Revision-Date: 2024-06-25 19:00+0800\n" |
| 12 |
"Last-Translator: GeorgeHu <[email protected]>\n" |
| 13 |
"Language: zh_CN\n" |
| 14 |
"Language-Team: \n" |
| 15 |
"Plural-Forms: nplurals=1; plural=0;\n" |
| 16 |
"MIME-Version: 1.0\n" |
| 17 |
"Content-Type: text/plain; charset=utf-8\n" |
| 18 |
"Content-Transfer-Encoding: 8bit\n" |
| 19 |
"Generated-By: Babel 2.15.0\n" |
| 20 |
|
| 21 |
#: ../../publish.rst:2 65617cfb871b492589d55186b708a1ce |
| 22 |
msgid "Publish your site" |
| 23 |
msgstr "发布站点" |
| 24 |
|
| 25 |
#: ../../publish.rst:7 dc4c9b1c1afd477d906b892dc592bdcd |
| 26 |
msgid "Site generation" |
| 27 |
msgstr "站点生成" |
| 28 |
|
| 29 |
#: ../../publish.rst:9 610c37360e2b49ec8ea630ddc224d2b7 |
| 30 |
msgid "" |
| 31 |
"Once Pelican is installed and you have some content (e.g., in Markdown or" |
| 32 |
" reST format), you can convert your content into HTML via the ``pelican``" |
| 33 |
" command, specifying the path to your content and (optionally) the path " |
| 34 |
"to your :doc:`settings<settings>` file::" |
| 35 |
msgstr "" |
| 36 |
"您应该已经安装好Pelican并且已经创作了一些内容了吧(以Markdown或是reST格式)," |
| 37 |
"现在就可以将这些内容通过 ``pelican`` 命令转换为HTML了,在转换时需要指定" |
| 38 |
"创作内容存放的路径;如果有需要, :doc:`配置<settings>` 文件的路径也可单独指定:" |
| 39 |
|
| 40 |
#: ../../publish.rst:16 6f353c84f5204d2b84c49d1557010b19 |
| 41 |
msgid "" |
| 42 |
"The above command will generate your site and save it in the ``output/`` " |
| 43 |
"folder, using the default theme to produce a simple site. The default " |
| 44 |
"theme consists of very simple HTML without styling and is provided so " |
| 45 |
"folks may use it as a basis for creating their own themes." |
| 46 |
msgstr "" |
| 47 |
"上面的指令会在 ``output/`` 目录下生成站点,使用的是默认的主题。默认主题只使用" |
| 48 |
"一些简单的HTML并且不包含样式,大家往往以这个简单主题为基础来创作自己的主题。" |
| 49 |
|
| 50 |
#: ../../publish.rst:21 bb5064d57ed144e6b85d7d3d0938f91c |
| 51 |
msgid "" |
| 52 |
"You can also tell Pelican to watch for your modifications, instead of " |
| 53 |
"manually re-running it every time you want to see your changes. To enable" |
| 54 |
" this, run the ``pelican`` command with the ``-r`` or ``--autoreload`` " |
| 55 |
"option. On non-Windows environments, this option can also be combined " |
| 56 |
"with the ``-l`` or ``--listen`` option to simultaneously both auto-" |
| 57 |
"regenerate *and* serve the output at http://localhost:8000::" |
| 58 |
msgstr "" |
| 59 |
"你也可以让Pelican来监听对源内容文件的修改,而不是在每次修改内容后重新手动执行命令" |
| 60 |
"来生成站点。在执行 ``pelican`` 命令时,加上 ``-r`` 或者 ``--autoreload`` 选项" |
| 61 |
"就可以做到这一点。在非Windows环境下,这个选项还可以和 ``-l`` 或 ``--listen`` " |
| 62 |
"搭配使用,这样就可以在自动重生成站点的基础上,同时提供在 http://localhost:8000 " |
| 63 |
"上的访问:" |
| 64 |
|
| 65 |
#: ../../publish.rst:30 40089a6762204e27bd16afaa038a8277 |
| 66 |
msgid "" |
| 67 |
"Pelican has other command-line switches available. Have a look at the " |
| 68 |
"help to see all the options you can use::" |
| 69 |
msgstr "" |
| 70 |
"Pelican还有一些其他的命令行选项。可以在帮助中看到所有可用选项:" |
| 71 |
|
| 72 |
#: ../../publish.rst:36 4484bb6f6e2b4bd49027c98be4fa2cd8 |
| 73 |
msgid "Viewing the generated files" |
| 74 |
msgstr "浏览生成的文件" |
| 75 |
|
| 76 |
#: ../../publish.rst:38 4dc83b844c964bcab17af21fabd5e6b2 |
| 77 |
msgid "" |
| 78 |
"The files generated by Pelican are static files, so you don't actually " |
| 79 |
"need anything special to view them. You can use your browser to open the " |
| 80 |
"generated HTML files directly::" |
| 81 |
msgstr "" |
| 82 |
"Pelican生成的文件都是静态的,也就是说不需要使用什么特殊的手段就可以浏览。" |
| 83 |
"您可以直接使用浏览器打开生成的HTML文件:" |
| 84 |
|
| 85 |
#: ../../publish.rst:44 c5774634f7da4f64bb7c7d0adbcdb65b |
| 86 |
msgid "" |
| 87 |
"Because the above method may have trouble locating your CSS and other " |
| 88 |
"linked assets, running Pelican's simple built-in web server will often " |
| 89 |
"provide a more reliable previewing experience::" |
| 90 |
msgstr "" |
| 91 |
"事实上,上面所说的直接打开的方式可能会使CSS或其他链接上出现问题," |
| 92 |
"可以运行Pelican自带的简易web服务器,如此便可以获得可靠的预览体验:" |
| 93 |
|
| 94 |
#: ../../publish.rst:50 b2eab6914b854b40bd769433fbad21b7 |
| 95 |
msgid "" |
| 96 |
"Once the web server has been started, you can preview your site at: " |
| 97 |
"http://localhost:8000/" |
| 98 |
msgstr "" |
| 99 |
"当web服务器启动后,可以访问 http://localhost:8000/ 来预览您的站点。" |
| 100 |
|
| 101 |
#: ../../publish.rst:54 3b7344cad46a4dfaa01c067dd1f4009b |
| 102 |
msgid "Deployment" |
| 103 |
msgstr "部署" |
| 104 |
|
| 105 |
#: ../../publish.rst:56 de2815c211b84291a985a1d808ffbfe7 |
| 106 |
msgid "" |
| 107 |
"After you have generated your site, previewed it in your local " |
| 108 |
"development environment, and are ready to deploy it to production, you " |
| 109 |
"might first re-generate your site with any production-specific settings " |
| 110 |
"(e.g., analytics, feeds, etc.) that you may have defined::" |
| 111 |
msgstr "" |
| 112 |
"当您生成好站点后,可以在本地先进行预览,确认无误后,在部署前可能还需使用" |
| 113 |
"生产环境特定的配置文件重新生成站点:" |
| 114 |
|
| 115 |
#: ../../publish.rst:63 56e568114b72443ebcf1f741f07504dc |
| 116 |
msgid "" |
| 117 |
"To base your publish configuration on top of your ``pelicanconf.py``, you" |
| 118 |
" can import your ``pelicanconf`` settings by including the following line" |
| 119 |
" in your ``publishconf.py``::" |
| 120 |
msgstr "" |
| 121 |
"您可以基于 ``pelicanconf.py`` 进行设置文件的配置, 在 ``publishconf.py`` " |
| 122 |
"中import ``pelicanconf`` 就可实现(译者注:配置文件其实本质上就是一些" |
| 123 |
"Python变量,因此import后就可以全部引入):" |
| 124 |
|
| 125 |
#: ../../publish.rst:69 b9e1243ed9ba409890d86ef8ff85499d |
| 126 |
msgid "" |
| 127 |
"If you have generated a ``publishconf.py`` using ``pelican-quickstart``, " |
| 128 |
"this line is included by default." |
| 129 |
msgstr "" |
| 130 |
"如果 ``publishconf.py`` 是通过 ``pelican-quickstart`` 生成的,上面这行默认就有。" |
| 131 |
|
| 132 |
#: ../../publish.rst:72 39671d42b0bb4c828fc51c63c351402c |
| 133 |
msgid "" |
| 134 |
"The steps for deploying your site will depend on where it will be hosted." |
| 135 |
" If you have SSH access to a server running Nginx or Apache, you might " |
| 136 |
"use the ``rsync`` tool to transmit your site files::" |
| 137 |
msgstr "" |
| 138 |
"部署站点的方法步骤取决于网站托管的位置。对于使用SSH访问的运行着Nginx或" |
| 139 |
"Apache的服务器,您可能需要使用 ``rsync`` 工具来传输站点文件:" |
| 140 |
|
| 141 |
#: ../../publish.rst:78 523ed256e0164a968d8580310e4a9304 |
| 142 |
msgid "" |
| 143 |
"There are many other deployment options, some of which can be configured " |
| 144 |
"when first setting up your site via the ``pelican-quickstart`` command. " |
| 145 |
"See the :doc:`Tips<tips>` page for detail on publishing via GitHub Pages." |
| 146 |
msgstr "" |
| 147 |
"还有很多其他的部署方式供您选择,有一些在第一次通过 ``pelican-quickstart`` " |
| 148 |
"命令建立站点时就已经配置。在 :doc:`小技巧<tips>` 中可以查看如何通过" |
| 149 |
"Github Pages部署站点。" |
| 150 |
|
| 151 |
#: ../../publish.rst:83 c44ecc79922d419b8627706a6694dd8c |
| 152 |
msgid "Automation" |
| 153 |
msgstr "自动化" |
| 154 |
|
| 155 |
#: ../../publish.rst:85 b892dcba14a84306aa6b39295b5f81e3 |
| 156 |
msgid "" |
| 157 |
"While the ``pelican`` command is the canonical way to generate your site," |
| 158 |
" automation tools can be used to streamline the generation and " |
| 159 |
"publication flow. One of the questions asked during the ``pelican-" |
| 160 |
"quickstart`` process pertains to whether you want to automate site " |
| 161 |
"generation and publication. If you answered \"yes\" to that question, a " |
| 162 |
"``tasks.py`` and ``Makefile`` will be generated in the root of your " |
| 163 |
"project. These files, pre-populated with certain information gleaned from" |
| 164 |
" other answers provided during the ``pelican-quickstart`` process, are " |
| 165 |
"meant as a starting point and should be customized to fit your particular" |
| 166 |
" needs and usage patterns. If you find one or both of these automation " |
| 167 |
"tools to be of limited utility, these files can be deleted at any time " |
| 168 |
"and will not affect usage of the canonical ``pelican`` command." |
| 169 |
msgstr "" |
| 170 |
"``pelican`` 命令是生成站点的标准方法,但同时也有自动化工具可以用来简化生成与" |
| 171 |
"发布流程。在 ``pelican-quickstart`` 的过程中,其中一个问题就是是否启用自动站点" |
| 172 |
"生成与发布。若您选择了 “yes”,在项目的根目录中就会生成 ``tasks.py`` " |
| 173 |
"和 ``Makefile`` 。这些文件中预填充了一些从 ``pelican-quickstart`` 过程中" |
| 174 |
"收集的信息,您应该从这个生成好的文件出发,再根据实际需要进一步修改。" |
| 175 |
"另外,如果您认为这些自动化脚本文件没什么用,完全可以将他们删除,这不会对标准命令 " |
| 176 |
"``pelican`` 产生任何影响。" |
| 177 |
|
| 178 |
#: ../../publish.rst:98 4c49ca3a24e3462a984dda738875ed4e |
| 179 |
msgid "" |
| 180 |
"Following are automation tools that \"wrap\" the ``pelican`` command and " |
| 181 |
"can simplify the process of generating, previewing, and uploading your " |
| 182 |
"site." |
| 183 |
msgstr "" |
| 184 |
"下面是一些自动化工具,其中包装了 ``pelican`` 命令,可以用于简化生成、预览和" |
| 185 |
"上传站点的过程。" |
| 186 |
|
| 187 |
#: ../../publish.rst:102 103fb7405038442aae62b62ea0fcdbe5 |
| 188 |
msgid "Invoke" |
| 189 |
msgstr "Invoke" |
| 190 |
|
| 191 |
#: ../../publish.rst:104 d3e46bf8da96489e923f6497e8932538 |
| 192 |
msgid "" |
| 193 |
"The advantage of Invoke_ is that it is written in Python and thus can be " |
| 194 |
"used in a wide range of environments. The downside is that it must be " |
| 195 |
"installed separately. Use the following command to install Invoke, " |
| 196 |
"prefixing with ``sudo`` if your environment requires it::" |
| 197 |
msgstr "" |
| 198 |
"Invoke_ 工具使用Python作为编程语言,并且能够用在很多不同的环境中。它需要使用" |
| 199 |
"下面的命令单独安装,在某些操作系统中可能需要在前面加上 ``sudo`` :" |
| 200 |
|
| 201 |
#: ../../publish.rst:111 786359d08e8f45598df7b1c45e32ca0a |
| 202 |
msgid "" |
| 203 |
"Take a moment to open the ``tasks.py`` file that was generated in your " |
| 204 |
"project root. You will see a number of commands, any one of which can be " |
| 205 |
"renamed, removed, and/or customized to your liking. Using the out-of-the-" |
| 206 |
"box configuration, you can generate your site via::" |
| 207 |
msgstr "" |
| 208 |
"可以打开 ``tasks.py`` 文件看看其中的代码,可以尝试更改和删除其中的命令," |
| 209 |
"也可以按照您的喜好自行进行其他修改。生成好的文件是开箱即用的,您可以通过" |
| 210 |
"下面的命令生成站点:" |
| 211 |
|
| 212 |
#: ../../publish.rst:118 ../../publish.rst:166 04c6045b58c24bc1a1fd594cdcf4ef5c |
| 213 |
#: 1e9cf29276ec4446b1b0f4a55a1ef4b8 |
| 214 |
msgid "" |
| 215 |
"If you'd prefer to have Pelican automatically regenerate your site every " |
| 216 |
"time a change is detected (which is handy when testing locally), use the " |
| 217 |
"following command instead::" |
| 218 |
msgstr "" |
| 219 |
"若您希望Pelican在检测到变化时自动重新生成站点(在本地测试的时候很实用)," |
| 220 |
"可以使用下面的命令:" |
| 221 |
|
| 222 |
#: ../../publish.rst:124 ../../publish.rst:172 fabe0ce08eca4c5ebd9ca65898dab138 |
| 223 |
#: ff42351e29b944a59e8df22b1cbb20f5 |
| 224 |
msgid "" |
| 225 |
"To serve the generated site so it can be previewed in your browser at " |
| 226 |
"http://localhost:8000/::" |
| 227 |
msgstr "" |
| 228 |
"下面的命令则可以让您在生成后通过浏览器访问 http://localhost:8000/ 来预览站点" |
| 229 |
|
| 230 |
#: ../../publish.rst:129 e1b12a6c64b246f89aea105b8d7febbc |
| 231 |
msgid "" |
| 232 |
"To serve the generated site with automatic browser reloading every time a" |
| 233 |
" change is detected, first ``python -m pip install livereload``, then use" |
| 234 |
" the following command::" |
| 235 |
msgstr "" |
| 236 |
"在每次检测到修改重生成站点后,可以让浏览器自动进行重载。先运行 " |
| 237 |
"``python -m pip install livereload`` 安装,再运行下面的这条命令就可以实现:" |
| 238 |
|
| 239 |
#: ../../publish.rst:135 bf0d6c7770fe4a399b81b9ebdd48fa4e |
| 240 |
msgid "" |
| 241 |
"If during the ``pelican-quickstart`` process you answered \"yes\" when " |
| 242 |
"asked whether you want to upload your site via SSH, you can use the " |
| 243 |
"following command to publish your site via rsync over SSH::" |
| 244 |
msgstr "" |
| 245 |
"如果在 ``pelican-quickstart`` 过程中,对是否要通过SSH上传站点问题回答了“yes”," |
| 246 |
"您就可以使用下面的命令借助rsync在SSH上发布站点:" |
| 247 |
|
| 248 |
#: ../../publish.rst:141 9bea9f82ce164ee5ba07349a4c4d58ea |
| 249 |
msgid "" |
| 250 |
"These are just a few of the commands available by default, so feel free " |
| 251 |
"to explore ``tasks.py`` and see what other commands are available. More " |
| 252 |
"importantly, don't hesitate to customize ``tasks.py`` to suit your " |
| 253 |
"specific needs and preferences." |
| 254 |
msgstr "" |
| 255 |
"默认就可以使用的命令远不止这些,在 ``tasks.py`` 中可以找到更多可用的命令。" |
| 256 |
"更重要的是,当您有特定需求和偏好时,直接修改 ``tasks.py`` 即可。" |
| 257 |
|
| 258 |
#: ../../publish.rst:147 06a6e7232c6243d79ab9f43ddc28590d |
| 259 |
msgid "Make" |
| 260 |
msgstr "Make" |
| 261 |
|
| 262 |
#: ../../publish.rst:149 a2a5b589cf804fcd83ee2d0fbf98c12d |
| 263 |
msgid "" |
| 264 |
"A ``Makefile`` is also automatically created for you when you say \"yes\"" |
| 265 |
" to the relevant question during the ``pelican-quickstart`` process. The " |
| 266 |
"advantage of this method is that the ``make`` command is built into most " |
| 267 |
"POSIX systems and thus doesn't require installing anything else in order " |
| 268 |
"to use it. The downside is that non-POSIX systems (e.g., Windows) do not " |
| 269 |
"include ``make``, and installing it on those systems can be a non-trivial" |
| 270 |
" task." |
| 271 |
msgstr "" |
| 272 |
"``Makefile`` 也是自动生成的。在大多数POSIX系统中都内置了 ``make`` 命令," |
| 273 |
"无需安装即可使用。但在非POSIX系统(例如Windows)中并没有 ``make`` ,在这些" |
| 274 |
"系统中安装 ``make`` 则往往比较麻烦。" |
| 275 |
|
| 276 |
#: ../../publish.rst:156 68c38c3eb34e4e6ca9cd4a2d3646d5cb |
| 277 |
msgid "" |
| 278 |
"If you want to use ``make`` to generate your site using the settings in " |
| 279 |
"``pelicanconf.py``, run::" |
| 280 |
msgstr "" |
| 281 |
"使用 ``make`` 命令是以 ``pelicanconf.py`` 作为配置文件来生成站点的:" |
| 282 |
|
| 283 |
#: ../../publish.rst:161 133e6e1ebf92412a85eedbe56e0b91af |
| 284 |
msgid "" |
| 285 |
"To generate the site for production, using the settings in " |
| 286 |
"``publishconf.py``, run::" |
| 287 |
msgstr "" |
| 288 |
"使用 ``publishconf.py`` 作为配置文件来为生产环境生成站点:" |
| 289 |
|
| 290 |
#: ../../publish.rst:177 f4e250949c2145ceb03b65c875767abc |
| 291 |
msgid "" |
| 292 |
"Normally you would need to run ``make regenerate`` and ``make serve`` in " |
| 293 |
"two separate terminal sessions, but you can run both at once via::" |
| 294 |
msgstr "" |
| 295 |
"一般来说, ``make regenerate`` 和 ``make serve`` 需要在分别在单独的终端会话中" |
| 296 |
"运行,下面的命令相当于同时运行上述两个命令:" |
| 297 |
|
| 298 |
#: ../../publish.rst:182 1f83bbcf60134eef959370bb5ca402d9 |
| 299 |
msgid "" |
| 300 |
"The above command will simultaneously run Pelican in regeneration mode as" |
| 301 |
" well as serve the output at http://localhost:8000." |
| 302 |
msgstr "" |
| 303 |
"上面的命令会让Pelican在重生成模式下持续运行,同样地,您可以通过 " |
| 304 |
"http://localhost:8000 访问生成的站点。" |
| 305 |
|
| 306 |
#: ../../publish.rst:185 9274a68b1e3b4639bf638a044eda613d |
| 307 |
msgid "" |
| 308 |
"When you're ready to publish your site, you can upload it via the " |
| 309 |
"method(s) you chose during the ``pelican-quickstart`` questionnaire. For " |
| 310 |
"this example, we'll use rsync over ssh::" |
| 311 |
msgstr "" |
| 312 |
"当准备好发布站点时,可以使用在 ``pelican-quickstart`` 过程中选择的方法进行上传。" |
| 313 |
"下面的例子使用rsync在ssh上完成这一工作:" |
| 314 |
|
| 315 |
#: ../../publish.rst:191 9d7e7927c183491f981aacebe14e5bf1 |
| 316 |
msgid "That's it! Your site should now be live." |
| 317 |
msgstr "OK!您的站点现在已经可以访问了。" |
| 318 |
|
| 319 |
#: ../../publish.rst:193 8f570acd5f494f5b9645fdbca6db6fbb |
| 320 |
msgid "" |
| 321 |
"(The default ``Makefile`` and ``devserver.sh`` scripts use the ``python``" |
| 322 |
" and ``pelican`` executables to complete its tasks. If you want to use " |
| 323 |
"different executables, such as ``python3``, you can set the ``PY`` and " |
| 324 |
"``PELICAN`` environment variables, respectively, to override the default " |
| 325 |
"executable names.)" |
| 326 |
msgstr "" |
| 327 |
"(默认的 ``Makefile`` 和 ``devserver.sh`` 脚本执行 ``python`` 和 ``pelican`` " |
| 328 |
"来完成任务。若您希望使用其他的可执行文件,例如 ``python3`` ,设置环境变量 ``PY`` " |
| 329 |
"和 ``PELICAN`` 来覆盖默认的可执行文件名)" |