Comments (6)
If you need to compile assets via asset mapper, today you cannot escape versionning. If you need to deploy assets to the public folder, the Asset package can do it for you.
https://symfony.com/doc/current/components/asset.html
But if your problem is related to the markdown example you gave, there is a better solution i think : render the twig file once and then call the markdown filter
So let's say you have a article.md.twig
# Title of your article
Lorem ipsum damet
[{{ article.alt }}]({{ absolute_url(asset('images/my-file.png')) }})
In another template, you can do this:
{% set content = include('article.md.html') %}
{% apply markdown_to_html %}
{{ content }}
{% endapply %}
from symfony-docs.
No it's not possible for now sorry
from symfony-docs.
What about using a command option?
php bin/console asset-map:compile --unversioned
from symfony-docs.
If you need to deploy unversionned asset you still can use the Asset component !
from symfony-docs.
Sorry, I wasn't able to find any documentation on how to "compile" the assets so that the hash won't be appended to the filenames. Can you please provide an example command for this?
🙏 Thank you!
from symfony-docs.
Thanks for the help, it is very much appreciated! I just created a folder called public/blog
for my static blog images. It seems as if the simplest solution is to put the blog images in the public directory as opposed to the assets directory for them to then be referenced in the Markdown documents. See templates/post.html.twig
from symfony-docs.
Related Issues (20)
- [PropertyInfo] remove deprecations, mark TypeInfo as experimental HOT 1
- [TypeInfo] Ease getting base type on nullable types
- [FrameworkBundle] revert implementing LoggerAwareInterface in HTTP clie… HOT 1
- [DependencyInjection] Deprecate `#[TaggedIterator]` and `#[TaggedLocato…
- [Routing] Add `{foo:bar}` syntax to define a mapping between a route pa…
- [DependencyInjection] Add `#[AutowireInline]` attribute to allow servic…
- [DoctrineBridge] Deprecate auto-mapping of entities in favor of mapped …
- [DependencyInjection] Reset env vars when resetting the container HOT 1
- [Serializer] Add `XmlEncoder::CDATA_WRAPPING_PATTERN` context option HOT 2
- [TwigBundle] Deprecate `base_template_class` option
- [HttpClient] fix documentation of retry_failed
- [HttpClient] deprecate setLogger() methods of decorating clients HOT 1
- [Messenger] Don't mark `EnvelopeAwareExceptionInterface` internal
- Rework the file upload docs
- [DoctrineBundle] Use a full version number in examples with `serverVersion` HOT 1
- [AssetMapper] Section about minifying points to deprecated CloudFlare feature HOT 7
- Split the config/routes.yaml file into multiple files
- [broken link] Slack link no longer active HOT 4
- Expand AutowireMethodOf description
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from symfony-docs.