Drupal 安装 amp 安装问题回顾

Drupal 安装 amp 安装问题回顾:安装amp可能会遇到的问题及解决办法

本地测试环境  

1.必备:cms程序源码、数据库文件

2.服务器环境模拟:官方推荐

3.安装失败可能性:windos下安装失败可能是缺少.net或 c++ 组件,也可能是版本不兼容操作系统的问题

4.必要管理组件:composer、git(官网下载windos版本)

5.composer本地下载官方的exe文件放到cms目录下运行下载,并执行phar文件

6.远程下载失败:可能是ssl证书问题,从新下载证书并上传替换即可 

7.git地址读取失败:composer本地下需要添加git环境变量(path),如不行需要手动添加添加

;“C:\path\to\git\bin”;“C:\path\to\\ \\ git\cmd“

修改环境变量1修改环境变量2证书修复1证书修复2

Drupal安装Accelerated Mobile Pages (AMP)必备条件以及完整安装步骤

1.确认服务器为php5.5+版本和composer、git组件安装完毕

2.composer于drupal相关基本教程

3.模板html和css修改教程,请参照amp标准

amp主题的css样式是写在主题模板下的,所以要修改样式得在模板(twig文件)下面修改,修改完之后刷新模板缓存。

8.3测试版本会报错,需要手动修改模板依赖

快捷指令

下载依赖库和模块:

composer require drupal/amp

下载主题:

composer require drupal/amptheme



···

On the command line, enter the following commands in your project root directory:

* Download the AMP module and its dependencies, including the AMP library, with `composer require drupal/amp`.

* Download the AMP theme with `composer require drupal/amptheme`.

To do a modified install:

If you want to modify some of the properties of the downloaded composer.json before composer install is executed, use the --no-install flag when running composer create-project. For example, it is possible that you want to rename the subdirectory 'web' to something else.

To do that:

Runcomposer create-project drupal-composer/drupal-project:8.x-dev my_site_name_dir --stability dev --no-interaction --no-install

Change directories to my_site_name_dir and edit the composer.json file to suit your needs

Run composer install to download Drupal 8 and all its dependencies.

Refer to the README for atdrupal-composer/drupal-projectto learn more about this option's features and usage. If you are used to building Drupal site via drush make, refer to theFAQs in Drupal's Composer template documentationto learn the difference between this option and drush make.

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • 100+ 经典技术书籍,涵盖:计算机系统与网络、系统架构、算法与数据结构、前端开发、后端开发、移动开发、数据库、测...
    玥玥籽阅读 5,371评论 0 2
  • 回首页 第一部分 Drupal简介 Drupal overview A tour of Drupal fundam...
    王乂阅读 6,263评论 0 9
  • 是什么 如果你知道yum、apt-get、npm、bower等命令中的一种或者多种,那么,你也能很快知道compo...
    旱魃一样阅读 8,332评论 0 9
  • 失落的魂魄 放进风里 一阵雨洒成泪滴 苦味的海床 盐在累积 忧与愁 丝丝叠起 温暖的心,热腾的血 为什么消磨在杜鹃...
    山上人家123阅读 1,436评论 3 4
  • 此刻,孩子躺在我的身边,因为感冒发出重重的呼吸声。这个小生命总能激起我无限的爱和感动。 对生命的敬畏,是在当了妈之...
    Queenie_2fc6阅读 4,164评论 4 5