Skip to content

Commit

Permalink
feat(social-links): allow subreddit (#1371)
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher authored Sep 20, 2024
1 parent e6fc968 commit 716798e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
18 changes: 9 additions & 9 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ social-network-links:
youtube: "@daattali"
whatsapp: 15551212
# medium: yourname
# reddit: yourname
# reddit: yourname or r/yoursubreddit
# linkedin: daattali
# xing: yourname
# stackoverflow: "3943160/daattali"
Expand All @@ -76,7 +76,7 @@ social-network-links:
# bluesky: yourname
# ORCID: your ORCID ID
# google-scholar: your google scholar
# discord: "invite_code" or "users/userid" or "invite/invite_code"
# discord: "invite_code" or "users/userid" or "invite/invite_code"
# kaggle: yourname
# hackerrank: yourname
# gitlab: yourname
Expand Down Expand Up @@ -214,23 +214,23 @@ footer-hover-col: "#0085A1"
# label: blog-comments # Label that will be assigned to GitHub Issues created by Utterances

# To use Staticman comments, uncomment the following section. You may leave the reCaptcha
# section commented if you aren't using reCaptcha for spam protection.
# Using Staticman requires advanced knowledge, please consult
# https://github.com/eduardoboucas/staticman/ and https://staticman.net/ for further
# instructions. For any support with staticman please direct questions to staticman and
# section commented if you aren't using reCaptcha for spam protection.
# Using Staticman requires advanced knowledge, please consult
# https://github.com/eduardoboucas/staticman/ and https://staticman.net/ for further
# instructions. For any support with staticman please direct questions to staticman and
# not to BeautifulJekyll.
#staticman:
# repository : # GitHub username/repository eg. "daattali/beautiful-jekyll"
# branch : master # If you're not using `master` branch, then you also need to update the `branch` parameter in `staticman.yml`
# endpoint : # URL of your deployment, with a trailing slash eg. "https://<your-api>/v3/entry/github/"
# reCaptcha: # (optional, set these parameters in `staticman.yml` as well)
# reCaptcha: # (optional, set these parameters in `staticman.yml` as well)
# siteKey : # You need to apply for a site key on Google
# secret : # Encrypt your password by going to https://<your-own-api>/v3/encrypt/<your-site-secret>

# To use giscus comments:
# (0) Uncomment the following giscus section, (1) Enable Discussions in your GitHub repository,
# (0) Uncomment the following giscus section, (1) Enable Discussions in your GitHub repository,
# (2) Install the giscus app in your repository (details at https://giscus.app),
# (3) Fill in *all* the parameters below
# (3) Fill in *all* the parameters below
# See more details about giscus and each of the following parameters at https://giscus.app
#giscus:
# hostname: giscus.app # Replace with your giscus instance's hostname if self-hosting
Expand Down
12 changes: 8 additions & 4 deletions _includes/social-networks-links.html
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,12 @@
{%- endif -%}

{%- if network[0] == "reddit" -%}
{% assign reddit_start = network[1] | split: "/" | first -%}
{% unless reddit_start == 'r' or reddit_start == 'u' -%}
{% assign reddit_url_prefix = 'u/' -%}
{% endunless -%}
<li class="list-inline-item">
<a href="https://reddit.com/u/{{ network[1] }}" title="Reddit">
<a href="https://reddit.com/{{ reddit_url_prefix }}{{ network[1] }}" title="Reddit">
<span class="fa-stack fa-lg" aria-hidden="true">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-reddit fa-stack-1x fa-inverse"></i>
Expand Down Expand Up @@ -314,7 +318,7 @@
</a>
</li>
{%- endif -%}

{%- if network[0] == "medium" -%}
<li class="list-inline-item">
<a href="https://medium.com/@{{ network[1] }}" title="Medium">
Expand All @@ -338,7 +342,7 @@
</a>
</li>
{%- endif -%}

{%- if network[0] == "discord" -%}
{% assign discord_start = network[1] | split: "/" | first -%}
{% unless discord_start == 'users' or discord_start == 'invite' -%}
Expand All @@ -354,7 +358,7 @@
</a>
</li>
{%- endif -%}

{%- if network[0] == "kaggle" -%}
<li class="list-inline-item">
<a href="https://www.kaggle.com/{{ network[1] }}" title="Kaggle">
Expand Down

0 comments on commit 716798e

Please sign in to comment.