Poprawa formatowania opisu artykułu oraz usunięcie zbędnych spacji w danych JSON

This commit is contained in:
2025-07-29 00:09:54 +02:00
parent 009810da5d
commit fafd6f5352

View File

@@ -43,7 +43,7 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
<div class="author"> <div class="author">
<img class="image" src="<?= $author['image'];?>" alt="<?= htmlspecialchars( $author['author'] );?>"> <img class="image" src="<?= $author['image'];?>" alt="<?= htmlspecialchars( $author['author'] );?>">
<p class="name"><?= $author['author'];?></p> <p class="name"><?= $author['author'];?></p>
<? if($author['author_position']) : ?> <? if($author['author_position']) : ?>
<div class="autor-position"> <div class="autor-position">
<p><?= $author['author_position'];?></p> <p><?= $author['author_position'];?></p>
@@ -346,11 +346,11 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
"@context": "https://schema.org", "@context": "https://schema.org",
"@type": "BlogPosting", "@type": "BlogPosting",
"headline": "<?php echo $this -> article['language']['title']; ?>", "headline": "<?php echo $this -> article['language']['title']; ?>",
"description": "<?php echo $this -> article['language']['entry']; ?>", "description": "<?php echo trim( preg_replace('/\s+/', ' ', strip_tags( $this -> article['language']['entry'] )) );?>",
"author": { "author": {
"@type": "Person", "@type": "Person",
"name": "<?php echo $author['author'];?>", "name": "<?php echo $author['author'];?>",
"jobTitle": "<?php echo $author['author_position'];?>", "jobTitle": "<?php echo $author['author_position'];?>"
}, },
"publisher": { "publisher": {
"@type": "Organization", "@type": "Organization",
@@ -370,6 +370,6 @@ $text = \front\factory\Articles::generateHeadersIds( $text );
"Marketing opinii", "Marketing opinii",
"Opinie w sklepie internetowym" "Opinie w sklepie internetowym"
], ],
"image": "https://zaufane.pl/<?php echo $this -> article['language']['main_image']; ?>", "image": "https://zaufane.pl/<?php echo $this -> article['language']['main_image']; ?>"
} }
</script> </script>