Skip to content

Commit 4faffd5

Browse files
authored
Correcting Social Links
Social services will utilize the Canonical URL while fetching sharable information like page title and image. This hard-coded value results in all share attempts resulting in 404s for the link fetching service. Laravel Blade supports front-end frameworks that utilize similar-to-Blade syntax `{{ }}` by adding an escape option `@{{ }}`. As such, string concatenation of the `@` and the `$littlelink_name` was necessary.
1 parent ef2ea18 commit 4faffd5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

resources/views/littlelink.blade.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function themeAsset($path){
4949
<!-- This shows a preview for title, description and avatar image of users profiles if shared on social media sites -->
5050

5151
<!-- Facebook Meta Tags -->
52-
<meta property="og:url" content="{{ url('') }}/@littlelink_name">
52+
<meta property="og:url" content="{{ url('') }}/{{ "@" . $littlelink_name }}">
5353
<meta property="og:type" content="website">
5454
<meta property="og:title" content="{{ $userinfo->name }}">
5555
<meta property="og:description" content="{{ $userinfo->littlelink_description }}">
@@ -61,8 +61,8 @@ function themeAsset($path){
6161

6262
<!-- Twitter Meta Tags -->
6363
<meta name="twitter:card" content="summary_large_image">
64-
<meta property="twitter:domain" content="{{ url('') }}/@littlelink_name">
65-
<meta property="twitter:url" content="{{ url('') }}/@littlelink_name">
64+
<meta property="twitter:domain" content="{{ url('') }}/{{ "@" . $littlelink_name }}">
65+
<meta property="twitter:url" content="{{ url('') }}/{{ "@" . $littlelink_name }}">
6666
<meta name="twitter:title" content="{{ $userinfo->littlelink_name }}">
6767
<meta name="twitter:description" content="{{ $userinfo->littlelink_description }}">
6868
@if(file_exists(base_path("img/$littlelink_name" . ".png" )))
@@ -324,4 +324,4 @@ function get_operating_system() {
324324
@if(theme('enable_custom_code') == "true" and theme('enable_custom_body_end') == "true" and env('ALLOW_CUSTOM_CODE_IN_THEMES') == 'true')@include($GLOBALS['themeName'] . '.extra.custom-body-end')@endif
325325

326326
</body>
327-
</html>
327+
</html>

0 commit comments

Comments
 (0)