Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Cecilapp/Cecil
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 8.20.3
Choose a base ref
...
head repository: Cecilapp/Cecil
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 6,651 additions and 5,007 deletions.
  1. +19 −0 .all-contributorsrc
  2. +21 −21 .github/workflows/changelog.yml
  3. +196 −0 .github/workflows/continuous-integration.yml
  4. +3 −1 .github/workflows/dependabot-auto-merge.yml
  5. +2 −2 .github/workflows/{docs.yml → documentation.yml}
  6. +228 −203 .github/workflows/release.yml
  7. +4 −2 .github/workflows/{tag.yml → tag-to-release.yml}
  8. +0 −190 .github/workflows/test.yml
  9. +272 −0 CHANGELOG.md
  10. +4 −2 README.md
  11. +11 −10 composer.json
  12. +4,444 −4,048 composer.lock
  13. +8 −1 config/default.php
  14. +18 −9 docs/2-Content.md
  15. +118 −71 docs/3-Templates.md
  16. +41 −24 docs/4-Configuration.md
  17. +143 −20 docs/5-Commands.md
  18. +8 −7 docs/6-Deploy.md
  19. +22 −12 docs/7-Extend.md
  20. +4 −4 resources/layouts/_default/page.html.twig
  21. +1 −1 resources/layouts/_default/page.iframe.twig
  22. +4 −4 resources/layouts/_default/redirect.html.twig
  23. +2 −2 resources/layouts/partials/alternates-languages.html.twig
  24. +2 −2 resources/layouts/partials/alternates.html.twig
  25. +59 −47 resources/layouts/partials/metatags.html.twig
  26. +4 −4 resources/server/livereload.js
  27. +9 −1 scripts/deploy-dist.sh
  28. +2 −0 src/Application.php
  29. +25 −12 src/Assets/Asset.php
  30. +31 −2 src/Assets/Cache.php
  31. +2 −20 src/Assets/Image.php
  32. +28 −7 src/Builder.php
  33. +54 −0 src/Command/About.php
  34. +42 −6 src/Command/AbstractCommand.php
  35. +82 −16 src/Command/Build.php
  36. +8 −7 src/Command/CacheClear.php
  37. +8 −7 src/Command/CacheClearAssets.php
  38. +8 −7 src/Command/CacheClearTemplates.php
  39. +8 −7 src/Command/CacheClearTranslations.php
  40. +8 −7 src/Command/Clear.php
  41. +39 −14 src/Command/NewPage.php
  42. +29 −11 src/Command/NewSite.php
  43. +21 −8 src/Command/OpenWith.php
  44. +23 −4 src/Command/SelfUpdate.php
  45. +48 −18 src/Command/Serve.php
  46. +21 −8 src/Command/ShowConfig.php
  47. +21 −8 src/Command/ShowContent.php
  48. +21 −8 src/Command/UtilTemplatesExtract.php
  49. +222 −0 src/Command/UtilTranslationsExtract.php
  50. +19 −22 src/Config.php
  51. +51 −19 src/Converter/Parsedown.php
  52. +1 −1 src/Generator/Alias.php
  53. +9 −7 src/Generator/Section.php
  54. +4 −3 src/Renderer/Extension/Core.php
  55. +10 −8 src/Renderer/Layout.php
  56. +1 −1 src/Renderer/PostProcessor/GeneratorMetaTag.php
  57. +16 −1 src/Renderer/Twig.php
  58. +3 −0 src/Step/Menus/Create.php
  59. +3 −3 src/Step/Pages/Convert.php
  60. +1 −1 src/Step/Pages/Create.php
  61. +4 −1 src/Step/Pages/Load.php
  62. +22 −13 src/Step/Pages/Render.php
  63. +55 −45 src/Step/StaticFiles/Copy.php
  64. +12 −0 src/Util/Str.php
  65. +2 −2 tests/IntegrationTests.php
  66. +4 −1 tests/fixtures/website/config.php
  67. +1 −1 tests/fixtures/website/extensions/Cecil/Renderer/PostProcessor/Test.php
  68. +1 −1 tests/fixtures/website/layouts/assets.html.twig
  69. +15 −0 tests/fixtures/website/layouts/components.html.twig
  70. +3 −0 tests/fixtures/website/layouts/components/button.twig
  71. +5 −5 tests/fixtures/website/layouts/intl.html.twig
  72. +1 −1 tests/fixtures/website/layouts/partials/audioplayer.html.twig
  73. +4 −4 tests/fixtures/website/layouts/section/episodes.rss.twig
  74. +1 −1 tests/fixtures/website/layouts/static.html.twig
  75. +1 −1 tests/fixtures/website/layouts/video.html.twig
  76. +4 −0 tests/fixtures/website/pages/Others/Components.md
19 changes: 19 additions & 0 deletions .all-contributorsrc
Original file line number Diff line number Diff line change
@@ -150,6 +150,25 @@
"contributions": [
"doc"
]
},
{
"login": "Progi1984",
"name": "Progi1984",
"avatar_url": "https://avatars.githubusercontent.com/u/1533248?v=4",
"profile": "https://lefevre.dev",
"contributions": [
"code",
"ideas"
]
},
{
"login": "fmatsos",
"name": "Franck Matsos",
"avatar_url": "https://avatars.githubusercontent.com/u/805227?v=4",
"profile": "https://franck.matsos.fr",
"contributions": [
"code"
]
}
]
}
42 changes: 21 additions & 21 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Changelog'
name: Changelog

on:
push:
@@ -14,27 +14,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Node
uses: actions/setup-node@v4
- name: Install Node
uses: actions/setup-node@v4

- name: Install auto-changelog
run: npm install -g auto-changelog
- name: Install auto-changelog
run: npm install -g auto-changelog

- name: Run auto-changelog
run: auto-changelog --ignore-commit-pattern "^[Uu]pdate.*"
- name: Run auto-changelog
run: auto-changelog --ignore-commit-pattern "^[Uu]pdate.*"

- name: Commit changelog
run: |
git config --global user.name 'Arnaud Ligny'
git config --global user.email 'arnaudligny@users.noreply.github.com'
if [ -z "$(git status --porcelain)" ]; then
echo "Nothing to do"
else
git commit -am "Update CHANGELOG"
git push origin master
fi
- name: Commit changelog
run: |
git config --global user.name 'Arnaud Ligny'
git config --global user.email 'arnaudligny@users.noreply.github.com'
if [ -z "$(git status --porcelain)" ]; then
echo "Nothing to do"
else
git commit -am "Update CHANGELOG"
git push origin master
fi
196 changes: 196 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,196 @@
name: Continuous Integration

on:
workflow_dispatch:
push:
branches:
- master
paths-ignore:
- 'docs/**'
- '.github/**'
- 'scripts/**'
pull_request:
paths-ignore:
- 'docs/**'
- '.github/**'
- 'scripts/**'

env:
COMPOSER_VERSION: 'v2'

jobs:
test:
name: PHP ${{ join(matrix.*, ' ') }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ join(matrix.type) == 'experimental' }}
env:
extensions: :psr, mbstring, intl, gettext, fileinfo, gd, sodium, exif
ext-cache-key: cache-ext-v1

strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2', '8.3', '8.4']
os: [ubuntu-latest, macos-latest, windows-latest]
type: ['']
exclude:
# excluded for code coverage
- php: '8.1'
os: 'ubuntu-latest'
type: ''
# excluded for code profiling
- php: '8.2'
os: 'ubuntu-latest'
type: ''
include:
# included for code coverage
- php: '8.1'
os: 'ubuntu-latest'
type: 'coverage'
# included for code profiling
- php: '8.2'
os: 'ubuntu-latest'
type: 'profiling'
# experimental
- php: '8.4'
os: 'ubuntu-latest'
type: 'experimental'

steps:
- name: Checkout source code
uses: actions/checkout@v4

- name: Install image files optimizers (Ubuntu)
if: ${{ matrix.os == 'ubuntu-latest' }}
run: |
sudo apt-get update -y
sudo apt-get install -y jpegoptim pngquant gifsicle optipng libjpeg-progs webp libavif-bin
sudo npm install -g svgo
- name: Install image files optimizers (macOS)
if: ${{ matrix.os == 'macos-latest' }}
run: |
brew update || brew update
brew install jpegoptim
brew install pngquant
brew install gifsicle
brew install optipng
brew install webp
brew install libavif
npm install -g svgo
- name: Setup cache of PHP extensions
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
key: ${{ env.ext-cache-key }}

- name: Cache PHP extensions
uses: actions/cache@v4
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: Install PHP
if: ${{ join(matrix.type) == '' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
coverage: none
tools: composer:${{ env.COMPOSER_VERSION }}

- name: Install PHP for code coverage
if: ${{ join(matrix.type) == 'coverage' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
coverage: xdebug
tools: composer:${{ env.COMPOSER_VERSION }}

- name: Install PHP for code profiling
if: ${{ join(matrix.type) == 'profiling' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}, blackfire, :xdebug
coverage: none
tools: blackfire, composer:${{ env.COMPOSER_VERSION }}
env:
BLACKFIRE_SERVER_ID: ${{ secrets.BLACKFIRE_SERVER_ID }}
BLACKFIRE_SERVER_TOKEN: ${{ secrets.BLACKFIRE_SERVER_TOKEN }}
BLACKFIRE_CLIENT_ID: ${{ secrets.BLACKFIRE_CLIENT_ID }}
BLACKFIRE_CLIENT_TOKEN: ${{ secrets.BLACKFIRE_CLIENT_TOKEN }}

- name: Install experimental PHP
if: ${{ join(matrix.type) == 'experimental' }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ env.extensions }}
ini-values: opcache.enable_cli=1, opcache.jit=tracing, opcache.jit_buffer_size=64M
coverage: none
tools: composer:${{ env.COMPOSER_VERSION }}

- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v4
with:
path: |
vendor
tests/fixtures/website/themes
key: composer-${{ runner.os }}-php-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
restore-keys: composer-${{ runner.os }}-php-${{ matrix.php }}-

- name: Validate `composer.json`
if: steps.composer-cache.outputs.cache-hit != 'true'
run: composer validate

- name: Install dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: |
composer install --prefer-dist --no-progress
- name: Run code analysis
run: |
composer run-script code:analyse:gh
- name: Run code style checker
run: |
composer run-script code:style
- name: Run test build
if: ${{ contains(matrix.type, '') || contains(matrix.type, 'experimental') }}
run: |
composer run-script test
- name: Run test build for code coverage
if: ${{ contains(matrix.type, 'coverage') }}
run: |
composer run-script test:coverage
- name: Run test build for code profiling
if: ${{ contains(matrix.type, 'profiling') }}
continue-on-error: true
env:
APP_ENV: prod
APP_DEBUG: 0
run: blackfire run php vendor/bin/phpunit -c ./ --testsuite=IntegrationTests

- name: Upload code coverage results to Coveralls
if: ${{ contains(matrix.type, 'coverage') }}
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer run-script test:coverage:install
composer run-script test:coverage:upload
- name: Build a skeleton site from `cecil.phar` binary
if: ${{ matrix.os == 'ubuntu-latest' && contains(matrix.type, '') || contains(matrix.type, 'experimental') }}
run: |
composer run-script test:phar
4 changes: 3 additions & 1 deletion .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -9,12 +9,14 @@ permissions:

jobs:
dependabot:
name: Auto-merge dependencies updates
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}

steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2.2.0
uses: dependabot/fetch-metadata@v2.3.0
with:
compat-lookup: true
github-token: "${{ secrets.GITHUB_TOKEN }}"
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: 'Documentation'
name: Documentation

on:
push:
@@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v4

- name: Markdown lint
uses: DavidAnson/markdownlint-cli2-action@v18
uses: DavidAnson/markdownlint-cli2-action@v19
with:
config: .markdownlint.yaml
globs: |
Loading