sasquatchwp / sasquatchwp
WordPress入门级堆栈 - 基础、Bedrock和一些魔法混合
dev-master
2021-02-09 19:57 UTC
Requires
- php: >=5.6
- composer/installers: ^1.5
- oscarotero/env: ^1.1.0
- roots/wordpress: 5.0.1
- roots/wp-config: 1.0.0
- roots/wp-password-bcrypt: 1.0.0
- soberwp/models: dev-master
- vlucas/phpdotenv: ^2.0.1
Requires (Dev)
- roave/security-advisories: dev-master
- squizlabs/php_codesniffer: ^2.0.0
This package is auto-updated.
Last update: 2024-09-10 04:04:54 UTC
README
Sasquatch WP - 入门包
描述
这是 SasquatchWP 入门级堆栈。
SasquatchWP是什么?
它是以下内容的混合:
- Bedrock - https://roots.io/bedrock/
- Zurb Foundation - https://github.com/zurb/foundation-sites
- Timber - https://github.com/timber/timber
- SoberWP Intervention - https://github.com/soberwp/intervention
- SoberWP Models - https://github.com/soberwp/models
和一些魔法来让它们保持在一起。
安装
git clone https://github.com/SasquatchWP/SasquatchWP.git .
- 将
.env.example
重命名为.env
并填写正确数据(数据库名称、密码等) - 记得从这里添加盐值 - 准备.htaccess或vhost
composer install
- 在
web/app/themes/sasquatch
中更改主题名称 cd web/app/themes/{theme_name}
npm install
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审计
在哪里使用
- https://bezprawnik.pl - 波兰最大的法律博客之一
- https://autoblog.pl - 快速发展的波兰汽车服务
- https://wrc.net.pl - 波兰最大的赛车网站
- https://liberte.pl - 来自世界各地的最佳文章精选
如果您正在使用SasquatchWP,请联系我 m.palmowski@freshpixels.pl