Rumperuu
4af8849eec
* release: release 2.7.2 * fix: urgent 2.7.3 release to fix fatal error * chore: remove un-needed setup script * ci: remove steps from pre-push command * chore: remove un-needed PHP-Commitizen config * chore: put image files in correct folders * chore: move GitHub image into `.github/` dir * fix: classic editor button * fix: call correct jQuery Tools file in dev env * docs: replace license with Markdown version * ci: clean up PHP linting commands If anyone has noticed me playing musical filepaths with these commands for a while, it's because I kept getting inconsistent results from the use of double-globs (i.e., `**`). However, I've finally figured out that this is because Composer is running these scripts in its own shell, so the double-glob that works when I run the command manually in my Terminal doesn't work when Composer runs it in its. * chore: lint PHP files * build: update JS linting standards * chore: lint JS file * build: add node-sass * build: add additional stylelint rules * chore: lint stylesheets with new rulesets * refactor: move ESLint settings to `package.json` * chore: move Prettier config to `package.json` It is not yet possible to move `.prettierignore` to `package.json` too, but this appears to be on the horizon; see [this Issue][prettier-issue]. [prettier-issue]: https://github.com/prettier/prettier/issues/3460 * fix: move WPML config into Plugin folder * chore: move Stylelint config into `package.json` * chore: remove unused `.distignore` It can always be re-added at a later date if it becomes useful. * chore: format file * build: add HTML linting * fix: add image alt tag * ci: clean up GitHub Actions workflows * fix: fix workflow * fix: fix indentation * ci: add YAML validation * chore: make valid * ci: add YAML validation * chore: lint code * ci: change dep install back to original * chore: lint license |
||
---|---|---|
.github | ||
_tools | ||
assets | ||
docs | ||
src | ||
.gitignore | ||
.htmlhintrc | ||
.prettierignore | ||
CHANGELOG.md | ||
CODE_OF_CONDUCT.md | ||
composer.json | ||
composer.lock | ||
CONTRIBUTING.md | ||
LICENSE.md | ||
package-lock.json | ||
package.json | ||
phpdoc.dist.xml | ||
README.md | ||
SECURITY.md |
footnotes
footnotes aims to be the all-in-one solution for displaying an automatically-generated list of references on your Page or Post. The Plugin ships with a set of defaults while also empowering you to control how your footnotes will be displayed.
footnotes gives you the ability to display well-formatted footnotes on your WordPress Pages and Posts — those footnotes we know from offline publishing.
Featured on wpmudev — cheers for the review, folks!
Table of Contents
- Features
- Getting Started
- Deploying
- Testing
- Code Formatting
- Documentation
- Acknowledgments
- License
- Contact Information
Features
This Plugin provides:
- fully customizable footnote start and end shortcodes;
- stylable tooltips supporting hyperlinks and dedicated text;
- a responsive 'reference container', with customisable positioning;
- a wide choice of different numbering styles;
- a freely-configurable and optional backlink symbol;
- footnote appearance customisation via dashboard settings and custom CSS style rules; and
- editor buttons for easily adding shortcode tags.
Getting Started
- Read the contributing guidelines;
- clone this repository (
git clone git@github.com:markcheret/footnotes.git
):- we recommend that you use VVV for your local testing environment.
- install Composer and NPM; and
- install all dependencies (
composer install
):- you will have to install
php-mbstring
manually if you do not already have it.
- you will have to install
Deploying
Automated release deployments will be introduced soon.
Building
- Run
_tools/build-stylesheets.sh -c
to concatenate stylesheets; - manually minify the output files in
css/tmp/
, saving them as.min.css
files:- the intention is to replace this with automated minification, meaning that
all of these steps can be rolled into a single
build
command.
- the intention is to replace this with automated minification, meaning that
all of these steps can be rolled into a single
- run
_tools/build-stylesheets.sh -d
to deploy the minified files todist/
:- this will delete any existing
dist/
folder!
- this will delete any existing
- run
composer run build
to move over the remaining files todist/
:- currently, the files to include in a distribution are hard-coded in
_tools/build.sh
; but - the intention is to replace this with a proper parsing of the
.distignore
file
- currently, the files to include in a distribution are hard-coded in
Releasing
- Ensure that you have configured your Git config. with SVN credentials;
- run the above build commands; and
- run
composer run release
and follow the prompts.
Testing
Automated testing will be introduced soon.
Code Formatting
This repo. uses pre-commit code formatting and linting on all staged files. This ensures that only style-conformant code can be committed.
The individual commands can also be called manually:
-
Run
composer run format
to run all format commands. -
Run
composer run format:fix
to attempt to automatically fix all formatter warnings and errors. -
Run
composer run lint
to run all linting commands. -
Run
composer run lint:fix
to attempt to automatically fix all linter warnings and errors.
PHP Code
PHP code must follow the WordPress PHP Coding Standards.
- Run
composer run lint:php
to lint all JS/TS files with PHP CodeSniffer - Run
composer run lint:php:fix
to attempt to automatically fix warnings and errors with the PHP Code Beautifier and Formatter.
JavaScript Code
JavaScript code must follow the WordPress JavaScript Coding Standards.
-
Run
composer run format:js
to format all JS files with Prettier. -
Run
composer run format:js:fix
to attempt to automatically fix warnings and errors. -
Run
composer run lint:js
to lint all JS files with ESLint. -
Run
composer run lint:js:fix
to attempt to automatically fix warnings and errors.
Prettier configuration settings are found in .prettierrc
.
ESLint configuration settings are found in .eslintrc.js
. File ignore rules are
found in .eslintignore
.
CSS Stylesheets
JavaScript code must follow the WordPress CSS Coding Standards.
- Run
composer run lint:css
to format all CSS files with stylelint. - Run
npcomposerm run lint:css:fix
to attempt to automatically fix warnings and errors.
stylelint configuration settings are found in .stylelint.json
.
Documentation
Run composer run docs
to automatically generate HTML documentation with
phpDocumentor.
View the current docs here.
Acknowledgements
Huge thanks to every footnotes user, contributor, bug reporter, feature requester and fan!
License
This project is licensed under the GNU GPL v3.
Contact Information
Name | Link(s) |
---|---|
Mark Cheret |