Skip to content

Commit

Permalink
Add blueprint, improve readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jdevalk committed Feb 22, 2024
1 parent 93eee31 commit f007c69
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,5 @@ jobs:
- name: Lint against parse errors
run: composer lint -- --checkstyle | cs2pr

#- name: Lint blueprint file
# run: composer lint-blueprint
- name: Lint blueprint file
run: composer lint-blueprint
16 changes: 16 additions & 0 deletions .wordpress-org/blueprints/blueprint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"landingPage": "\/?robots=1",
"steps": [
{
"step": "login",
"username": "admin",
"password": "password"
},
{
"step": "defineWpConfigConsts",
"consts": {
"IS_PLAYGROUND_PREVIEW": true
}
}
]
}
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,39 @@ If you're developing on this plugin, you will probably want to run tests and lin
* PHP Autofixer for code style: `composer fix-cs`
* PHP Lint: `composer lint`
* PHP Unit tests: `composer test`

The default output of this plugin is as follows:

```txt
# This site is very specific about who it allows crawling from. Our default is you're not allowed to crawl:
User-agent: *
Disallow: /
# Below are the crawlers that are allowed to crawl this site.
# Below that list, you'll find paths that are blocked, even for them, and then paths within those blocked paths that are allowed.
User-agent: Googlebot
User-agent: AdsBot-Google
User-agent: MediaPartners-Google
User-agent: Applebot
User-agent: Yandex
User-agent: Baiduspider
User-agent: Bingbot
User-agent: Slurp
User-agent: DuckDuckBot
User-agent: ia_archiver
User-agent: FacebookExternalHit
User-agent: Twitterbot
User-agent: LinkedInBot
Disallow: /wp-json/
Disallow: /?rest_route=
Disallow: /wp-admin/
Disallow: /wp-content/cache/
Disallow: /wp-content/plugins/
Disallow: /xmlrpc.php
Disallow: /wp-includes/
Allow: /wp-includes/css/
Allow: /wp-includes/js/
# XML Sitemap:
Sitemap: https://example.com/sitemap_index.xml
```
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@
"lint": [
"@php ./vendor/php-parallel-lint/php-parallel-lint/parallel-lint . -e php --show-deprecated --exclude vendor --exclude node_modules --exclude .git"
],
"lint-blueprint": [
"@php -r \"exit( intval( is_null( json_decode( file_get_contents( './.wordpress-org/blueprints/blueprint.json' ) ) ) ) );\""
],
"test": [
"@php ./vendor/phpunit/phpunit/phpunit"
]
Expand Down

0 comments on commit f007c69

Please sign in to comment.