Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Twitter to X #225

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ menu:
# Remove the item if you don't need it
github_username: github_username
facebook_username: facebook_username
twitter_username: twitter_username
x_username: x_username
instagram_username: instagram_username
linkedin_username: linkedin_username
medium_username: medium_username
Expand Down
2 changes: 1 addition & 1 deletion _authors/mranderson.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ position: The One
bio: Bulletproof hacker passionate about leather clothes.
github_username: github_username
facebook_username: facebook_username
twitter_username: twitter_username
x_username: x_username
instagram_username: instagram_username
linkedin_username: linkedin_username
medium_username: medium_username
Expand Down
2 changes: 1 addition & 1 deletion _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ formspree_form_id: formspree_form_id
# Remove the item if you don't need it
github_username: github_username
facebook_username: facebook_username
twitter_username: twitter_username
x_username: x_username
instagram_username: instagram_username
linkedin_username: linkedin_username
medium_username: medium_username
Expand Down
10 changes: 5 additions & 5 deletions _includes/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ <h3 class="name">
<svg><use xlink:href="#icon-facebook"></use></svg>
</a>
{% endif %}
{% if author.twitter_username %}
<a href="https://twitter.com/{{ author.twitter_username }}" title="Twitter">
<svg><use xlink:href="#icon-twitter"></use></svg>
{% if author.x_username %}
<a href="https://x.com/{{ author.x_username }}" title="X">
<svg><use xlink:href="#icon-x"></use></svg>
</a>
{% endif %}
{% if author.medium_username %}
Expand Down Expand Up @@ -54,8 +54,8 @@ <h3 class="name">
{% if author.facebook_username %}
{% assign author_urls = author_urls | append: '"https://www.facebook.com/' | append: author.facebook_username | append: '",' %}
{% endif %}
{% if author.twitter_username %}
{% assign author_urls = author_urls | append: '"https://twitter.com/' | append: author.twitter_username | append: '",' %}
{% if author.x_username %}
{% assign author_urls = author_urls | append: '"https://x.com/' | append: author.x_username | append: '",' %}
{% endif %}
{% if author.medium_username %}
{% assign author_urls = author_urls | append: '"https://medium.com/@' | append: author.medium_username | append: '",' %}
Expand Down
10 changes: 5 additions & 5 deletions _includes/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
<svg><use xlink:href="#icon-facebook"></use></svg>
</a>
{% endif %}
{% if site.twitter_username %}
<a href="https://twitter.com/{{ site.twitter_username }}" title="Twitter">
<svg><use xlink:href="#icon-twitter"></use></svg>
{% if site.x_username %}
<a href="https://x.com/{{ site.x_username }}" title="X">
<svg><use xlink:href="#icon-x"></use></svg>
</a>
{% endif %}
{% if site.medium_username %}
Expand Down Expand Up @@ -46,8 +46,8 @@
{% if site.facebook_username %}
{% assign social_urls = social_urls | append: '"https://www.facebook.com/' | append: site.facebook_username | append: '",' %}
{% endif %}
{% if site.twitter_username %}
{% assign social_urls = social_urls | append: '"https://twitter.com/' | append: site.twitter_username | append: '",' %}
{% if site.x_username %}
{% assign social_urls = social_urls | append: '"https://x.com/' | append: site.x_username | append: '",' %}
{% endif %}
{% if site.medium_username %}
{% assign social_urls = social_urls | append: '"https://medium.com/@' | append: site.medium_username | append: '",' %}
Expand Down
22 changes: 11 additions & 11 deletions _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,19 +39,19 @@
<meta name="keywords" content="{{ page.tags | join: ', ' }}">
{% endif %}

<!-- Social: Twitter -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="{{ title }}">
<meta name="twitter:description" content="{{ description }}">
<!-- Social: X -->
<meta name="x:card" content="summary_large_image">
<meta name="x:title" content="{{ title }}">
<meta name="x:description" content="{{ description }}">

{% if image contains '://' %}
<meta property="twitter:image" content="{{ image }}">
<meta property="x:image" content="{{ image }}">
{% else %}
<meta property="twitter:image" content="{{ image | prepend: site.url }}">
<meta property="x:image" content="{{ image | prepend: site.url }}">
{% endif %}
{% if site.twitter_username %}
<meta name="twitter:site" content="@{{ site.twitter_username }}">

{% if site.x_username %}
<meta name="x:site" content="@{{ site.x_username }}">
{% endif %}

<!-- Social: Facebook / Open Graph -->
Expand All @@ -63,7 +63,7 @@

<!-- Favicon -->
<link rel="shortcut icon" href="{{ site.baseurl }}/favicon.ico" type="image/x-icon" />

<!-- Apple Touch Icons -->
<link rel="apple-touch-icon" href="{{ site.baseurl }}/assets/img/icons/apple-touch-icon.png" />
<link rel="apple-touch-icon" sizes="57x57" href="/assets/img/icons/apple-touch-icon-57x57.png" />
Expand All @@ -82,7 +82,7 @@
<meta name="msapplication-square150x150logo" content="mediumtile.png" />
<meta name="msapplication-wide310x150logo" content="widetile.png" />
<meta name="msapplication-square310x310logo" content="largetile.png" />

<!-- Android Lolipop Theme Color -->
<meta name="theme-color" content="#141414">

Expand Down
6 changes: 3 additions & 3 deletions _includes/share.html
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<section class="share">
<h3>{{ site.translations.text.share | default: "Share" }}</h3>
<a aria-label="{{ site.translations.button.share_on_twitter | default: 'Share on Twitter' }}" href="https://twitter.com/intent/tweet?text=&quot;{{ page.description }}&quot;%20{{ site.url }}{{ page.url }}%20via%20&#64;{{ site.twitter_username }}&hashtags={{ page.tags | join: ',' }}"
onclick="window.open(this.href, 'twitter-share', 'width=550,height=235');return false;" title="{{ site.translations.button.share_on_twitter | default: 'Share on Twitter' }}">
<svg class="icon icon-twitter"><use xlink:href="#icon-twitter"></use></svg>
<a aria-label="{{ site.translations.button.share_on_x | default: 'Share on X' }}" href="https://x.com/intent/tweet?text=&quot;{{ page.description }}&quot;%20{{ site.url }}{{ page.url }}%20via%20&#64;{{ site.x_username }}&hashtags={{ page.tags | join: ',' }}"
onclick="window.open(this.href, 'x-share', 'width=550,height=235');return false;" title="{{ site.translations.button.share_on_x | default: 'Share on X' }}">
<svg class="icon icon-x"><use xlink:href="#icon-x"></use></svg>
</a>
<a aria-label="{{ site.translations.button.share_on_facebook | default: 'Share on Facebook' }}" href="https://www.facebook.com/sharer/sharer.php?u={{ site.url }}{{ page.url }}"
onclick="window.open(this.href, 'facebook-share','width=580,height=296');return false;" title="{{ site.translations.button.share_on_facebook | default: 'Share on Facebook' }}">
Expand Down
2 changes: 1 addition & 1 deletion _includes/svg-icons.html

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions _layouts/author.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ <h2>Posts</h2>
{% if page.facebook_username %}
{% assign author_urls = author_urls | append: '"https://www.facebook.com/' | append: page.facebook_username | append: '",' %}
{% endif %}
{% if page.twitter_username %}
{% assign author_urls = author_urls | append: '"https://twitter.com/' | append: page.twitter_username | append: '",' %}
{% if page.x_username %}
{% assign author_urls = author_urls | append: '"https://x.com/' | append: page.x_username | append: '",' %}
{% endif %}
{% if page.medium_username %}
{% assign author_urls = author_urls | append: '"https://medium.com/@' | append: page.medium_username | append: '",' %}
Expand Down
4 changes: 2 additions & 2 deletions _layouts/home.html
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ <h2 class="post-title">
{% if site.facebook_username %}
{% assign social_urls = social_urls | append: '"https://www.facebook.com/' | append: site.facebook_username | append: '",' %}
{% endif %}
{% if site.twitter_username %}
{% assign social_urls = social_urls | append: '"https://twitter.com/' | append: site.twitter_username | append: '",' %}
{% if site.x_username %}
{% assign social_urls = social_urls | append: '"https://x.com/' | append: site.x_username | append: '",' %}
{% endif %}
{% if site.medium_username %}
{% assign social_urls = social_urls | append: '"https://medium.com/@' | append: site.medium_username | append: '",' %}
Expand Down
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,8 @@ <h3>{{ post.title }}</h3>
{% if author.facebook_username %}
{% assign author_urls = author_urls | append: '"https://www.facebook.com/' | append: author.facebook_username | append: '",' %}
{% endif %}
{% if author.twitter_username %}
{% assign author_urls = author_urls | append: '"https://twitter.com/' | append: author.twitter_username | append: '",' %}
{% if author.x_username %}
{% assign author_urls = author_urls | append: '"https://x.com/' | append: author.x_username | append: '",' %}
{% endif %}
{% if author.medium_username %}
{% assign author_urls = author_urls | append: '"https://medium.com/@' | append: author.medium_username | append: '",' %}
Expand Down
4 changes: 2 additions & 2 deletions _sass/_share.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
transition: all 0.3s;
}

.icon-twitter:hover {
.icon-x:hover {
fill: #1da1f3;
}

.icon-facebook:hover {
fill: #3b5998;
}
Expand Down
12 changes: 6 additions & 6 deletions admin/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ collections:
name: "facebook_username"
widget: "string"
required: false
- label: "Twitter Username"
name: "twitter_username"
- label: "X Username"
name: "x_username"
widget: "string"
required: false
- label: "Instagram Username"
Expand Down Expand Up @@ -255,8 +255,8 @@ collections:
name: "facebook_username"
widget: "string"
required: false
- label: "Twitter Username"
name: "twitter_username"
- label: "X Username"
name: "x_username"
widget: "string"
required: false
- label: "Instagram Username"
Expand Down Expand Up @@ -351,8 +351,8 @@ collections:
name: "read_now"
widget: "string"
required: false
- label: "Share on Twitter"
name: "share_on_twitter"
- label: "Share on X"
name: "share_on_x"
widget: "string"
required: false
- label: "Share on Facebook"
Expand Down
2 changes: 1 addition & 1 deletion assets/js/widgets/color/react-color.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/settings.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,15 @@ Set the Facebook username for the website.
facebook_username: facebook_username
```

#### `twitter_username`
#### `x_username`

Type: *string*

Set the Twitter username for the website.
Set the X username for the website.

```yaml
# social.yml
twitter_username: twitter_username
x_username: x_username
```

#### `instagram_username`
Expand Down
2 changes: 1 addition & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ translations:
comments: "Comments"
button:
read_now: "Read Now"
share_on_twitter: "Share on Twitter"
share_on_x: "Share on X"
share_on_facebook: "Share on Facebook"
pagination:
page: "Page"
Expand Down
2 changes: 1 addition & 1 deletion src/js/preview/widgets/color/react-color.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/yml/social.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
github_username: github_username
facebook_username: facebook_username
twitter_username: twitter_username
x_username: x_username
instagram_username: instagram_username
linkedin_username: linkedin_username
medium_username: medium_username