Browse Source

Fix readme and update CI pipeline (#344)

* Update style.css and readme, remove unneeded dev dependency

* Update CI flow

* Fix spacing

* composer update

* Replace do_shortcode with apply_shortcodes

* Use GitHub Action for Codecov uploads
pull/346/head
Steel Wagstaff 2 years ago committed by GitHub
parent
commit
7373a5a710
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      .github/workflows/build-and-lint.yml
  2. 8
      .github/workflows/standards-and-tests.yml
  3. 16
      .github/workflows/update-pot.yml
  4. 16
      .github/workflows/update-translations.yml
  5. 37
      README.md
  6. 4
      composer.json
  7. 1799
      composer.lock
  8. 2
      functions.php
  9. 58
      readme.txt
  10. 12
      style.css

6
.github/workflows/build-and-lint.yml

@ -15,13 +15,13 @@ jobs:
name: Node ${{ matrix.node }} name: Node ${{ matrix.node }}
steps: steps:
- uses: actions/checkout@v1 - uses: actions/checkout@v3
- name: Setup node - name: Setup node
uses: actions/setup-node@v2 uses: actions/setup-node@v3
with: with:
node-version: ${{ matrix.node }} node-version: ${{ matrix.node }}
- name: Cache Node modules - name: Cache Node modules
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: node_modules path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }}

8
.github/workflows/standards-and-tests.yml

@ -15,7 +15,7 @@ jobs:
matrix: matrix:
php: [ 7.4 ] php: [ 7.4 ]
os: [ ubuntu-20.04 ] os: [ ubuntu-20.04 ]
wordpress: [ 5.9.3, latest ] wordpress: [ '6.0', latest ]
experimental: [ false ] experimental: [ false ]
include: include:
- php: 8.0 - php: 8.0
@ -30,13 +30,13 @@ jobs:
steps: steps:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v2 uses: actions/checkout@v3
- name: Start required services - name: Start required services
run: sudo systemctl start mysql.service run: sudo systemctl start mysql.service
- name: Cache PHP dependencies - name: Cache PHP dependencies
uses: actions/cache@v2 uses: actions/cache@v3
with: with:
path: vendor path: vendor
key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }} key: php-${{ matrix.php }}-composer-${{ hashFiles('**/composer.lock') }}
@ -68,7 +68,7 @@ jobs:
if: matrix.experimental == false if: matrix.experimental == false
- name: Upload Coverage to Codecov - name: Upload Coverage to Codecov
run: bash <(curl -s https://codecov.io/bash) uses: codecov/codecov-action@v3
if: matrix.experimental == false if: matrix.experimental == false
- name: Prepare Build - name: Prepare Build

16
.github/workflows/update-pot.yml

@ -12,7 +12,7 @@ jobs:
update-pot: update-pot:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- name: Setup PHP with tools - name: Setup PHP with tools
uses: shivammathur/setup-php@v2 uses: shivammathur/setup-php@v2
with: with:
@ -20,14 +20,8 @@ jobs:
tools: composer, wp-cli/wp-cli-bundle tools: composer, wp-cli/wp-cli-bundle
- name: Update POT file - name: Update POT file
run: wp i18n make-pot . languages/pressbooks-aldine.pot --domain=pressbooks-aldine --slug=pressbooks-aldine --package-name="Aldine" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-aldine/issues\"}" run: wp i18n make-pot . languages/pressbooks-aldine.pot --domain=pressbooks-aldine --slug=pressbooks-aldine --package-name="Aldine" --headers="{\"Report-Msgid-Bugs-To\":\"https://github.com/pressbooks/pressbooks-aldine/issues\"}"
# Remove this step once you are satisfied with the results; alternatively, you can leave it in place and remove - name: Commit updated POT file
# the commented out step that follows. uses: stefanzweifel/git-auto-commit-action@v4.1.1
- name: Open PR with changes
uses: peter-evans/create-pull-request@v4
with: with:
title: 'chore(l10n): update languages/pressbooks-aldine.pot' commit_message: 'chore(l10n): update languages/pressbooks-aldine.pot'
# - name: Commit updated POT file file_pattern: '*.pot'
# uses: stefanzweifel/git-auto-commit-action@v4.1.1
# with:
# commit_message: 'chore(l10n): update languages/pressbooks-aldine.pot'
# file_pattern: '*.pot'

16
.github/workflows/update-translations.yml

@ -6,7 +6,7 @@ jobs:
update-translations: update-translations:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
with: with:
token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }} token: ${{ secrets.PAT_FOR_GITHUB_ACTIONS }}
- name: Install Transifex Client - name: Install Transifex Client
@ -22,14 +22,8 @@ jobs:
tools: composer, wp-cli/wp-cli-bundle tools: composer, wp-cli/wp-cli-bundle
- name: Generate MO files - name: Generate MO files
run: wp i18n make-mo languages run: wp i18n make-mo languages
# Remove this step once you are satisfied with the results; alternatively, you can leave it in place and remove - name: Commit updated translation files
# the commented out step that follows. uses: stefanzweifel/git-auto-commit-action@v4.13.1
- name: Open PR with changes
uses: peter-evans/create-pull-request@v4
with: with:
title: 'chore(l10n): update translations' commit_message: 'chore(l10n): update translations'
# - name: Commit updated translation files file_pattern: '*.mo'
# uses: stefanzweifel/git-auto-commit-action@v4.13.1
# with:
# commit_message: 'chore(l10n): update translations'
# file_pattern: '*.mo'

37
README.md

@ -6,32 +6,29 @@
[![PHP from Packagist](https://img.shields.io/packagist/php-v/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine) [![PHP from Packagist](https://img.shields.io/packagist/php-v/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Packagist](https://img.shields.io/packagist/dt/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine) [![Packagist](https://img.shields.io/packagist/dt/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Build Status](https://travis-ci.org/pressbooks/pressbooks-aldine.svg?branch=dev)](https://travis-ci.org/pressbooks/pressbooks-aldine)
[![Translate Aldine](https://img.shields.io/badge/dynamic/json.svg?label=translated&url=https%3A%2F%2Ftenpercent.now.sh%2F%3Forganization%3Dpressbooks%26project%3Daldine&query=%24.status&colorB=e05d44&suffix=%25)](https://www.transifex.com/pressbooks/aldine/translate/) [![Translate Aldine](https://img.shields.io/badge/dynamic/json.svg?label=translated&url=https%3A%2F%2Ftenpercent.now.sh%2F%3Forganization%3Dpressbooks%26project%3Daldine&query=%24.status&colorB=e05d44&suffix=%25)](https://www.transifex.com/pressbooks/aldine/translate/)
**Tags:** publishing, catalog, pressbooks, default-theme Contributors: conner_bw, greatislander, steelwagstaff
Tags: publishing, catalog, pressbooks, default-theme
**Requires at least:** 5.9.3 Requires at least: 5.9.3
**Tested up to:** 5.9.3 Tested up to: 6.0.1
**Stable tag:** 1.14.1 Stable tag: 1.14.1
**License:** GNU General Public License v3 or later Requires PHP: 7.4
**License URI:** LICENSE License: GNU General Public License v3 or later
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher. Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher.
## Description ## Description
Aldine is the default theme for the home page of [Pressbooks](https://pressbooks.org) networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher. Aldine is based on [Underscores](https://underscores.me/). Aldine is the default theme for the home page of [Pressbooks](https://pressbooks.org) networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher. Aldine is based on [Underscores](https://underscores.me/).
## Installation ## Installation
1. In your admin panel, go to Appearance > Themes and click the Add New button. 1. In your admin panel, go to Appearance > Themes and click the Add New button.
2. Click Upload Theme and Choose File, then select the theme's [.zip file](https://github.com/pressbooks/pressbooks-aldine/releases/latest/). Click Install Now. 2. Click Upload Theme and Choose File, then select the theme's [.zip file](https://github.com/pressbooks/pressbooks-aldine/releases/latest/). Click Install Now.
3. Click Activate to use your new theme right away. 3. Click Activate to use your new theme right away.
## Changelog ## Changelog
### 1.14.1 ### 1.14.1
@ -39,6 +36,24 @@ Aldine is the default theme for the home page of [Pressbooks](https://pressbooks
* See: https://github.com/pressbooks/pressbooks-aldine/releases/tag/1.14.1 * See: https://github.com/pressbooks/pressbooks-aldine/releases/tag/1.14.1
* Full release history available at: https://github.com/pressbooks/pressbooks-aldine/releases * Full release history available at: https://github.com/pressbooks/pressbooks-aldine/releases
## Upgrade Notice
### 1.14.1
- Aldine requires Pressbooks >= 5.34.1
### 1.14.0
- Aldine requires Pressbooks >= 5.33.0
### 1.13.0
- Aldine requires Pressbooks >= 5.32.0
### 1.8.3
- Aldine requires Pressbooks >= 5.17.0
## Credits ## Credits
- Based on [Underscores](https://underscores.me/), (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html) - Based on [Underscores](https://underscores.me/), (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)

4
composer.json

@ -36,7 +36,6 @@
}, },
"require-dev": { "require-dev": {
"pressbooks/coding-standards": "^1.1", "pressbooks/coding-standards": "^1.1",
"wpreadme2markdown/wp2md": "^4.0",
"yoast/phpunit-polyfills": "^1.0.1" "yoast/phpunit-polyfills": "^1.0.1"
}, },
"scripts": { "scripts": {
@ -54,7 +53,6 @@
], ],
"localize": [ "localize": [
"wp-pot -o=languages/pressbooks-aldine.pot -d=pressbooks-aldine -t 'Pressbooks (Book Oven Inc.) <code@pressbooks.com>' -s '**/*.php'" "wp-pot -o=languages/pressbooks-aldine.pot -d=pressbooks-aldine -t 'Pressbooks (Book Oven Inc.) <code@pressbooks.com>' -s '**/*.php'"
], ]
"readme": ["vendor/bin/wp2md -i readme.txt -o README.md"]
} }
} }

1799
composer.lock generated

File diff suppressed because it is too large Load Diff

2
functions.php

@ -55,7 +55,7 @@ add_filter( 'body_class', '\Aldine\Filters\body_classes' );
add_filter( 'excerpt_more', '\Aldine\Filters\excerpt_more' ); add_filter( 'excerpt_more', '\Aldine\Filters\excerpt_more' );
add_filter( 'query_vars', '\Aldine\Filters\register_query_vars' ); add_filter( 'query_vars', '\Aldine\Filters\register_query_vars' );
add_filter( 'wp_nav_menu_items', '\Aldine\Filters\adjust_menu', 10, 2 ); add_filter( 'wp_nav_menu_items', '\Aldine\Filters\adjust_menu', 10, 2 );
add_filter( 'the_content', 'do_shortcode' ); add_filter( 'the_content', 'apply_shortcodes' );
add_filter( 'show_admin_bar', '__return_false' ); add_filter( 'show_admin_bar', '__return_false' );
add_action( 'widgets_init', '\Aldine\Actions\widgets_init' ); add_action( 'widgets_init', '\Aldine\Actions\widgets_init' );
add_action( 'widgets_init', '\Aldine\Actions\remove_widgets' ); add_action( 'widgets_init', '\Aldine\Actions\remove_widgets' );

58
readme.txt

@ -1,58 +0,0 @@
=== Aldine ===
[![Packagist](https://img.shields.io/packagist/l/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Current Release](https://img.shields.io/github/release/pressbooks/pressbooks-aldine.svg)](https://github.com/pressbooks/pressbooks/releases/latest/)
[![Packagist](https://img.shields.io/packagist/v/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![PHP from Packagist](https://img.shields.io/packagist/php-v/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Packagist](https://img.shields.io/packagist/dt/pressbooks/pressbooks-aldine.svg)](https://packagist.org/packages/pressbooks/pressbooks-aldine)
[![Build Status](https://travis-ci.org/pressbooks/pressbooks-aldine.svg?branch=dev)](https://travis-ci.org/pressbooks/pressbooks-aldine)
[![Translate Aldine](https://img.shields.io/badge/dynamic/json.svg?label=translated&url=https%3A%2F%2Ftenpercent.now.sh%2F%3Forganization%3Dpressbooks%26project%3Daldine&query=%24.status&colorB=e05d44&suffix=%25)](https://www.transifex.com/pressbooks/aldine/translate/)
Tags: publishing, catalog, pressbooks, default-theme
Requires at least: 5.9.3
Tested up to: 5.9.3
Stable tag: 1.14.1
License: GNU General Public License v3 or later
License URI: LICENSE
Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher.
== Description ==
Aldine is the default theme for the home page of [Pressbooks](https://pressbooks.org) networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the world’s first publisher. Aldine is based on [Underscores](https://underscores.me/).
== Installation ==
1. In your admin panel, go to Appearance > Themes and click the Add New button.
2. Click Upload Theme and Choose File, then select the theme's [.zip file](https://github.com/pressbooks/pressbooks-aldine/releases/latest/). Click Install Now.
3. Click Activate to use your new theme right away.
== Changelog ==
= 1.14.1 =
* See: https://github.com/pressbooks/pressbooks-aldine/releases/tag/1.14.1
* Full release history available at: https://github.com/pressbooks/pressbooks-aldine/releases
== Upgrade Notice ==
= 1.14.1 =
- Aldine requires Pressbooks >= 5.34.1
= 1.14.0 =
- Aldine requires Pressbooks >= 5.33.0
= 1.13.0 =
- Aldine requires Pressbooks >= 5.32.0
= 1.8.3 =
- Aldine requires Pressbooks >= 5.17.0
== Credits ==
- Based on [Underscores](https://underscores.me/), (C) 2012-2017 Automattic, Inc., [GPLv2 or later](https://www.gnu.org/licenses/gpl-2.0.html)

12
style.css

@ -1,15 +1,19 @@
/* /*
Theme Name: Aldine Theme Name: Aldine
Theme URI: https://github.com/pressbooks/pressbooks-aldine/ Theme URI: https://github.com/pressbooks/pressbooks-aldine/
Description: Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the worlds first publisher.
Version: 1.15.0-dev
Author: Pressbooks (Book Oven Inc.) Author: Pressbooks (Book Oven Inc.)
Author URI: https://pressbooks.org Author URI: https://pressbooks.org
Description: Aldine is the default theme for the home page of Pressbooks networks. It is named for the Aldine Press, founded by Aldus Manutius in 1494, who is regarded by many as the worlds first publisher.
Tags: publishing, catalog, pressbooks, default-theme
Version: 1.15.0-dev
Requires at least: 5.9.3
Tested up to: 6.0.1
Requires PHP: 7.4
License: GNU GPL v3 or later
License URI: https://github.com/pressbooks/pressbooks-aldine/tree/master/LICENSE.md
Text Domain: pressbooks-aldine Text Domain: pressbooks-aldine
GitHub Theme URI: pressbooks/pressbooks-aldine GitHub Theme URI: pressbooks/pressbooks-aldine
Release Asset: true Release Asset: true
License: GNU GPL v3 or later
License URI: https://github.com/pressbooks/pressbooks-aldine/tree/master/LICENSE.md
Aldine is based on Underscores https://underscores.me/, (C) 2012-2017 Automattic, Inc. Aldine is based on Underscores https://underscores.me/, (C) 2012-2017 Automattic, Inc.
Underscores is distributed under the terms of the GNU GPL v2 or later. Underscores is distributed under the terms of the GNU GPL v2 or later.

Loading…
Cancel
Save