sasquatchwp/sasquatchwp

WordPress入门级堆栈 - 基础、Bedrock和一些魔法混合

安装: 11

依赖: 0

建议者: 0

安全: 0

星标: 15

关注者: 5

分支: 2

开放问题: 1

语言:SCSS

类型:项目

dev-master 2021-02-09 19:57 UTC

This package is auto-updated.

Last update: 2024-09-10 04:04:54 UTC


README

Sasquatch WP - 入门包

描述

这是 SasquatchWP 入门级堆栈。

SasquatchWP是什么?

它是以下内容的混合:

和一些魔法来让它们保持在一起。

安装

  1. git clone https://github.com/SasquatchWP/SasquatchWP.git .
  2. .env.example重命名为.env并填写正确数据(数据库名称、密码等) - 记得从这里添加盐值
  3. 准备.htaccessvhost
  4. composer install
  5. web/app/themes/sasquatch中更改主题名称
  6. cd web/app/themes/{theme_name}
  7. npm install
  8. composer install

记得在web/app/themes/{theme_name}/config.yml中更改DEVURL

.htaccess

这是一个通用的.htaccess,您可以在共享主机上使用。

域名示例(domain.test)

<Files ~ '\.(env|json|config.js|md|gitignore|gitattributes|lock)$'>
    Order allow,deny
    Deny from all
</Files>
<Files ~ '(composer.json|test.html)$'>
    Order allow,deny
    Deny from all
</Files>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.test$
RewriteCond %{REQUEST_URI} !^/web/
RewriteRule ^(.*)$ /web/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.test$
RewriteRule ^(/)?$ web/index.php [L]

子文件夹示例(domain.test/subfolder)

<Files ~ '\.(env|json|config.js|md|gitignore|gitattributes|lock)$'>
    Order allow,deny
    Deny from all
</Files>
<Files ~ '(composer.json|test.html)$'>
    Order allow,deny
    Deny from all
</Files>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?domain.test$
RewriteCond %{REQUEST_URI} !^/subfolder/web/
RewriteRule ^(.*)$ /subfolder/web/$1
RewriteCond %{HTTP_HOST} ^(www.)?domain.test$
RewriteRule ^(/)?$ web/index.php [L]

vhost

将您的网站vhost文档根设置为/path/to/site/web/

示例

<VirtualHost *:80>
	ServerName domain.test
	DocumentRoot "/path/to/site/web"
	<Directory  "/path/to/site/">
		Options +Indexes +Includes +FollowSymLinks +MultiViews
		AllowOverride All
	</Directory>
</VirtualHost>

用法

  • npm run build - 运行所有生产任务

  • npm run development - 运行所有开发任务(网站地图等)

  • npm start - 以监视模式运行任务

  • npm es-lint - 运行javascript lint - 要更改配置,请查看.browserslistrc

  • npm sass-lint - 运行sass lint - 要更改配置,请查看.sass-lint.yml

  • npm audit - 运行Parker审计

在哪里使用

如果您正在使用SasquatchWP,请联系我 m.palmowski@freshpixels.pl