coryrylan / ngx-lite

:package: A collection of lightweight Angular libraries in a single mono repo
https://ngxlite.com
MIT License
138 stars 21 forks source link

Added minify property on NgxJsonLdComponent #33

Closed MintPlayer closed 2 years ago

MintPlayer commented 4 years ago

Now the generated JSON is always like this:

<script type="application/ld+json">{
  "@context": "http://schema.org",
  "@type": "MusicRecording",
  "url": "https://mintplayer.com/song/16",
  "name": "Spaceman",
  "image": "http://i.ytimg.com/vi/XCbAEkfXSDE/hqdefault.jpg",
  "datePublished": "1996-01-14T23:00:00.000Z",
  "byArtist": [
    {
      "@context": "http://schema.org",
      "@type": "MusicGroup",
      "name": "BABYLON ZOO",
      "url": "https://mintplayer.com/artist/15"
    }
  ]
}</script>

This pull request would allow you to choose if you want to keep the minified Json, by setting a [minify]="true" binding.

pubkey commented 3 years ago

What is the status of this? I also need this feature and the code changes of the PR look good for me.