Skip to content

Commit 9679dd1

Browse files
committed
fix: first appp
1 parent ab5c6f8 commit 9679dd1

File tree

9 files changed

+915
-129
lines changed

9 files changed

+915
-129
lines changed

blog/2019-05-28-first-blog-post.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

blog/2019-05-29-long-blog-post.md

Lines changed: 0 additions & 44 deletions
This file was deleted.

blog/2021-08-01-mdx-blog-post.mdx

Lines changed: 0 additions & 24 deletions
This file was deleted.

blog/2021-08-26-welcome/index.md

Lines changed: 81 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,94 @@
11
---
2-
slug: welcome
3-
title: Welcome
4-
authors: [slorber, yangshun]
5-
tags: [facebook, hello, docusaurus]
2+
slug: my-first-docusaurus-app
3+
title: My First Docusaurus App
4+
authors: [basit]
5+
tags: [docusaurus, static-site, github-pages, nodejs]
66
---
77

8-
[Docusaurus blogging features](https://docusaurus.io/docs/blog) are powered by the [blog plugin](https://docusaurus.io/docs/api/plugins/@docusaurus/plugin-content-blog).
8+
# My First Docusaurus App
99

10-
Here are a few tips you might find useful.
10+
Hello everyone! 👋 Today, I’m thrilled to share my experience creating my first app using **Docusaurus**, a static site generator that simplifies building, deploying, and maintaining websites.
1111

12-
<!-- truncate -->
12+
## 🎉 Getting Started
1313

14-
Simply add Markdown files (or folders) to the `blog` directory.
14+
To start, I ran the following script to create my app:
1515

16-
Regular blog authors can be added to `authors.yml`.
16+
```bash
17+
npx create-docusaurus@latest basitjamil classic
18+
```
1719

18-
The blog post date can be extracted from filenames, such as:
20+
This command initialized a project in a directory called basitjamil using the classic preset. It comes with pre-configured templates and settings, making it beginner-friendly and perfect for building feature-rich websites.
1921

20-
- `2019-05-30-welcome.md`
21-
- `2019-05-30-welcome/index.md`
22+
## 🚀 Hosting on GitHub Pages
2223

23-
A blog post folder can be convenient to co-locate blog post images:
24+
I also wanted to deploy my app on GitHub Pages. Here’s the workflow I used to automate deployment:
2425

25-
![Docusaurus Plushie](./docusaurus-plushie-banner.jpeg)
26+
```yaml
27+
# Simple workflow for deploying static content to GitHub Pages
28+
name: Deploy static content to Pages
2629

27-
The blog supports tags as well!
30+
on:
31+
push:
32+
branches: ["master"]
2833

29-
**And if you don't want a blog**: just delete this directory, and use `blog: false` in your Docusaurus config.
34+
workflow_dispatch:
35+
36+
permissions:
37+
contents: read
38+
pages: write
39+
id-token: write
40+
41+
concurrency:
42+
group: "pages"
43+
cancel-in-progress: false
44+
45+
env:
46+
NODE_OPTIONS: --max-old-space-size=6144
47+
48+
jobs:
49+
deploy:
50+
environment:
51+
name: github-pages
52+
url: ${{ steps.deployment.outputs.page_url }}
53+
runs-on: ubuntu-latest
54+
steps:
55+
- name: Checkout
56+
uses: actions/checkout@v4
57+
58+
- name: Set up Node.js
59+
uses: actions/setup-node@v3
60+
with:
61+
node-version: 18
62+
63+
- name: Install dependencies
64+
run: npm install
65+
66+
- name: Build site
67+
run: npm run build
68+
69+
- name: Setup Pages
70+
uses: actions/configure-pages@v5
71+
72+
- name: Upload artifact
73+
uses: actions/upload-pages-artifact@v3
74+
with:
75+
path: "build"
76+
77+
- name: Deploy to GitHub Pages
78+
id: deployment
79+
uses: actions/deploy-pages@v4
80+
81+
```
82+
83+
This workflow ensures that every time I push changes to the master branch, my site gets built and deployed automatically to GitHub Pages. Isn’t that awesome? 🎉
84+
85+
## 💡 My Learnings
86+
87+
Here are some of the key things I learned during this process:
88+
89+
Docusaurus is a great tool for creating developer-friendly documentation or static sites.
90+
Automating deployments using GitHub Actions saves a lot of time and effort.
91+
Hosting on GitHub Pages is seamless and perfect for open-source projects.
92+
🌐 Check It Out!
93+
94+
You can check out my live site here: [Basit Jamil](https://chbasitgill.github.io/basitjamil/).

blog/authors.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,11 @@
1-
yangshun:
2-
name: Yangshun Tay
3-
title: Front End Engineer @ Facebook
4-
url: https://github.com/yangshun
5-
image_url: https://github.com/yangshun.png
1+
basit:
2+
name: Basit Jamil
3+
title: Software Engineer @ SEB
4+
url: https://github.com/chbasitgill
5+
image_url: https://github.com/CHBASITGILL.png
66
page: true
77
socials:
8-
x: yangshunz
9-
github: yangshun
10-
11-
slorber:
12-
name: Sébastien Lorber
13-
title: Docusaurus maintainer
14-
url: https://sebastienlorber.com
15-
image_url: https://github.com/slorber.png
16-
page:
17-
# customize the url of the author page at /blog/authors/<permalink>
18-
permalink: '/all-sebastien-lorber-articles'
19-
socials:
20-
x: sebastienlorber
21-
linkedin: sebastienlorber
22-
github: slorber
23-
newsletter: https://thisweekinreact.com
8+
facebook: chbasitgill1
9+
instagram: chbasitgill
10+
github: chbasitgill
11+
linkedin: basitjamil

blog/tags.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,7 @@ facebook:
33
permalink: /facebook
44
description: Facebook tag description
55

6-
hello:
7-
label: Hello
8-
permalink: /hello
9-
description: Hello tag description
10-
116
docusaurus:
127
label: Docusaurus
138
permalink: /docusaurus
149
description: Docusaurus tag description
15-
16-
hola:
17-
label: Hola
18-
permalink: /hola
19-
description: Hola tag description

docusaurus.config.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const config: Config = {
1010
favicon: "img/favicon.ico",
1111

1212
// Set the production url of your site here
13-
url: "https://chbasitgill.github.io/basitjamil/",
13+
url: "https://chbasitgill.github.io/",
1414
// Set the /<baseUrl>/ pathname under which your site is served
1515
// For GitHub pages deployment, it is often '/<projectName>/'
1616
baseUrl: "/basitjamil/",
@@ -30,7 +30,7 @@ const config: Config = {
3030
defaultLocale: "en",
3131
locales: ["en"],
3232
},
33-
plugins: ["plugin-image-zoom"],
33+
plugins: [require.resolve("docusaurus-lunr-search"), "plugin-image-zoom"],
3434
presets: [
3535
[
3636
"classic",

0 commit comments

Comments
 (0)