166 | Getting a new business off the ground is a lot of hard work. Here are five
167 | ideas you can use to find your first customers.
168 |
169 |
170 |
171 | ```
172 |
173 | Ex amet id ex aliquip id do laborum excepteur exercitation elit sint commodo occaecat nostrud est. Nostrud pariatur esse veniam laborum non sint magna sit laboris minim in id. Aliqua pariatur pariatur excepteur adipisicing irure culpa consequat commodo et ex id ad.
174 |
175 | ```html
176 |
183 |
184 |
187 | ```
188 |
189 | [[Top]](#top)
190 |
191 | # Inline elements
192 |
193 | Sint ea anim ipsum ad commodo cupidatat do **exercitation** incididunt et minim ad labore sunt. Minim deserunt labore laboris velit nulla incididunt ipsum nulla. Ullamco ad laborum ea qui et anim in laboris exercitation tempor sit officia laborum reprehenderit culpa velit quis. **Consequat commodo** reprehenderit duis [irure](#) esse esse exercitation minim enim Lorem dolore duis irure. Nisi Lorem reprehenderit ea amet excepteur dolor excepteur magna labore proident voluptate ipsum. Reprehenderit ex esse deserunt aliqua ea officia mollit Lorem nulla magna enim. Et ad ipsum labore enim ipsum **cupidatat consequat**. Commodo non ea cupidatat magna deserunt dolore ipsum velit nulla elit veniam nulla eiusmod proident officia.
194 |
195 | _Proident sit veniam in est proident officia adipisicing_ ea tempor cillum non cillum velit deserunt. Voluptate laborum incididunt sit consectetur Lorem irure incididunt voluptate nostrud. Commodo ut eiusmod tempor cupidatat esse enim minim ex anim consequat. Mollit sint culpa qui laboris quis consectetur ad sint esse. Amet anim anim minim ullamco et duis non irure. Sit tempor adipisicing ea laboris `culpa ex duis sint` anim aute reprehenderit id eu ea. Aute [excepteur proident](#) Lorem minim adipisicing nostrud mollit ad ut voluptate do nulla esse occaecat aliqua sint anim.
196 |
197 | Incididunt in culpa cupidatat mollit cillum qui proident sit. In cillum aliquip incididunt voluptate magna amet cupidatat cillum pariatur sint aliqua est _enim **anim** voluptate_. Magna aliquip proident incididunt id duis pariatur eiusmod incididunt commodo culpa dolore sit. Culpa do nostrud elit ad exercitation anim pariatur non minim nisi **adipisicing sunt _officia_**. Do deserunt magna mollit Lorem commodo ipsum do cupidatat mollit enim ut elit veniam ea voluptate. Sint ea anim ipsum ad commodo cupidatat do **exercitation** incididunt et minim ad labore sunt. Minim deserunt labore laboris velit nulla incididunt ipsum nulla.
198 |
199 |
200 |
201 | Reprehenderit non eu quis in ad elit esse qui aute id [incididunt](#) dolore cillum. Esse laboris consequat dolor anim exercitation tempor aliqua deserunt velit magna laboris. Culpa culpa minim duis amet mollit do quis amet commodo nulla irure.
202 |
--------------------------------------------------------------------------------
/src/content/posts/getting-started.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Getting Started🚀
3 | description: How to use this blog template✨
4 | date: 2040-03-09T00:00:00+08:00
5 | tags:
6 | - sample post
7 | - theme
8 | ---
9 |
10 | ## Getting Started
11 |
12 | Download the [codebase](https://github.com/ladit/astro-blog-zozo) first. [Bun](https://bun.sh) is recommended for this project.
13 |
14 | ```shell
15 | # let bun to create a local repo using this template
16 | bun create ladit/astro-blog-zozo
17 | bun install
18 | ```
19 |
20 | ### populate your content
21 |
22 | To craft your own site further, check the folders below and modify anything as you wish. Markdown post with frontmatters is supported.
23 |
24 | ```
25 | public # favicons here
26 | ├── apple-touch-icon.png
27 | ├── favicon.ico
28 | src
29 | ├── assets
30 | │ ├── logo.svg # site logo read in components/Header.astro
31 | │ ├── og-logo.png # logo image for OG generation. Check src/utils/openGraphImage.tsx for detail
32 | ├── config.ts # main config
33 | ├── content # markdown posts and attachments go here
34 | │ ├── attachments
35 | │ └── posts
36 | ├── pages
37 | │ ├── index.astro # index page written in Astro component
38 | │ └── about.astro # about page written in Astro component
39 | giscus.example.json # rename to giscus.json for advanced giscus configurations
40 | ```
41 |
42 | All frontmatter fields except title are optional. Date field is under ISO 8601 format without quotation marks.
43 | The posts frontmatter describes as:
44 |
45 | ```yaml
46 | ---
47 | slug: my-custom-slug
48 | title: My awesome title
49 | description: some desc
50 | image: ../attachments/100.jpg # hero & social image
51 | date: 2024-02-26T23:30:47+08:00
52 | lastmod: 2024-02-26T23:30:47+08:00
53 | hidden: false # set this to true to make this post hidden from posts list. But the uri is still accessable.
54 | tags:
55 | - demo
56 | - theme
57 | hide: # set a element list to hide in the post page
58 | - title
59 | - date
60 | - lastmod
61 | - tags
62 | - readingTime
63 | - toc
64 | - comments
65 | ---
66 | ```
67 |
68 | Note: to use the Astro `Content Collection` feature, the site content must be placed at `src/content`. In fact, I linked the `src/content` folder to my Obsidian vault for better editing experience.
69 |
70 | ### comments
71 |
72 | Post comments is powered by [giscus](https://github.com/giscus/giscus). So your blog visitors should login Github to leave a comment. Follow instructions [here](https://giscus.app/) to initialize your Github repo, install giscus app, enable discussion and get your parameters to fill in `src/config.ts: GiscusConfig`.
73 |
74 | To restrict the domains that can load giscus with your repository's discussions, rename `giscus.example.json` to `giscus.json` and modify it. Document is [here](https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md).
75 |
76 | ### preview
77 |
78 | Build it first by `bun run build` and preview it by `bun run preview` or `bun run preview:wrangler`.
79 |
80 | `wrangler` is a cli from Cloudflare. You may install it first.
81 |
82 | ### deploy to Cloudflare Pages
83 |
84 | Refer to [Cloudflare Pages doc](https://developers.cloudflare.com/pages/). You can use `wrangler` cli to upload from local or git integration.
85 |
86 | Build settings:
87 |
88 | Framework: Astro
89 |
90 | Build command: `bun install && bun run build`
91 |
92 | Evironments:
93 |
94 | ```shell
95 | BUN_VERSION=latest
96 | NODE_VERSION=v22.11.0
97 | ```
98 |
99 | To add a custom domain, check [the doc](https://developers.cloudflare.com/pages/configuration/custom-domains/).
100 |
101 | ### deploy to Github Pages
102 |
103 | Follow [this doc](https://docs.github.com/en/pages/getting-started-with-github-pages/creating-a-github-pages-site).
104 |
105 | You must have a `.github.io` repo in Github for deploying. You can rename this repo.
106 |
107 | In the repository, go to Settings > Pages > Build and deployment. Select `Github Actions` as Source.
108 |
109 | Github workflow(`.github/workflows/pages.yaml`) will deploy for you everytime you push to the default branch.
110 |
111 | To add a custom domain, check [the doc](https://docs.github.com/en/pages/configuring-a-custom-domain-for-your-github-pages-site/about-custom-domains-and-github-pages).
112 |
113 | ### deploy to Vercel
114 |
115 | Link your Github account to Vercel and import your blog repo to it.
116 |
117 | Build settings:
118 |
119 | Framework: Astro
120 |
121 | Build command overwrite: `bun run build`
122 |
123 | To add a custom domain, check [the doc](https://vercel.com/docs/projects/domains/add-a-domain).
124 |
--------------------------------------------------------------------------------
/src/content/posts/hidden.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: a hidden post
3 | slug: my-hidden-post
4 | description: some desc
5 | date: 2024-02-27T23:30:47+08:00
6 | lastmod: 2024-02-27T23:30:47+08:00
7 | hidden: true
8 | tags:
9 | - sample post
10 | - hidden
11 | ---
12 |
13 | # This post is hidden
14 |
15 | It will not be shown in RSS and sitemap. But you can still access it at `/posts/my-hidden-post`.
16 |
17 | Note that if you deploy on public Github repo, hidden posts may be seen in build output such as workflow artifacts.
18 |
--------------------------------------------------------------------------------
/src/content/posts/japanese-preview.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: 日本語敬語体系
3 | date: 2019-04-10T14:26:00+08:00
4 | tags:
5 | - sample post
6 | - 日本語
7 | - 体系
8 | - theme
9 | ---
10 |
11 | > 日本語の敬語体系は、一般に、大きく尊敬語・謙譲語・丁寧語に分類される。文化審議会国語分科会は、2007年2月に「敬語の指針」を答申し、これに丁重語および美化語を含めた5分類を示している。
12 |
13 | # 尊敬語
14 |
15 | 尊敬語は、動作の主体を高めることで、主体への敬意を表す言い方である。動詞に「お(ご)~になる」を付けた形、また、助動詞「(ら)れる」を付けた形などが用いられる。たとえば、動詞「取る」の尊敬形として、「(先生が)お取りになる」「(先生が)取られる」などが用いられる。
16 |
17 |
18 |
19 | 語によっては、特定の尊敬語が対応するものもある。たとえば、「言う」の尊敬語は「おっしゃる」、「食べる」の尊敬語は「召し上がる」、「行く・来る・いる」の尊敬語は「いらっしゃる」である。
20 |
21 | # 謙譲語
22 |
23 | 謙譲語は、古代から基本的に動作の客体への敬意を表す言い方であり、現代では「動作の主体を低める」と解釈するほうがよい場合がある。動詞に「お~する」「お~いたします」(謙譲語+丁寧語)をつけた形などが用いられる。たとえば、「取る」の謙譲形として、「お取りする」などが用いられる。
24 |
25 | 語によっては、特定の謙譲語が対応するものもある。たとえば、「言う」の謙譲語は「申し上げる」、「食べる」の謙譲語は「いただく」、「(相手の所に)行く」の謙譲語は「伺う」「参上する」「まいる」である。
26 |
27 | なお、「夜も更けてまいりました」の「まいり」など、謙譲表現のようでありながら、誰かを低めているわけではない表現がある。これは、「夜も更けてきた」という話題を丁重に表現することによって、聞き手への敬意を表すものである。宮地裕は、この表現に使われる語を、特に「丁重語」と称している[104][105]。丁重語にはほかに「いたし(マス)」「申し(マス)」「存じ(マス)」「小生」「小社」「弊社」などがある。文化審議会の「敬語の指針」でも、「明日から海外へまいります」の「まいり」のように、相手とは関りのない自分側の動作を表現する言い方を丁重語としている。
28 |
29 | # 丁寧語
30 |
31 | 丁寧語は、文末を丁寧にすることで、聞き手への敬意を表すものである。動詞・形容詞の終止形で終わる常体に対して、名詞・形容動詞語幹などに「です」を付けた形(「学生です」「きれいです」)や、動詞に「ます」をつけた形(「行きます」「分かりました」)等の丁寧語を用いた文体を敬体という。
32 |
33 | 一般に、目上の人には丁寧語を用い、同等・目下の人には丁寧語を用いないといわれる。しかし、実際の言語生活に照らして考えれば、これは事実ではない。母が子を叱るとき、「お母さんはもう知りませんよ」と丁寧語を用いる場合ももある。丁寧語が用いられる多くの場合は、敬意や謝意の表現とされるが、、稀に一歩引いた心理的な距離をとろうとする場合もある。
34 |
35 | 「お弁当」「ご飯」などの「お」「ご」も、広い意味では丁寧語に含まれるが、宮地裕は特に「美化語」と称して区別する[104][105]。相手への丁寧の意を示すというよりは、話し手が自分の言葉遣いに配慮した表現である。したがって、「お弁当食べようよ。」のように、丁寧体でない文でも美化語を用いることがある。文化審議会の「敬語の指針」でも「美化語」を設けている。
36 |
--------------------------------------------------------------------------------
/src/content/posts/theme-preview.md:
--------------------------------------------------------------------------------
1 | ---
2 | slug: my-theme-preview
3 | title: Theme Preview with a so long long long long title~
4 | description: What do they got in there? King Kong? You're a very talented young man, with your own clever thoughts and ideas. Do you need a manager? I was part of something special. Did he just throw my cat out of the window? Do you have any idea how long it takes those cups to decompose.
5 | image: ../attachments/100.jpg
6 | date: 2031-03-31T23:30:47+08:00
7 | lastmod: 2024-03-01T23:30:47+08:00
8 | hidden: false
9 | tags:
10 | - sample post
11 | - demo
12 | - theme
13 | - apple
14 | - banana
15 | - cherry
16 | - ice-cream
17 | - chocolate
18 | - cake
19 | - cookie
20 | - donut
21 | - egg
22 | - fish
23 | - grape
24 | - honey
25 | - ice
26 | - jam
27 | - kiwi
28 | - lemon
29 | - mango
30 | - nut
31 | - orange
32 | ---
33 |
34 | # Headings
35 |
36 | ```markdown
37 | # H1
38 |
39 | ## H2
40 |
41 | ### H3
42 |
43 | #### H4
44 |
45 | ##### H5
46 |
47 | ###### H6
48 | ```
49 |
50 |
51 |
52 | # H1
53 |
54 | ## H2
55 |
56 | ### H3
57 |
58 | #### H4
59 |
60 | ##### H5
61 |
62 | ###### H6
63 |
64 | # Paragraphs
65 |
66 | ```markdown
67 | This is a paragraph. // [!code --]
68 | I am still part of the paragraph. // [!code ++]
69 |
70 | New paragraph.
71 | ```
72 |
73 | This is a paragraph.
74 | I am still part of the paragraph.
75 |
76 | New paragraph.
77 |
78 | # long paragraph
79 |
80 | ```markdown
81 | Hey, you know how I'm, like, always trying to save the planet? Here's my chance. Must go faster... go, go, go, go, go! Jaguar shark! So tell me - does it really exist? Forget the fat lady! You're obsessed with the fat lady! Drive us out of here! I was part of something special.
82 |
83 | My dad once told me, laugh and the world laughs with you, Cry, and I'll give you something to cry about you little bastard! We gotta burn the rain forest, dump toxic waste, pollute the air, and rip up the OZONE! 'Cause maybe if we screw up this planet enough, they won't want it anymore!
84 |
85 | Must go faster... go, go, go, go, go! This thing comes fully loaded. AM/FM radio, reclining bucket seats, and... power windows. Must go faster... go, go, go, go, go! Yeah, but John, if The Pirates of the Caribbean breaks down, the pirates don’t eat the tourists.
86 |
87 | Yeah, but John, if The Pirates of the Caribbean breaks down, the pirates don’t eat the tourists. Is this my espresso machine? Wh-what is-h-how did you get my espresso machine? This thing comes fully loaded. AM/FM radio, reclining bucket seats, and... power windows.
88 | ```
89 |
90 | Hey, you know how I'm, like, always trying to save the planet? Here's my chance. Must go faster... go, go, go, go, go! Jaguar shark! So tell me - does it really exist? Forget the fat lady! You're obsessed with the fat lady! Drive us out of here! I was part of something special.
91 |
92 | My dad once told me, laugh and the world laughs with you, Cry, and I'll give you something to cry about you little bastard! We gotta burn the rain forest, dump toxic waste, pollute the air, and rip up the OZONE! 'Cause maybe if we screw up this planet enough, they won't want it anymore!
93 |
94 | Must go faster... go, go, go, go, go! This thing comes fully loaded. AM/FM radio, reclining bucket seats, and... power windows. Must go faster... go, go, go, go, go! Yeah, but John, if The Pirates of the Caribbean breaks down, the pirates don’t eat the tourists.
95 |
96 | Yeah, but John, if The Pirates of the Caribbean breaks down, the pirates don’t eat the tourists. Is this my espresso machine? Wh-what is-h-how did you get my espresso machine? This thing comes fully loaded. AM/FM radio, reclining bucket seats, and... power windows.
97 |
98 | # Inline code
99 |
100 | This is `Inline code`.
101 |
102 | # Image
103 |
104 | ```markdown
105 | Web Image
106 |
107 | 
108 |
109 | Local Image
110 |
111 | 
112 | ```
113 |
114 | Web Image
115 |
116 | 
117 |
118 | Local Image
119 |
120 | 
121 |
122 | # Block Quotes
123 |
124 | ```markdown
125 | > This is a block quote
126 | ```
127 |
128 | > This is a block quote
129 |
130 | # Code Blocks
131 |
132 | ````markdown
133 | ```javascript
134 | // Fenced **with** highlighting
135 | function doIt() {
136 | for (var i = 1; i <= slen ; i^^) {
137 | setTimeout("document.z.textdisplay.value = newMake()", i*300);
138 | setTimeout("window.status = newMake()", i*300);
139 | }
140 | }
141 | ```
142 | ````
143 |
144 | ```javascript
145 | function doIt() {
146 | for (var i = 1; i <= slen ; i^^) {
147 | setTimeout("document.z.textdisplay.value = newMake()", i*300);
148 | setTimeout("window.status = newMake()", i*300);
149 | }
150 | }
151 | ```
152 |
153 | ````markdown
154 | ```go
155 | // Fenced **with** highlighting
156 | package main
157 |
158 | import "fmt"
159 |
160 | func main() {
161 | fmt.Println("Hello, World!")
162 | }
163 | ```
164 | ````
165 |
166 | ```go
167 | // Fenced **with** highlighting
168 | package main
169 |
170 | import "fmt"
171 |
172 | func main() {
173 | fmt.Println("Hello, World!")
174 | }
175 | ```
176 |
177 | # Tables
178 |
179 | ```markdown
180 | | Colors | Fruits | Vegetable |
181 | | ---------- | :-------------: | ----------------: |
182 | | Red | _Apple_ | [Pepper](#Tables) |
183 | | ~~Orange~~ | Oranges | **Carrot** |
184 | | Green | ~~**_Pears_**~~ | Spinach |
185 | ```
186 |
187 | | Colors | Fruits | Vegetable |
188 | | ---------- | :-------------: | ----------------: |
189 | | Red | _Apple_ | [Pepper](#Tables) |
190 | | ~~Orange~~ | Oranges | **Carrot** |
191 | | Green | ~~**_Pears_**~~ | Spinach |
192 |
193 | # List Types
194 |
195 | #### Ordered List
196 |
197 | ```markdown
198 | 1. First item
199 | 2. Second item
200 | 3. Third item
201 | ```
202 |
203 | 1. First item
204 | 2. Second item
205 | 3. Third item
206 |
207 | #### Unordered List
208 |
209 | ```markdown
210 | - First item
211 | - Second item
212 | - Third item
213 | ```
214 |
215 | - First item
216 | - Second item
217 | - Third item
218 |
219 | # Math
220 |
221 | ```tex
222 | $$
223 | evidence\_{i}=\sum\_{j}W\_{ij}x\_{j}+b\_{i}
224 | $$
225 |
226 | $$
227 | AveP = \int_0^1 p(r) dr
228 | $$
229 |
230 | When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
231 | $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
232 | ```
233 |
234 | $$
235 | evidence\_{i}=\sum\_{j}W\_{ij}x\_{j}+b\_{i}
236 | $$
237 |
238 | $$
239 | AveP = \int_0^1 p(r) dr
240 | $$
241 |
242 | When $a \ne 0$, there are two solutions to \(ax^2 + bx + c = 0\) and they are
243 | $$x = {-b \pm \sqrt{b^2-4ac} \over 2a}.$$
244 |
245 | #### Emoji
246 |
247 | This is a test for emoji.
248 | :smile:
249 | :see_no_evil:
250 | :smile_cat:
251 | :watermelon:
252 |
--------------------------------------------------------------------------------
/src/env.d.ts:
--------------------------------------------------------------------------------
1 | ///
2 | ///
3 |
--------------------------------------------------------------------------------
/src/layouts/BaseLayout.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import { ViewTransitions } from 'astro:transitions';
3 | import { SiteLanguage, SiteTitle } from '~/config';
4 | import 'lxgw-wenkai-screen-web/lxgwwenkaigbscreen/result.css';
5 |
6 | export interface Props {
7 | title?: string;
8 | description?: string;
9 | socialImage?: string;
10 | rootClass?:
11 | | Iterable<
12 | string | Record | string[] | false | null | undefined
13 | >
14 | | string;
15 | bodyClass?:
16 | | Iterable<
17 | string | Record | string[] | false | null | undefined
18 | >
19 | | string;
20 | }
21 | const { title, description, socialImage, rootClass, bodyClass } = Astro.props;
22 | const socialImg = new URL(socialImage ?? '/og.png', Astro.url).href;
23 | ---
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 | {title}
37 |
38 |
39 |
45 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
63 |
64 |
65 |
66 |
67 |
68 |
69 |
134 |
135 |
136 |
137 |
138 |
139 |
--------------------------------------------------------------------------------
/src/layouts/MarkdownLayout.astro:
--------------------------------------------------------------------------------
1 | ---
2 | import type { CollectionEntry } from 'astro:content';
3 | import { Icon } from 'astro-icon/components';
4 | import Comments from '~/components/Comments.astro';
5 | import { Hide, type HideElements } from '~/config';
6 | import type { PostHideElements } from '~/content/config';
7 | import ScaffoldLayout from './ScaffoldLayout.astro';
8 | import 'katex/dist/katex.css';
9 |
10 | type Props = CollectionEntry<'posts'>['data'] & {
11 | currentNav?: string;
12 | socialImage?: string;
13 | };
14 | const { title, date, lastmod, tags, readingTime, hide } = Astro.props;
15 | const show = (key: string) =>
16 | !(
17 | Hide.includes(key as HideElements) ||
18 | hide?.includes(key as PostHideElements)
19 | );
20 | const showDate = date && show('date');
21 | const showLastmod = lastmod && show('lastmod');
22 | const showReadingTime = readingTime && show('readingTime');
23 | const showTimes = showDate || showLastmod || showReadingTime;
24 | ---
25 |
26 |
27 | {title && show('title') &&
16 | So you two dig up, dig up dinosaurs? What do they got in there? King Kong? My dad once told me,
17 | laugh and the world laughs with you, Cry, and I'll give you something to cry about you little
18 | bastard! Life finds a way. God creates dinosaurs. God destroys dinosaurs. God creates Man. Man
19 | destroys God. Man creates Dinosaurs.
20 |
21 |
22 | You really think you can fly that thing? You know what? It is beets. I've crashed into a beet
23 | truck. Forget the fat lady! You're obsessed with the fat lady! Drive us out of here! Is this my
24 | espresso machine? Wh-what is-h-how did you get my espresso machine?
25 |
26 |
27 | Hey, you know how I'm, like, always trying to save the planet? Here's my chance. Hey, take a
28 | look at the earthlings. Goodbye! I was part of something special. Just my luck, no ice. You're a
29 | very talented young man, with your own clever thoughts and ideas. Do you need a manager?
30 |
31 |
32 | Jaguar shark! So tell me - does it really exist? This thing comes fully loaded. AM/FM radio,
33 | reclining bucket seats, and... power windows. Yes, Yes, without the oops! You're a very talented
34 | young man, with your own clever thoughts and ideas. Do you need a manager?
35 |
36 |
37 | Yes, Yes, without the oops! Do you have any idea how long it takes those cups to decompose.
38 | They're using our own satellites against us. And the clock is ticking. Do you have any idea how
39 | long it takes those cups to decompose. My dad once told me, laugh and the world laughs with you,
40 | Cry, and I'll give you something to cry about you little bastard!
41 |
19 | This is a blog template built with Astro. The theme
20 | originates from hugo-theme-zozo.
21 | Check out the docs to get started. Here are some
22 | features:
23 |
24 |
25 |
26 | Fast and light weight. Lighthouse 4 * 100/100 on desktop. 1 point decreased on mobile.
27 |
28 |
29 | Astro 4 with no other UI frameworks integrated for better
30 | performance
31 |
32 |
33 | mobile-friendly responsive design with Tailwind CSS
34 |