Skip to content

Commit ad02890

Browse files
committed
Published
0 parents  commit ad02890

File tree

156 files changed

+6941
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

156 files changed

+6941
-0
lines changed

.github/workflows/hugo.yaml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Deploy Hugo site to Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
defaults:
20+
run:
21+
shell: bash
22+
23+
jobs:
24+
build:
25+
runs-on: ubuntu-latest
26+
env:
27+
HUGO_VERSION: 0.144.2
28+
steps:
29+
- name: Install Hugo CLI
30+
run: |
31+
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
32+
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
33+
- name: Install Dart Sass
34+
run: sudo snap install dart-sass
35+
- name: Checkout
36+
uses: actions/checkout@v4
37+
with:
38+
submodules: recursive
39+
fetch-depth: 0
40+
- name: Setup Pages
41+
id: pages
42+
uses: actions/configure-pages@v5
43+
- name: Install Node.js dependencies
44+
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
45+
- name: Build with Hugo
46+
env:
47+
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
48+
HUGO_ENVIRONMENT: production
49+
TZ: America/Los_Angeles
50+
run: |
51+
hugo \
52+
--gc \
53+
--minify \
54+
--baseURL "${{ steps.pages.outputs.base_url }}/"
55+
- name: Upload artifact
56+
uses: actions/upload-pages-artifact@v3
57+
with:
58+
path: ./public
59+
60+
deploy:
61+
environment:
62+
name: github-pages
63+
url: ${{ steps.deployment.outputs.page_url }}
64+
runs-on: ubuntu-latest
65+
needs: build
66+
steps:
67+
- name: Deploy to GitHub Pages
68+
id: deployment
69+
uses: actions/deploy-pages@v4

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/public
2+
.hugo_build.lock

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "themes/hugo-PaperMod"]
2+
path = themes/hugo-PaperMod
3+
url = https://github.com/adityatelange/hugo-PaperMod.git

archetypes/default.md

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
cover:
3+
image: /images/
4+
alt:
5+
relative: false
6+
title: '{{ replace .File.ContentBaseName "-" " " | title }}'
7+
author: 'iniridwanul'
8+
date: {{ .Date }}
9+
tags:
10+
-
11+
draft: true
12+
categories:
13+
-
14+
---

config/_default/languages.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
bn:
2+
languageName: "Bengali"
3+
contentDir: content/bengali
4+
weight: 1
5+
en:
6+
languageName: "English"
7+
contentDir: content/english
8+
weight: 2

config/_default/menus.bn.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
main:
2+
- name: সার্চ
3+
url: "/search"
4+
weight: 5
5+
- name: আর্কাইভ
6+
url: "/archive"
7+
weight: 10
8+
- name: বিভাগসমূহ
9+
url: "/categories"
10+
weight: 15

config/_default/menus.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
main:
2+
- name: Search
3+
url: '/search'
4+
weight: 5
5+
- name: Archive
6+
url: "/archive"
7+
weight: 10
8+
- name: Categories
9+
url: "/categories"
10+
weight: 15

config/_default/params.bn.yml

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
label:
2+
text: "iniridwanul"
3+
icon: /logo/iniridwanul.png
4+
iconHeight: 40
5+
6+
homeInfoParams:
7+
Title: "হ য ব র ল"
8+
Content: হ্যালো, [হ য ব র ল](/bn) ব্লগে আপনাকে স্বাগতম। এই ব্লগের নামকরণ অদ্ভুত রাখার পিছনের কারণ হলো আমার লেখার নির্দিষ্ট কোনো বিষয় নেই। এখানে আপনি আমার লেখালিখির বিভিন্ন রসায়ন খুঁজে পাবেন। মনে করুন, একটা বড় বাটিতে নানা রকম মসলা, সবজি, এবং অন্যান্য উপকরণ মিশে রয়েছে। ঠিক তেমনই এই ব্লগে বিভিন্ন ধরনের লেখা একসঙ্গে মিশে রয়েছে।
9+
10+
social: true
11+
socialIcons:
12+
- name: "github"
13+
url: "https://github.com/iniridwanul"
14+
- name: "goodreads"
15+
url: "https://goodreads.com/iniridwanul"
16+
- name: "telegram"
17+
url: "https://t.me/iniridwanul_timeline"
18+
- name: "mastodon"
19+
url: "https://fosstodon.org/@iniridwanul"
20+
- name: "rss"
21+
url: "/bn/rss.xml"

config/_default/params.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
env: production
2+
description: "Reaches deeper than the roots."
3+
author: iniridwanul
4+
keywords: [Security, Linux, FOSS, Books, iniridwanul]
5+
6+
homeInfoParams:
7+
Title: iniridwanul
8+
Content: Hello, welcome to [iniridwanul](/)'s blog. I don't have a specific topic to write about. Here you will find different chemistry of my writing. Imagine a large bowl with a variety of spices, vegetables, and other ingredients. Similarly, this blog has various types of writing mixed together.
9+
10+
defaultTheme: dark
11+
ShowReadingTime: false
12+
ShowCodeCopyButtons: true
13+
showtoc: true
14+
ShowPostNavLinks: true
15+
ShowShareButtons: true
16+
disableScrollToTop: true
17+
ShowWordCount: false
18+
ShowFullTextinRSS: true
19+
20+
analytics:
21+
google:
22+
SiteVerificationTag: "V0BybqqlNxKPFTXJ82TGuA_9xGK8dULNhKhlOflBW3k"
23+
24+
sitemap:
25+
changeFreq: "hourly"
26+
disable: false
27+
filename: sitemap.xml
28+
priority: -1
29+
30+
social: true
31+
socialIcons:
32+
- name: "github"
33+
url: "https://github.com/iniridwanul"
34+
- name: "goodreads"
35+
url: "https://goodreads.com/iniridwanul"
36+
- name: "telegram"
37+
url: "https://t.me/iniridwanul_timeline"
38+
- name: "mastodon"
39+
url: "https://fosstodon.org/@iniridwanul"
40+
- name: "rss"
41+
url: "/rss.xml"
42+
43+
label:
44+
text: " "
45+
icon: /logo/iniridwanul.png
46+
iconHeight: 40
47+
48+
assets:
49+
disableFingerprinting: true
50+
favicon: "/favicon/favicon.ico"
51+
favicon16x16: "/favicon/favicon-16x16.png"
52+
favicon32x32: "/favicon/favicon-32x32.png"
53+
apple_touch_icon: "/favicon/apple-touch-icon.png"
54+
55+
cover:
56+
hidden: true
57+
hiddenInSingle: true
58+
relative: false
59+
responsiveImages: true

content/bengali/archive.bn.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "আর্কাইভ"
3+
layout: "archives"
4+
---

content/bengali/search.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: "সার্চ"
3+
layout: "search"
4+
description: "ব্লগে আর্টিকেল অনুসন্ধান করুন"
5+
placeholder: "কিওয়ার্ড"
6+
---

content/english/archive.md

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: "Archive"
3+
layout: "archives"
4+
---
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
cover:
3+
image: /images/git_lfs.jpg
4+
alt: Git Large File Storage
5+
relative: false
6+
title: 'Git Large File Storage'
7+
author: 'iniridwanul'
8+
date: 2024-11-27T18:30:46+06:00
9+
tags:
10+
- Git
11+
- Github
12+
- LFS
13+
- Large File Storage
14+
draft: false
15+
categories:
16+
- GitHub
17+
---
18+
19+
I was trying to create an audio library of the Holy Quran on my blog. I wanted to put the surahs in my GitHub repository and create the facility to stream audio from there. But Git is not designed to handle large files efficiently. It struggles with large files due to its delta-based compression, which works poorly on binary files like images, videos, and audio. This leads to bloated repositories, slow clone times, and inefficient branching and merging.
20+
21+
## Why use Git LFS?
22+
Git Large File Storage (LFS) is a Git extension designed to efficiently manage large files within Git repositories. Unlike traditional Git, which is optimized for text-based files, LFS addresses the limitations of storing large binary files (such as images, videos, and audio) directly in the repository.
23+
24+
LFS operates by replacing large files with text pointers in the Git repository. These pointers reference the actual file content, which is stored in a separate remote storage system. This approach significantly reduces the repository's size, improves performance, and streamlines various Git operations like cloning, fetching, and pushing.
25+
26+
By leveraging LFS, developers can maintain a clean and efficient Git workflow, even when working with large files. This allows for smoother collaboration, faster operations, and a more streamlined development process.
27+
28+
## How to use Git LFS?
29+
Git LFS is a powerful tool that seamlessly integrates with Git to efficiently manage large files. Here is a very easy step-by-step guide on how to use Git LFS.
30+
31+
* **Install Git LFS**: Follow the installation instructions according to your operating system from the Git LFS official website. As I am using Arch Linux, I am installing Git LFS by `sudo pacman -S git-lfs` command.
32+
* **Initialization**: The `git lfs install` command initializes Git LFS and configures it to work with your repositories.
33+
* **Track Large Files**: If you want, you can upload only files of specific extensions to git lfs by the `git lfs track "*.extension"` command.
34+
35+
## Conclusion
36+
Git Large File Storage (LFS) is a powerful tool for managing large files within Git repositories. By storing large files outside of the main repository and replacing them with pointers, LFS significantly reduces repository size and improves performance. This allows for efficient cloning, fetching, and branching operations, even with large assets. With Git LFS, developers can seamlessly manage large files alongside code, making it an invaluable asset for projects involving large media, data files, or other binary assets.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
---
2+
cover:
3+
image: /images/resolving_hugo_layout_errors.jpg
4+
alt: Resolving Hugo Layout Errors
5+
relative: false
6+
title: 'Resolving Hugo Layout Errors'
7+
author: 'iniridwanul'
8+
date: 2024-11-29T19:40:40+06:00
9+
tags:
10+
- Hugo
11+
- Git Submodule
12+
- GitHub Pages
13+
- Blog
14+
draft: false
15+
categories:
16+
- GitHub
17+
---
18+
19+
Yesterday, someone I know forked my blog and was trying to generate a static blog site using the Hugo Framework. But when he forked my repository and tried to run it to modify my blog locally, he saw a few things missing, and it failed to run. The reason is that when you clone a repository with submodules, you're essentially getting a reference to the submodule's repository, not the actual code.
20+
21+
## What is a Git submodule?
22+
Git submodules are a powerful tool in the Git version control system that allow you to incorporate external repositories into your main project, maintaining a clear separation between the two while still enabling collaboration and dependency management.
23+
24+
Think of submodules as pointers to specific commits within other repositories. When you add a submodule to your project, a reference to the external repository's commit is stored in your main repository's `.gitmodules` file. This file acts as a configuration file, specifying the location of the submodule and its corresponding commit hash.
25+
26+
## Solution
27+
If you try to run the site locally by Hugo after recloning the repository, you need to use the following two commands to solve the error of the layout missing.
28+
29+
```shell
30+
git submodule init
31+
git submodule update
32+
```
33+
* **git submodule init**:
34+
* Initializes the local configuration for each submodule, setting up the necessary files and directories.
35+
* Essentially, it tells Git, "Hey, I know about these submodules, and I'm ready to work with them."
36+
37+
* **git submodule update**:
38+
* Fetches and checks out the specified commit of each submodule.
39+
* This is where the actual code for the submodule is downloaded and placed into its designated directory within your main project.
40+
41+
## Conclusion
42+
Git submodules offer a flexible and efficient way to manage external dependencies within your Git projects. By understanding their purpose and how to properly initialize and update them, you can effectively incorporate third-party code into your own repositories.
43+
44+
Remember that submodules are powerful tools, but they require careful consideration and management. By following the steps outlined in this article, you can successfully work with submodules and ensure that your projects function as expected.

0 commit comments

Comments
 (0)