Magento 2部署静态内容

在本教程中,我们将讨论在命令行系列中部署静态内容 。如您所知,在Magento 2中,它们在中添加了许多命令。这可能很难解决,让我解释一下有关部署静态内容的更多细节。setup:static-content:deploybin/magento

通过命令行部署静态内容

转到Magento管理员根文件夹并显示用法:

php bin/magento setup:static-content:deploy -h

输出:

Usage:
  setup:static-content:deploy [options] [--] [<languages>]...

Arguments:
  languages                                  Space-separated list of ISO-636 language codes for which to output static view files.

Options:
  -f, --force                                Deploy files in any mode.
  -s, --strategy[=STRATEGY]                  Deploy files using specified strategy. [default: "quick"]
  -a, --area[=AREA]                          Generate files only for the specified areas. [default: ["all"]] (multiple values allowed)
      --exclude-area[=EXCLUDE-AREA]          Do not generate files for the specified areas. [default: ["none"]] (multiple values allowed)
  -t, --theme[=THEME]                        Generate static view files for only the specified themes. [default: ["all"]] (multiple values allowed)
      --exclude-theme[=EXCLUDE-THEME]        Do not generate files for the specified themes. [default: ["none"]] (multiple values allowed)
  -l, --language[=LANGUAGE]                  Generate files only for the specified languages. [default: ["all"]] (multiple values allowed)
      --exclude-language[=EXCLUDE-LANGUAGE]  Do not generate files for the specified languages. [default: ["none"]] (multiple values allowed)
  -j, --jobs[=JOBS]                          Enable parallel processing using the specified number of jobs. [default: 0]
      --symlink-locale                       Create symlinks for the files of those locales, which are passed for deployment, but have no customizations.
      --content-version=CONTENT-VERSION      Custom version of static content can be used if running deployment on multiple nodes to ensure that static content version is identical and caching works properly.
      --refresh-content-version-only         Refreshing the version of static content only can be used to refresh static content in browser cache and CDN cache.
      --no-javascript                        Do not deploy JavaScript files.
      --no-css                               Do not deploy CSS files.
      --no-less                              Do not deploy LESS files.
      --no-images                            Do not deploy images.
      --no-fonts                             Do not deploy font files.
      --no-html                              Do not deploy HTML files.
      --no-misc                              Do not deploy files of other types (.md, .jbf, .csv, etc.).
      --no-html-minify                       Do not minify HTML files.
  -h, --help                                 Display this help message
  -q, --quiet                                Do not output any message
  -V, --version                              Display this application version
      --ansi                                 Force ANSI output
      --no-ansi                              Disable ANSI output
  -n, --no-interaction                       Do not ask any interactive question
  -v|vv|vvv, --verbose                       Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

Help:
  Deploys static view files                                                                 

句法

安装/更新扩展程序时,只需运行以下命令行即可在商店中部署静态内容

php bin/magento setup:static-content:deploy

相关文章

0 0 投票数
文章评分
订阅评论
提醒
0 评论
最旧
最新 最多投票
内联反馈
查看所有评论