linkhub-jekyll-theme 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 67f892b470219d665a6b54744f081a80c8b7a1e25273531f32e2db2c46404719
4
+ data.tar.gz: 5e8731c201b61adbc6e04c51c8092bfadec373aa6b52c2697be720e97179e30b
5
+ SHA512:
6
+ metadata.gz: 69329c5b9e48f57719b1a4277fe8f050a19392389248d2c421d06c156b438c2b2691ad4e2e69c3b1f356009f9ac4aa49c9e753a14dbd60b922b0b53b034134fe
7
+ data.tar.gz: 140dd5dff7fa74e70f985a51095152c5b23ac73e55e072fa3369948372bc09f73f6cf7dec11ae46b76910a192046daf7c54926ce89dc8e108543feb0889ba1df
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2023 Digital Malayali
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,75 @@
1
+ <div align="center">
2
+
3
+ # Linkhub
4
+
5
+ A minimal and super-lightweight, free Jekyll theme to create a single-page, link-in-bio website like Linktree or Later.
6
+
7
+ [**Live Demo ◉**](https://digitalmalayali.github.io/linkhub-jekyll-theme/)
8
+
9
+ </div>
10
+
11
+ ## Features
12
+ - 😊 Based on the original [Linkhub](https://github.com/digitalmalayali/Linkhub) template!
13
+ - 📸 Add links to Instagram, TikTok, YouTube or any posts similar to Later's link-in-bio!
14
+ - ⚡ Uses a modified version of the lightweight CSS framework [chota](https://github.com/jenil/chota); the entire size of the site is around 160kb!
15
+ - 🌙 Switch between dark and light modes; automatically choose the mode based on your system preference!
16
+ - 😍 Icons powered by [iconify](https://github.com/iconify/iconify); find tons of free icons for almost any purpose!
17
+ - 🔠 Categorize links; store your links under various categories!
18
+
19
+ ## Installation
20
+
21
+ Add this line to your Jekyll site's `Gemfile`:
22
+
23
+ ```ruby
24
+ gem "linkhub-jekyll-theme"
25
+ ```
26
+
27
+ And add this line to your Jekyll site's `_config.yml`:
28
+
29
+ ```yaml
30
+ theme: linkhub-jekyll-theme
31
+ ```
32
+
33
+ And then execute:
34
+
35
+ $ bundle
36
+
37
+ Or install it yourself as:
38
+
39
+ $ gem install linkhub-jekyll-theme
40
+
41
+ ## Usage
42
+ Linkhub is super-easy to use!
43
+
44
+ ### Adding site info
45
+ Edit the `_config.yml` file to specify your website's name, page title, description, and whether to show/hide the verified badge. This information will also be used for meta tags.
46
+
47
+ ### Adding icons
48
+ Icons are powered by the free and open-source icon framework [Iconify](https://github.com/iconify), offering a selection of over 150,000 icons. Visit the [Iconify icon sets website](https://icon-sets.iconify.design/) to search for your preferred icon. Once you find your desired icon, copy its name and use it in the respective fields.
49
+
50
+ ### Adding social media links
51
+ Edit the `social.yml` file in the `_data` folder to add your social media profiles, along with your preferred icons and colors.
52
+
53
+ ### Adding Instagram/TikTok/YouTube etc link-in-bio
54
+ Like Later's link-in-bio feature, you can include external links to your Instagram, TikTok, and other posts by adding name of social media, the link and image URL/path to `bio.yml` in the `_data` folder. You can either upload thumbnails of your Instagram, TikTok and YouTube posts to an image hosting service or create an `images` folder in `assets` and place them there. The image size doesn't matter, and it will be displayed similarly to a 3-column Instagram grid.
55
+
56
+ ### Adding links
57
+ Edit the `links.yml` file in the `_data` folder to add link categories, links, icons, and tags. Refer to the provided examples and the [demo](https://digitalmalayali.github.io/linkhub-jekyll-theme/) for a better understanding.
58
+
59
+ ## Contributing
60
+
61
+ Bug reports and pull requests are welcome on [GitHub](https://github.com/digitalmalayali/linkhub-jekyll-theme).
62
+
63
+ ## Development
64
+
65
+ To set up your environment to develop this theme, run `bundle install`.
66
+
67
+ Your theme is setup just like a normal Jekyll site! To test your theme, run `bundle exec jekyll serve` and open your browser at `http://localhost:4000`. This starts a Jekyll server using your theme. Add pages, documents, data, etc. like normal to test your theme's contents. As you make modifications to your theme and to your content, your site will regenerate and you should see the changes in the browser after a refresh, just like normal.
68
+
69
+ When your theme is released, only the files in `_layouts`, `_includes`, `_data` and `assets` tracked with Git will be bundled.
70
+
71
+ To add a custom directory to your theme-gem, please edit the regexp in `linkhub-jekyll-theme.gemspec` accordingly.
72
+
73
+ ## License
74
+
75
+ The theme is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/_config.yml ADDED
@@ -0,0 +1,35 @@
1
+ # Site Configuration
2
+ name: 'Linkhub' # Name of your website
3
+ tagline: 'Links' # Set your preferred page title
4
+ description: 'A free, open-source Jekyll link-in-bio theme.' # Also used as a meta description
5
+ favicon: 'https://picsum.photos/100' # Path / URL to the favicon of your website (e.g., 'assets/images/favicon.png')
6
+ logo: 'https://picsum.photos/200' # Path / URL to the logo (e.g., 'assets/images/logo.png')
7
+ url: https://link.example.com # URL of your website
8
+ twitter:
9
+ username: username # Used for SEO
10
+ card: summary
11
+ image:
12
+ path: https://picsum.photos/200 #Used for SEO
13
+ height: 100
14
+ width: 100
15
+ alt: logo
16
+
17
+ # Verified Badge Configuration
18
+ badge: true # Set to 'true' or 'false' to enable / disable the badge
19
+ icon: ri:verified-badge-fill # Enter the icon name for the badge from Iconify Design (https://icon-sets.iconify.design/)
20
+ color: '#dfb221' # Define the color of the badge
21
+
22
+ # Plugins
23
+ plugins:
24
+ - jekyll-seo-tag
25
+
26
+ # Defaults
27
+ defaults:
28
+ -
29
+ scope:
30
+ path: ""
31
+ values:
32
+ layout: "default"
33
+
34
+ # Exclude
35
+ exclude: [README.md, Gemfile.lock, .jekyll-cache/, Gemfile]
data/_data/bio.yml ADDED
@@ -0,0 +1,18 @@
1
+ - name: Instagram
2
+ items:
3
+ - url: https://www.example.com
4
+ image: https://picsum.photos/700/400 # You can use paths to images in the assets folder, e.g., assets/images/insta.jpg.
5
+
6
+ - url: https://www.example.org
7
+ image: https://picsum.photos/500
8
+
9
+ - url: https://www.example.com
10
+ image: https://picsum.photos/250/300
11
+
12
+ - name: YouTube
13
+ items:
14
+ - url: https://www.example.com
15
+ image: https://picsum.photos/300/400
16
+
17
+ - url: https://www.example.org
18
+ image: https://picsum.photos/400/500
data/_data/links.yml ADDED
@@ -0,0 +1,23 @@
1
+ - category: Blogs
2
+ items:
3
+ - title: Example
4
+ url: https://www.example.com
5
+ icon: ri:film-fill
6
+ tag: New
7
+
8
+ - title: Example 2
9
+ url: https://www.example.org
10
+ icon: simple-icons:googlenews
11
+
12
+ - category: Products
13
+ items:
14
+ - title: Example 3
15
+ url: https://www.example.com
16
+ icon: ri:ball-pen-fill
17
+
18
+ - category: Works
19
+ items:
20
+ - title: Example 4
21
+ url: https://www.example.org
22
+ icon: clarity:language-solid
23
+ tag: Sale
data/_data/social.yml ADDED
@@ -0,0 +1,29 @@
1
+ - name: facebook
2
+ url: https://www.facebook.com/example
3
+ icon: ri:facebook-fill
4
+ color: '#1877F2'
5
+
6
+ - name: instagram
7
+ url: https://www.instagram.com/example
8
+ icon: ri:instagram-fill
9
+ color: '#E4405F'
10
+
11
+ - name: x
12
+ url: https://x.com/example
13
+ icon: ri:twitter-x-fill
14
+ color: '#1D9BF0'
15
+
16
+ - name: mastodon
17
+ url: https://mastodon.social/@example
18
+ icon: ri:mastodon-fill
19
+ color: '#6364FF'
20
+
21
+ - name: whatsapp
22
+ url: https://wa.me/1XXXXXXXXXX
23
+ icon: ri:whatsapp-fill
24
+ color: '#25D366'
25
+
26
+ - name: youtube
27
+ url: https://www.youtube.com/@example
28
+ icon: ri:youtube-fill
29
+ color: '#FF0000'
@@ -0,0 +1,16 @@
1
+ <section>
2
+ {% for name in site.data.bio %}
3
+ <details>
4
+ <summary class="text-center text-error">{{ name.name }} Link-in-Bio</summary>
5
+ <div class="bio-gallery">
6
+ {% for item in name.items %}
7
+ <div class="bio-item">
8
+ <a href="{{ item.url }}" target="_blank" aria-label="{{ name.name }} link-in-bio">
9
+ <img class="bio-img text-center" src="{{ item.image }}" width="100%" height="100%"
10
+ alt="{{ name.name }} post"></a>
11
+ </div>
12
+ {% endfor %}
13
+ </div>
14
+ </details>
15
+ {% endfor %}
16
+ </section>
@@ -0,0 +1,6 @@
1
+ <footer class="text-center">
2
+ <small class="text-grey">Powered by <a href="https://github.com/digitalmalayali/linkhub-jekyll-theme"
3
+ target="_blank">Linkhub</a>. Code is licensed under <a
4
+ href="https://github.com/digitalmalayali/linkhub-jekyll-theme/blob/main/LICENSE.txt" target="_blank">MIT</a>.</small>
5
+ <h6>© {{ "now" | date: "%Y" }} {{ site.name }}</h6>
6
+ </footer>
@@ -0,0 +1,19 @@
1
+ <main>
2
+ {% for category in site.data.links %}
3
+ <h5 class="text-center">{{ category.category }}</h5>
4
+ {% for item in category.items %}
5
+ <div class="row">
6
+ {% if item.tag %}
7
+ <div class="col link is-center">
8
+ {% else %}
9
+ <div class="col is-center">
10
+ {% endif %}
11
+ <a class="button outline secondary" href="{{ item.url }}" target="_blank"><span class="iconify-inline"
12
+ data-icon="{{ item.icon }}"></span>{{ item.title }}
13
+ {% if item.tag %}<span class="tag is-small bd-success text-success">{{ item.tag }}</span>{%
14
+ endif %}</a>
15
+ </div>
16
+ </div>
17
+ {% endfor %}
18
+ {% endfor %}
19
+ </main>
@@ -0,0 +1,9 @@
1
+ <nav class="nav">
2
+ <div class="nav-center">
3
+ {% for social in site.data.social %}
4
+ <a class="brand" href="{{ social.url }}" target="_blank" aria-label="{{ social.name }}">
5
+ <span class="iconify-inline" data-icon="{{ social.icon }}" style="color: {{ social.color }}"></span>
6
+ </a>
7
+ {% endfor %}
8
+ </div>
9
+ </nav>
@@ -0,0 +1,42 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+
4
+ <head>
5
+ <meta charset="UTF-8">
6
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
7
+ <title>{{ site.tagline }} - {{ site.name }}</title>
8
+ <link rel="shortcut icon" href="{{ site.favicon }}" type="image/x-icon">
9
+ <link rel="stylesheet" href="assets/style.css">
10
+ <script src="https://code.iconify.design/2/2.0.0/iconify.min.js"></script>
11
+ {% seo %}
12
+ </head>
13
+
14
+ <body>
15
+ <div class="container is-full-screen">
16
+ <header>
17
+ <div class="top is-center is-vertical-align">
18
+ <img class="is-rounded" width="75px" height="75px" src="{{ site.logo }}" alt="logo">
19
+ <h3>{{ site.name }}{% if site.badge == true %}<span class="iconify-inline badge"
20
+ data-icon="{{ site.icon }}" style="color: {{ site.color }}"></span>{% endif %}</h3>
21
+ <p>{{ site.description }}</p>
22
+ </div>
23
+ </header>
24
+
25
+ <!-- Dark / Light Mode Switch -->
26
+ <a class="bd-primary is-rounded is-center" href="#" id="theme-switch"
27
+ onclick="switchMode(this); return false;" aria-label="Switch Theme" role="button">☀️</a>
28
+ <!-- Social Media Links -->
29
+ {% include social.html %}
30
+
31
+ <!-- Insta/TikTok/YouTube Link-in-bio -->
32
+ {% include bio.html %}
33
+
34
+ <!-- Link Buttons -->
35
+ {% include links.html %}
36
+
37
+ {% include footer.html %}
38
+ </div>
39
+ <script src="assets/script.js"></script>
40
+ </body>
41
+
42
+ </html>
data/assets/script.js ADDED
@@ -0,0 +1 @@
1
+ function switchMode(e){const d=document.body.classList;d.contains("dark")?(e.innerHTML="☀️",d.remove("dark")):(e.innerHTML="🌙",d.add("dark"))}window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches&&(document.body.classList.add("dark"),document.querySelector("#theme-switch").innerHTML="🌙");
data/assets/style.css ADDED
@@ -0,0 +1,5 @@
1
+ :root{--bg-color:#fff;--bg-secondary-color:#f3f3f6;--color-primary:#168D54;--color-lightGrey:#d2d6dd;--color-grey:#3f4144;--color-error:#D74747;--color-success:#28bd14;--grid-maxWidth:120rem;--grid-gutter:2rem;--font-size:1.6rem;--font-color:#333;--font-family-sans:-apple-system,"BlinkMacSystemFont","Avenir","Avenir Next","Segoe UI","Roboto","Oxygen","Ubuntu","Cantarell","Fira Sans","Droid Sans","Helvetica Neue",sans-serif;--font-family-mono:monaco,"Consolas","Lucida Console",monospace}html{-webkit-box-sizing:border-box;box-sizing:border-box;font-size:62.5%;line-height:1.15;-webkit-text-size-adjust:100%;-moz-text-size-adjust:100%;-ms-text-size-adjust:100%;text-size-adjust:100%}*,:after,:before{-webkit-box-sizing:inherit;box-sizing:inherit}body{background-color:var(--bg-color);line-height:1.6;font-size:var(--font-size);color:var(--font-color);font-family:"Segoe UI","Helvetica Neue",sans-serif;font-family:var(--font-family-sans);margin:0;padding:0}
2
+ body.dark{--bg-color:#0c0c0c;--bg-secondary-color:#131316;--font-color:#f5f5f5;--color-grey:#ccc}h3,h5,h6{font-weight:500;margin:.35em 0 .6em}h3{font-size:1.5em}h5{font-size:1em}h6{font-size:.85em}a{color:var(--color-primary);text-decoration:none}a:hover:not(.button){opacity:.75}p{margin-top:0}img{max-width:100%}.container{max-width:720px;margin:3em auto 0;width:96%;padding:0 calc(var(--grid-gutter)/2)}.row{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-flow:row wrap;flex-flow:row wrap;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;margin-left:calc(var(--grid-gutter)/-2);margin-right:calc(var(--grid-gutter)/-2)}.col{-webkit-box-flex:1;-ms-flex:1;flex:1;margin:0 calc(var(--grid-gutter)/2) calc(var(--grid-gutter)/2)}.button{padding:1rem 2.5rem;color:var(--color-grey);background:var(--color-lightGrey);border-radius:4px;border:1px solid transparent;font-size:var(--font-size);line-height:1;text-align:center;-webkit-transition:opacity .2s ease;transition:opacity .2s ease;text-decoration:none;-webkit-transform:scale(1);transform:scale(1);display:inline-block;cursor:pointer}
3
+ .button.secondary{color:#fff;z-index:1;background-color:#000}.button:hover{opacity:.8}.button.secondary{background-color:var(--color-grey)}.button.outline{background-color:transparent;border-color:var(--color-lightGrey)}.button.outline.secondary{border-color:var(--color-grey);color:var(--color-grey)}.button:active:not(:disabled),[type=button]:active:not(:disabled),[type=reset]:active:not(:disabled),[type=submit]:active:not(:disabled),button:active:not(:disabled){-webkit-transform:scale(.98);transform:scale(.98)}::-webkit-input-placeholder{color:#bdbfc4}::-moz-placeholder{color:#bdbfc4}:-ms-input-placeholder{color:#bdbfc4}::-ms-input-placeholder{color:#bdbfc4}.nav{min-height:5rem;-webkit-box-align:stretch;-ms-flex-align:stretch;align-items:stretch}.nav,.nav .brand,.nav a,.nav-center{display:-webkit-box;display:-ms-flexbox;display:flex}.nav-center{-webkit-box-flex:1;-ms-flex:1;flex:1;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.nav .brand,.nav a{text-decoration:none;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:1rem 0;color:var(--color-grey)}
4
+ .nav .brand{font-size:1.75em;padding-top:0;padding-bottom:0}.tag{display:inline-block;border:1px solid var(--color-lightGrey);text-transform:uppercase;color:var(--color-grey);padding:.5rem;margin-left:.2em;line-height:1;letter-spacing:.5px}.tag.is-small{padding:.4rem;font-size:.75em}.bd-primary{border:1px solid var(--color-primary)!important}.bd-success{border:1px solid var(--color-success)!important}.text-grey{color:var(--color-grey)!important}.text-error{color:var(--color-error)!important}.text-success{color:var(--color-success)!important}.text-center{text-align:center}.is-full-screen{width:100%;min-height:100vh}.is-center,.is-vertical-align{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.is-center{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.is-rounded{border-radius:100%}.iconify-inline{margin-right:.5em}.iconify-inline.badge{margin-left:.3em}.top{flex-direction:column}#theme-switch{width:3em;height:3em;position:fixed;margin:35rem 0 0;z-index:1}
5
+ section,summary{margin:.8em 0 .5em}.bio-gallery{display:grid;grid-template-columns:repeat(3,1fr)}.bio-item{aspect-ratio:1;margin:.2em;overflow:hidden}.bio-img{object-fit:cover;object-position:center}.col.link{position:relative}footer{margin-top:.5em;margin-bottom:2em}@media screen and (max-width:599px){.container{width:100%}.col{-webkit-box-flex:0;-ms-flex:0 1 100%;flex:0 1 100%;max-width:100%}}@media screen and (max-width:480px){.nav{-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column}.nav-center{-ms-flex-wrap:wrap;flex-wrap:wrap;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}}
metadata ADDED
@@ -0,0 +1,85 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: linkhub-jekyll-theme
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Digital Malayali
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2023-10-03 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: jekyll
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '4.3'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '4.3'
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll-seo-tag
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: 2.8.0
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: 2.8.0
41
+ description:
42
+ email:
43
+ - social@digitalmalayali.in
44
+ executables: []
45
+ extensions: []
46
+ extra_rdoc_files: []
47
+ files:
48
+ - LICENSE.txt
49
+ - README.md
50
+ - _config.yml
51
+ - _data/bio.yml
52
+ - _data/links.yml
53
+ - _data/social.yml
54
+ - _includes/bio.html
55
+ - _includes/footer.html
56
+ - _includes/links.html
57
+ - _includes/social.html
58
+ - _layouts/default.html
59
+ - assets/script.js
60
+ - assets/style.css
61
+ homepage: https://github.com/digitalmalayali/linkhub-jekyll-theme
62
+ licenses:
63
+ - MIT
64
+ metadata: {}
65
+ post_install_message:
66
+ rdoc_options: []
67
+ require_paths:
68
+ - lib
69
+ required_ruby_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ requirements: []
80
+ rubygems_version: 3.4.10
81
+ signing_key:
82
+ specification_version: 4
83
+ summary: A minimal and super-lightweight free Jekyll theme to create a link-in-bio
84
+ website like Linktree.
85
+ test_files: []