diff --git a/blog/Web-Development-with-Django.md b/blog/Web-Development-with-Django.md
index de8c7d6d7..9b999d9af 100644
--- a/blog/Web-Development-with-Django.md
+++ b/blog/Web-Development-with-Django.md
@@ -53,10 +53,10 @@ A Django project is a collection of settings and configurations for an instance
### Key Files and Directories
-manage.py: A command-line utility for interacting with your project.
-settings.py: Configuration settings for your project.
-urls.py: URL declarations for your project.
-wsgi.py and asgi.py: Entry points for WSGI/ASGI-compatible web servers.
+- **manage.py:** A command-line utility for interacting with your project.
+- **settings.py:** Configuration settings for your project.
+- **urls.py:** URL declarations for your project.
+- **wsgi.py and asgi.py:** Entry points for WSGI/ASGI-compatible web servers.
## 4. Building Your First Django App
@@ -70,9 +70,9 @@ python manage.py startapp myapp
### Defining Models
-Models are Python classes that define the structure of your database tables. Define a model in models.py:
+Models are Python classes that define the structure of your database tables. Define a model in `models.py`:
-```python
+```python title="myapp/models.py"
from django.db import models
class Post(models.Model):
@@ -94,7 +94,7 @@ python manage.py migrate
Register your models to be managed via the Django admin interface:
-```python
+```python title="myapp/admin.py"
from django.contrib import admin
from .models import Post
@@ -104,10 +104,10 @@ admin.site.register(Post)
## 5. Django Views and Templates
-Creating Views
-Views handle the logic of your application and return responses. Define a view in views.py:
+### Creating Views
+Views handle the logic of your application and return responses. Define a view in `views.py`:
-```python
+```python title="myapp/views.py"
from django.shortcuts import render
from .models import Post
@@ -118,9 +118,9 @@ def index(request):
### URL Routing
-Map URLs to views in urls.py:
+Map URLs to views in `urls.py`:
-```python
+```python title="myapp/urls.py"
from django.urls import path
from . import views
@@ -131,9 +131,9 @@ urlpatterns = [
### Using Templates
-Create HTML templates in the templates directory. For example, index.html:
+Create HTML templates in the templates directory. For example, `index.html`:
-```html
+```html title="myapp/templates/index.html"
@@ -152,9 +152,9 @@ Create HTML templates in the templates directory. For example, index.html:
### Template Inheritance
-Use template inheritance to avoid redundancy. Create a base template base.html:
+Use template inheritance to avoid redundancy. Create a base template `base.html`:
-```html
+```html title="myapp/templates/base.html"
@@ -166,11 +166,12 @@ Use template inheritance to avoid redundancy. Create a base template base.html:
```
-Extend it in index.html:
+Extend it in `index.html`:
-```html
-{% extends 'base.html' %} {% block title %}Home{% endblock %} {% block content
-%}
+```html title="myapp/templates/index.html"
+{% extends 'base.html' %}
+{% block title %}Home{% endblock %}
+{% block content %}
Posts
{% for post in posts %}
@@ -184,9 +185,9 @@ Extend it in index.html:
### Creating Forms
-Define a form in forms.py:
+Define a form in `forms.py`:
-```python
+```python title="myapp/forms.py"
from django import forms
from .models import Post
@@ -196,10 +197,10 @@ class PostForm(forms.ModelForm):
fields = ['title', 'content']
```
-Handling Form Submissions
+### Handling Form Submissions
Handle form submissions in a view:
-```python
+```python title="myapp/views.py"
from django.shortcuts import render, redirect
from .forms import PostForm
@@ -214,10 +215,10 @@ def create_post(request):
return render(request, 'create_post.html', {'form': form})
```
-Form Validation
+### Form Validation
Django forms automatically handle validation, but you can add custom validation methods to your form fields if needed.
-Using Django Forms with Models
+### Using Django Forms with Models
Django forms can be used directly with models to simplify data handling and validation.
## 7. Deploying Django Applications
diff --git a/blog/Quantum computing and it's application.md b/blog/quantum-computing-and-its-application.md
similarity index 97%
rename from blog/Quantum computing and it's application.md
rename to blog/quantum-computing-and-its-application.md
index fd9fbd82c..7052f66d9 100644
--- a/blog/Quantum computing and it's application.md
+++ b/blog/quantum-computing-and-its-application.md
@@ -1,9 +1,9 @@
---
-title: "Introduction to Quantum Computing and Its Applications"
+title: "Introduction to Quantum Computing and It's Applications"
sidebar_label: Quantum Computing
authors: [pujan-sarkar]
tags: [Quantum Computing, Applications]
-date: 2024-07-22
+date: 2024-11-25
---
In the realm of computing, quantum computing stands as a revolutionary field that leverages the principles of quantum mechanics to process information in fundamentally different ways compared to classical computing. This blog aims to introduce the basics of quantum computing, explore its potential applications, and provide resources for further learning.
@@ -24,7 +24,9 @@ Quantum computing harnesses the peculiar principles of quantum mechanics, such a
A qubit is the fundamental unit of quantum information. Unlike a classical bit, which can be either 0 or 1, a qubit can exist in a state that is a linear combination of both. This property is called superposition. Mathematically, a qubit's state can be represented as:
-$$ |\psi\rangle = \alpha|0\rangle + \beta|1\rangle $$
+$$
+|\psi\rangle = \alpha|0\rangle + \beta|1\rangle
+$$
where $|\alpha|^2$ and $|\beta|^2$ are the probabilities of the qubit being in the state $|0\rangle$ and $|1\rangle$ respectively, and $|\alpha|^2 + |\beta|^2 = 1$.
diff --git a/blog/sed-normalize-md-file-with-regex.md b/blog/sed-normalize-md-file-with-regex.md
index 65cce2d6e..341b80242 100644
--- a/blog/sed-normalize-md-file-with-regex.md
+++ b/blog/sed-normalize-md-file-with-regex.md
@@ -3,7 +3,7 @@ title: "Sed: Normalize markdown file with Regex"
authors: [ajay-dhangar]
tags: [sed, regex, web clipper]
date: 2024-03-15 14:37:46
-description: How to normalize markdown file with Regex
+description: How to normalize markdown file with Regex using sed command-line utility in Linux, macOS, and Windows.
draft: false
---
@@ -16,7 +16,7 @@ One of the common issues I encounter is inconsistent formatting of the front mat
```markdown
---
title: "Sed: Normalize markdown file with Regex"
-author: Ajay Dhangar
+author: [ajay-dhangar]
tags: [sed, regex, web clipper]
date: 2020-11-26 21:13:28
description: How to normalize markdown file with Regex
@@ -32,7 +32,7 @@ To make the front matter consistent across all my markdown files, I decided to u
sed -i -E "s/^---\n(.*: .*\n)+---\n//g" file.md
```
-Let's break down the regular expression:
+**Let's break down the regular expression:**
- `^---\n` matches the opening three dashes at the beginning of the file, followed by a newline character.
- `(.*: .*\n)+` matches one or more lines containing a key-value pair, where the key is followed by a colon and a space, and the value is followed by a newline character.
diff --git a/blog/sql.md b/blog/sql.md
index 394cdbe29..5b8fcfceb 100644
--- a/blog/sql.md
+++ b/blog/sql.md
@@ -1,7 +1,7 @@
---
-title: "SQL"
-sidebar_label: SQL - Structured Query Language
-authors: [hitesh-gahanolia]
+title: "SQL - Structured Query Language"
+sidebar_label: "SQL"
+authors: [ajay-dhangar, hitesh-gahanolia]
tags: [sql, databases, data]
date: 2024-06-12 5:17
hide_table_of_contents: true
diff --git a/docusaurus.config.js b/docusaurus.config.js
index 899b00480..ed5076409 100644
--- a/docusaurus.config.js
+++ b/docusaurus.config.js
@@ -57,7 +57,8 @@ const config = {
showReadingTime: true,
editUrl:
"https://github.com/codeharborhub/codeharborhub.github.io/edit/main/",
- remarkPlugins: [[npm2yarn, { converters: ["pnpm"] }]],
+ remarkPlugins: [[npm2yarn, { converters: ["pnpm"] }], remarkMath],
+ rehypePlugins: [rehypeKatex],
},
theme: {
customCss: "./src/css/custom.css",
@@ -410,16 +411,16 @@ const config = {
theme: prismThemes.github,
darkTheme: prismThemes.dracula,
additionalLanguages: [
- 'java',
- 'latex',
- 'haskell',
- 'matlab',
- 'PHp',
- 'powershell',
- 'bash',
- 'diff',
- 'json',
- 'scss',
+ "java",
+ "latex",
+ "haskell",
+ "matlab",
+ "PHp",
+ "powershell",
+ "bash",
+ "diff",
+ "json",
+ "scss",
],
},
docs: {
@@ -576,7 +577,7 @@ const config = {
showLastUpdateTime: true,
},
],
-
+
[
path.join(__dirname, "/plugins/my-plugin"),
{