Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add HTML support (with options!)#41

Open
Kocal wants to merge 1 commit into
sensiolabs:mainfrom
bakslashHQ:feat/html-support
Open

Add HTML support (with options!)#41
Kocal wants to merge 1 commit into
sensiolabs:mainfrom
bakslashHQ:feat/html-support

Conversation

@Kocal
Copy link
Copy Markdown

@Kocal Kocal commented May 20, 2026

We use this bundle on baksla.sh to programmatically minify HTML files (SSG), but today we ran into an issue where the site preview on LinkedIn wasn't working: our og:image tag was being ignored.

It turns out that LinkedIn's parser (https://www.linkedin.com/post-inspector/) doesn't work correctly when the <head> and </head> tags are missing... 😫

This PR adds support for HTML and options (just one option for now, KISS), but only in the low-level MinifyInterface::minify() method.
I deliberately did not touch the bundle (i.e., adding configuration to SensiolabsMinifyBundle and modifying the MinifierCompiler, etc..), because I don't think it makes sense with the AssetMapper's integration (JS/CSS only).

Comment thread .gitignore
/.php-cs-fixer.cache
/composer.lock
/phpunit.xml
/tests/Fixtures/config/
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(config/reference.php file was being generated with latest Symfony deps)

Comment thread CHANGELOG.md
Comment on lines +8 to +10
## 1.2.0

- Add Symfony 8 support
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one was missing from the previous release

Kocal added a commit to bakslashHQ/baksla.sh that referenced this pull request May 20, 2026
…improvements

Related to our LinkedIn post preview issue... The `og:image` can't be displayed because of missing `<head>` tags.

Opened sensiolabs/minify-bundle#41.
Kocal added a commit to bakslashHQ/baksla.sh that referenced this pull request May 20, 2026
…improvements

Related to our LinkedIn post preview issue... The `og:image` can't be displayed because of missing `<head>` tags.

Opened sensiolabs/minify-bundle#41.
mtarld pushed a commit to bakslashHQ/baksla.sh that referenced this pull request May 21, 2026
…improvements (#149)

Related to our LinkedIn post preview issue... The `og:image` can't be displayed because of missing `<head>` tags.

Opened sensiolabs/minify-bundle#41.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant