diff --git a/astro.config.mjs b/astro.config.mjs index 813749327..f359fa86c 100644 --- a/astro.config.mjs +++ b/astro.config.mjs @@ -1,41 +1,39 @@ -import sitemap from "@astrojs/sitemap"; -import svelte from "@astrojs/svelte"; -import tailwind from "@astrojs/tailwind"; -import swup from "@swup/astro"; -import Compress from "astro-compress"; -import icon from "astro-icon"; -import { defineConfig } from "astro/config"; -import rehypeAutolinkHeadings from "rehype-autolink-headings"; -import rehypeComponents from "rehype-components"; /* Render the custom directive content */ -import rehypeKatex from "rehype-katex"; -import rehypeSlug from "rehype-slug"; -import remarkDirective from "remark-directive"; /* Handle directives */ -import remarkGithubAdmonitionsToDirectives from "remark-github-admonitions-to-directives"; -import remarkMath from "remark-math"; -import remarkSectionize from "remark-sectionize"; -import { AdmonitionComponent } from "./src/plugins/rehype-component-admonition.mjs"; -import { GithubCardComponent } from "./src/plugins/rehype-component-github-card.mjs"; -import { parseDirectiveNode } from "./src/plugins/remark-directive-rehype.js"; -import { remarkExcerpt } from "./src/plugins/remark-excerpt.js"; -import { remarkReadingTime } from "./src/plugins/remark-reading-time.mjs"; +import sitemap from '@astrojs/sitemap' +import svelte from '@astrojs/svelte' +import tailwind from '@astrojs/tailwind' +import swup from '@swup/astro' +import Compress from 'astro-compress' +import icon from 'astro-icon' +import { defineConfig } from 'astro/config' +import rehypeAutolinkHeadings from 'rehype-autolink-headings' +import rehypeComponents from 'rehype-components' /* Render the custom directive content */ +import rehypeKatex from 'rehype-katex' +import rehypeSlug from 'rehype-slug' +import remarkDirective from 'remark-directive' /* Handle directives */ +import remarkGithubAdmonitionsToDirectives from 'remark-github-admonitions-to-directives' +import remarkMath from 'remark-math' +import remarkSectionize from 'remark-sectionize' +import { AdmonitionComponent } from './src/plugins/rehype-component-admonition.mjs' +import { GithubCardComponent } from './src/plugins/rehype-component-github-card.mjs' +import { parseDirectiveNode } from './src/plugins/remark-directive-rehype.js' +import { remarkExcerpt } from './src/plugins/remark-excerpt.js' +import { remarkReadingTime } from './src/plugins/remark-reading-time.mjs' // https://astro.build/config export default defineConfig({ - site: "https://fuwari.vercel.app/", - base: "/", - trailingSlash: "always", + site: 'https://silverhalwkmtts.pages.dev/', + base: '/', + trailingSlash: 'always', integrations: [ - tailwind( - { - nesting: true, - } - ), + tailwind({ + nesting: true, + }), swup({ theme: false, - animationClass: "transition-swup-", // see https://swup.js.org/options/#animationselector + animationClass: 'transition-swup-', // see https://swup.js.org/options/#animationselector // the default value `transition-` cause transition delay // when the Tailwind class `transition-all` is used - containers: ["main", "#toc"], + containers: ['main', '#toc'], smoothScrolling: true, cache: true, preload: true, @@ -46,10 +44,10 @@ export default defineConfig({ }), icon({ include: { - "preprocess: vitePreprocess(),": ["*"], - "fa6-brands": ["*"], - "fa6-regular": ["*"], - "fa6-solid": ["*"], + 'preprocess: vitePreprocess(),': ['*'], + 'fa6-brands': ['*'], + 'fa6-regular': ['*'], + 'fa6-solid': ['*'], }, }), svelte(), @@ -80,32 +78,32 @@ export default defineConfig({ { components: { github: GithubCardComponent, - note: (x, y) => AdmonitionComponent(x, y, "note"), - tip: (x, y) => AdmonitionComponent(x, y, "tip"), - important: (x, y) => AdmonitionComponent(x, y, "important"), - caution: (x, y) => AdmonitionComponent(x, y, "caution"), - warning: (x, y) => AdmonitionComponent(x, y, "warning"), + note: (x, y) => AdmonitionComponent(x, y, 'note'), + tip: (x, y) => AdmonitionComponent(x, y, 'tip'), + important: (x, y) => AdmonitionComponent(x, y, 'important'), + caution: (x, y) => AdmonitionComponent(x, y, 'caution'), + warning: (x, y) => AdmonitionComponent(x, y, 'warning'), }, }, ], [ rehypeAutolinkHeadings, { - behavior: "append", + behavior: 'append', properties: { - className: ["anchor"], + className: ['anchor'], }, content: { - type: "element", - tagName: "span", + type: 'element', + tagName: 'span', properties: { - className: ["anchor-icon"], - "data-pagefind-ignore": true, + className: ['anchor-icon'], + 'data-pagefind-ignore': true, }, children: [ { - type: "text", - value: "#", + type: 'text', + value: '#', }, ], }, @@ -119,14 +117,14 @@ export default defineConfig({ onwarn(warning, warn) { // temporarily suppress this warning if ( - warning.message.includes("is dynamically imported by") && - warning.message.includes("but also statically imported by") + warning.message.includes('is dynamically imported by') && + warning.message.includes('but also statically imported by') ) { - return; + return } - warn(warning); + warn(warning) }, }, }, }, -}); +}) diff --git a/src/assets/images/demo-avatar1.png b/src/assets/images/demo-avatar1.png new file mode 100644 index 000000000..14aa60a70 Binary files /dev/null and b/src/assets/images/demo-avatar1.png differ diff --git a/src/config.ts b/src/config.ts index d2c38b58f..aef903739 100644 --- a/src/config.ts +++ b/src/config.ts @@ -7,8 +7,8 @@ import type { import { LinkPreset } from './types/config' export const siteConfig: SiteConfig = { - title: 'Fuwari', - subtitle: 'Demo Site', + title: 'Silverhalwk', + subtitle: 'Official Site', lang: 'en', // 'en', 'zh_CN', 'zh_TW', 'ja', 'ko' themeColor: { hue: 250, // Default hue for the theme color, from 0 to 360. e.g. red: 0, teal: 200, cyan: 250, pink: 345 @@ -42,25 +42,20 @@ export const navBarConfig: NavBarConfig = { LinkPreset.Home, LinkPreset.Archive, LinkPreset.About, - { - name: 'GitHub', - url: 'https://github.com/saicaca/fuwari', // Internal links should not include the base path, as it is automatically added - external: true, // Show an external link icon and will open in a new tab - }, ], } export const profileConfig: ProfileConfig = { - avatar: 'assets/images/demo-avatar.png', // Relative to the /src directory. Relative to the /public directory if it starts with '/' - name: 'Lorem Ipsum', - bio: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.', + avatar: 'assets/images/demo-avatar1.png', // Relative to the /src directory. Relative to the /public directory if it starts with '/' + name: 'silverhalwkmtts', + bio: 'Normal heart.', links: [ { - name: 'Twitter', - icon: 'fa6-brands:twitter', // Visit https://icones.js.org/ for icon codes + name: 'Facebook', + icon: 'fa6-brands:facebook', // Visit https://icones.js.org/ for icon codes // You will need to install the corresponding icon set if it's not already included // `pnpm add @iconify-json/` - url: 'https://twitter.com', + url: 'https://www.facebook.com/edgy.cookingtime/', }, { name: 'Steam', @@ -68,9 +63,9 @@ export const profileConfig: ProfileConfig = { url: 'https://store.steampowered.com', }, { - name: 'GitHub', - icon: 'fa6-brands:github', - url: 'https://github.com/saicaca/fuwari', + name: 'YouTube', + icon: 'fa6-brands:youtube', + url: 'https://www.youtube.com/@silverhalwkmtts', }, ], } diff --git a/src/content/posts/cyber1/cyber1.md b/src/content/posts/cyber1/cyber1.md new file mode 100644 index 000000000..0c582172f --- /dev/null +++ b/src/content/posts/cyber1/cyber1.md @@ -0,0 +1,12 @@ +--- +title: Introduce Myself. +published: 2024-12-09 +description: Hello, my name is Joey. +image: ./cyber1.png +tags: [Blog] +category: 'Blog' +draft: false +lang: '' +--- + +Hello, my name is Joey. I am deeply passionate about cybersecurity and have a strong determination to become the best in this field in Thailand. My journey is fueled by a love for learning, exploring, and solving complex challenges related to cybersecurity. I believe that with hard work, dedication, and continuous self-improvement, I can achieve my goal and make a significant impact in the cybersecurity industry. \ No newline at end of file diff --git a/src/content/posts/cyber1/cyber1.png b/src/content/posts/cyber1/cyber1.png new file mode 100644 index 000000000..c03d1d8d1 Binary files /dev/null and b/src/content/posts/cyber1/cyber1.png differ diff --git a/src/content/posts/cyber2/cyber2.md b/src/content/posts/cyber2/cyber2.md new file mode 100644 index 000000000..9d34b439d --- /dev/null +++ b/src/content/posts/cyber2/cyber2.md @@ -0,0 +1,50 @@ +--- +title: HackTheBox - Getting started (Part 1) +published: 2024-12-14 +description: 'A unique summary in my own words.' +image: './cyber2.webp' +tags: [HTB] +category: 'HTB' +draft: false +lang: '' +--- + +# Most importantly +สวัสดีครับ วันนี้ผมจะมาสรุปใจความสำคัญใน Module ที่ชื่อว่า Getting Started ของ HackTheBox Academy นะครับ โดยใน Module ดังกล่าวจะใช้เวลาอยู่ที่ประมาณ 8 ชั่วโมง (ตามที่เขาบอก 5555+) แต่สรุปแล้ว ซัดไป 2 วันตึง ๆ เพราะผมพยายามทำความเข้าใจให้มากขึ้น และต้องใช้ chatgpt ในส่วนที่ยังไม่ค่อยเข้าใจบ้างครับ + + +![Alt text](./img1.png "a title") + +# Information Security Overview + +Alt text + +จากหัวข้อแปลว่า "การรักษาความปลอดภัยข้อมูล" ซึ่งเป็นพื้นฐานของการปกป้องข้อมูลจากสิ่งต่าง ๆ ต่อไปนี้ +1. จากการเข้าถึงโดยไม่ได้รับอนุญาต +2. การถูกเปลี่ยนแปลงข้อมูล +3. การเอาไปใช้งานที่ผิดกฎหมาย +4. และอื่น ๆ + +เราต้องคงไว้ซึ่ง **CIA Triad (รูปด้านบน)** ซึ่งมีความหมายว่า +1. Confidentiality : การรักษาความลับ + * เพื่อนร่วมงานไม่ควรมาชะเง้อดู Computer ของเราว่าคุยกับใคร + * เอกสารลับของทางราชการ ควรมีการกำหนดคนที่สามารถเข้าถึงได้เพียงบางคน + +2. Integrity : การรักษาความถูกต้องของข้อมูล + * ถูกสับเปลี่ยนข้อมูล + * ถูกแก้ไขหน้าเว็บไซต์ + * ถูกเปลี่ยนชื่อผู้รับ หรือ ผู้ส่งเอกสาร + +3. Availability : ความพร้อมใช้งานอยู่เสมอ + * ถูก DDOS ทำให้เว็บล่ม + * แอปพลิเคชันธนาคารเปิดไม่ได้เวลาเงินเดือนออก + * เว็บมหาวิทยาลัยเปิดไม่ได้เวลาจะประกาศผลสอบ + * เจ้าหน้าที่จะใช้งานระบบภายในองค์กร แต่ไม่สามารถทำงานได้ + +# Risk Management Process +จากหัวข้อแปลว่า "กระบวนการจัดการความเสี่ยง" เป็นการทำนโยบายไปใช้ โดยไม่ส่งผลด้านลบต่อองค์กร ซึ่ง **Risk Management Process จะมี 5 กระบวนการ** +1. **Identify** : ระบุความเสี่ยงที่จะต้องเผชิญ +2. **Analyze** : วิเคราะห์ความเสี่ยงเพื่อ **พิจารณาผลกระทบ** โดยที่ **ทุก ๆ ความเสี่ยงจะต้องมีนโยบาย ขั้นตอน และกระบวนการสำหรับธุรกิจต่าง ๆ** +3. **Evaluate** : ประเมินความเสี่ยง **เพื่อจัดลำดับความสำคัญของความเสี่ยง** เพื่อตัดสินใจว่า จะยอมรับเพราะเลี่ยงไม่ได้, หลีกเลี่ยง, ควบคุม หรือ โอนความเสี่ยงไปเลย +4. **Dealing** : กำจัดความเสี่ยงให้ได้มากที่สุด +5. **Monitoring** : ทุก ๆ ความเสี่ยงต้องมีการติดตามอย่างต่อเนื่อง เพื่อดูว่ามีการเปลี่ยนแปลงที่ส่งผลต่อคะแนน Impact หรือไม่ \ No newline at end of file diff --git a/src/content/posts/cyber2/cyber2.webp b/src/content/posts/cyber2/cyber2.webp new file mode 100644 index 000000000..5d6479a6b Binary files /dev/null and b/src/content/posts/cyber2/cyber2.webp differ diff --git a/src/content/posts/cyber2/img1.png b/src/content/posts/cyber2/img1.png new file mode 100644 index 000000000..eb346f953 Binary files /dev/null and b/src/content/posts/cyber2/img1.png differ diff --git a/src/content/posts/draft.md b/src/content/posts/draft.md index 77aba5aa0..b862e371c 100644 --- a/src/content/posts/draft.md +++ b/src/content/posts/draft.md @@ -1,5 +1,5 @@ --- -title: Draft Example +title: Intruduce Myself published: 2022-07-01 tags: [Markdown, Blogging, Demo] category: Examples diff --git a/src/content/posts/guide/cover.jpeg b/src/content/posts/guide/cover.jpeg deleted file mode 100644 index 66104c33f..000000000 Binary files a/src/content/posts/guide/cover.jpeg and /dev/null differ diff --git a/src/content/posts/guide/index.md b/src/content/posts/guide/index.md deleted file mode 100644 index 8db1e3d2b..000000000 --- a/src/content/posts/guide/index.md +++ /dev/null @@ -1,51 +0,0 @@ ---- -title: Simple Guides for Fuwari -published: 2024-04-01 -description: "How to use this blog template." -image: "./cover.jpeg" -tags: ["Fuwari", "Blogging", "Customization"] -category: Guides -draft: false ---- - -> Cover image source: [Source](https://image.civitai.com/xG1nkqKTMzGDvpLrqFT7WA/208fc754-890d-4adb-9753-2c963332675d/width=2048/01651-1456859105-(colour_1.5),girl,_Blue,yellow,green,cyan,purple,red,pink,_best,8k,UHD,masterpiece,male%20focus,%201boy,gloves,%20ponytail,%20long%20hair,.jpeg) - -This blog template is built with [Astro](https://astro.build/). For the things that are not mentioned in this guide, you may find the answers in the [Astro Docs](https://docs.astro.build/). - -## Front-matter of Posts - -```yaml ---- -title: My First Blog Post -published: 2023-09-09 -description: This is the first post of my new Astro blog. -image: ./cover.jpg -tags: [Foo, Bar] -category: Front-end -draft: false ---- -``` - -| Attribute | Description | -|---------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| -| `title` | The title of the post. | -| `published` | The date the post was published. | -| `description` | A short description of the post. Displayed on index page. | -| `image` | The cover image path of the post.
1. Start with `http://` or `https://`: Use web image
2. Start with `/`: For image in `public` dir
3. With none of the prefixes: Relative to the markdown file | -| `tags` | The tags of the post. | -| `category` | The category of the post. | -| `draft` | If this post is still a draft, which won't be displayed. | - -## Where to Place the Post Files - - - -Your post files should be placed in `src/content/posts/` directory. You can also create sub-directories to better organize your posts and assets. - -``` -src/content/posts/ -├── post-1.md -└── post-2/ - ├── cover.png - └── index.md -``` diff --git a/src/content/posts/markdown-extended.md b/src/content/posts/markdown-extended.md deleted file mode 100644 index 241e7e21a..000000000 --- a/src/content/posts/markdown-extended.md +++ /dev/null @@ -1,84 +0,0 @@ ---- -title: Markdown Extended Features -published: 2024-05-01 -updated: 2024-11-29 -description: 'Read more about Markdown features in Fuwari' -image: '' -tags: [Demo, Example, Markdown, Fuwari] -category: 'Examples' -draft: false ---- - -## GitHub Repository Cards -You can add dynamic cards that link to GitHub repositories, on page load, the repository information is pulled from the GitHub API. - -::github{repo="Fabrizz/MMM-OnSpotify"} - -Create a GitHub repository card with the code `::github{repo="/"}`. - -```markdown -::github{repo="saicaca/fuwari"} -``` - -## Admonitions - -Following types of admonitions are supported: `note` `tip` `important` `warning` `caution` - -:::note -Highlights information that users should take into account, even when skimming. -::: - -:::tip -Optional information to help a user be more successful. -::: - -:::important -Crucial information necessary for users to succeed. -::: - -:::warning -Critical content demanding immediate user attention due to potential risks. -::: - -:::caution -Negative potential consequences of an action. -::: - -### Basic Syntax - -```markdown -:::note -Highlights information that users should take into account, even when skimming. -::: - -:::tip -Optional information to help a user be more successful. -::: -``` - -### Custom Titles - -The title of the admonition can be customized. - -:::note[MY CUSTOM TITLE] -This is a note with a custom title. -::: - -```markdown -:::note[MY CUSTOM TITLE] -This is a note with a custom title. -::: -``` - -### GitHub Syntax - -> [!TIP] -> [The GitHub syntax](https://github.com/orgs/community/discussions/16925) is also supported. - -``` -> [!NOTE] -> The GitHub syntax is also supported. - -> [!TIP] -> The GitHub syntax is also supported. -``` \ No newline at end of file diff --git a/src/content/posts/markdown.md b/src/content/posts/markdown.md deleted file mode 100644 index 43285c76d..000000000 --- a/src/content/posts/markdown.md +++ /dev/null @@ -1,166 +0,0 @@ ---- -title: Markdown Example -published: 2023-10-01 -description: A simple example of a Markdown blog post. -tags: [Markdown, Blogging, Demo] -category: Examples -draft: false ---- - -# An h1 header - -Paragraphs are separated by a blank line. - -2nd paragraph. _Italic_, **bold**, and `monospace`. Itemized lists -look like: - -- this one -- that one -- the other one - -Note that --- not considering the asterisk --- the actual text -content starts at 4-columns in. - -> Block quotes are -> written like so. -> -> They can span multiple paragraphs, -> if you like. - -Use 3 dashes for an em-dash. Use 2 dashes for ranges (ex., "it's all -in chapters 12--14"). Three dots ... will be converted to an ellipsis. -Unicode is supported. ☺ - -## An h2 header - -Here's a numbered list: - -1. first item -2. second item -3. third item - -Note again how the actual text starts at 4 columns in (4 characters -from the left side). Here's a code sample: - - # Let me re-iterate ... - for i in 1 .. 10 { do-something(i) } - -As you probably guessed, indented 4 spaces. By the way, instead of -indenting the block, you can use delimited blocks, if you like: - -``` -define foobar() { - print "Welcome to flavor country!"; -} -``` - -(which makes copying & pasting easier). You can optionally mark the -delimited block for Pandoc to syntax highlight it: - -```python -import time -# Quick, count to ten! -for i in range(10): - # (but not *too* quick) - time.sleep(0.5) - print i -``` - -### An h3 header - -Now a nested list: - -1. First, get these ingredients: - - - carrots - - celery - - lentils - -2. Boil some water. - -3. Dump everything in the pot and follow - this algorithm: - - find wooden spoon - uncover pot - stir - cover pot - balance wooden spoon precariously on pot handle - wait 10 minutes - goto first step (or shut off burner when done) - - Do not bump wooden spoon or it will fall. - -Notice again how text always lines up on 4-space indents (including -that last line which continues item 3 above). - -Here's a link to [a website](http://foo.bar), to a [local -doc](local-doc.html), and to a [section heading in the current -doc](#an-h2-header). Here's a footnote [^1]. - -[^1]: Footnote text goes here. - -Tables can look like this: - -size material color - ---- - -9 leather brown -10 hemp canvas natural -11 glass transparent - -Table: Shoes, their sizes, and what they're made of - -(The above is the caption for the table.) Pandoc also supports -multi-line tables: - ---- - -keyword text - ---- - -red Sunsets, apples, and -other red or reddish -things. - -green Leaves, grass, frogs -and other things it's -not easy being. - ---- - -A horizontal rule follows. - ---- - -Here's a definition list: - -apples -: Good for making applesauce. -oranges -: Citrus! -tomatoes -: There's no "e" in tomatoe. - -Again, text is indented 4 spaces. (Put a blank line between each -term/definition pair to spread things out more.) - -Here's a "line block": - -| Line one -| Line too -| Line tree - -and images can be specified like so: - -[//]: # (![example image](./demo-banner.png "An exemplary image")) - -Inline math equations go in like so: $\omega = d\phi / dt$. Display -math should get its own line and be put in in double-dollarsigns: - -$$I = \int \rho R^{2} dV$$ - -And note that you can backslash-escape any punctuation characters -which you wish to be displayed literally, ex.: \`foo\`, \*bar\*, etc. diff --git a/src/content/posts/video.md b/src/content/posts/video.md deleted file mode 100644 index 4d53a9526..000000000 --- a/src/content/posts/video.md +++ /dev/null @@ -1,28 +0,0 @@ ---- -title: Include Video in the Posts -published: 2023-08-01 -description: This post demonstrates how to include embedded video in a blog post. -tags: [Example, Video] -category: Examples -draft: false ---- - -Just copy the embed code from YouTube or other platforms, and paste it in the markdown file. - -```yaml ---- -title: Include Video in the Post -published: 2023-10-19 -// ... ---- - - -``` - -## YouTube - - - -## Bilibili - - diff --git a/src/content/spec/about.md b/src/content/spec/about.md index 40d9fe852..b093b827e 100644 --- a/src/content/spec/about.md +++ b/src/content/spec/about.md @@ -1,9 +1,11 @@ # About -This is the demo site for [Fuwari](https://github.com/saicaca/fuwari). + -::github{repo="saicaca/fuwari"} +Hello, my name is Joey. I am deeply passionate about cybersecurity and have a strong determination to become the best in this field in Thailand. My journey is fueled by a love for learning, exploring, and solving complex challenges related to cybersecurity. I believe that with hard work, dedication, and continuous self-improvement, I can achieve my goal and make a significant impact in the cybersecurity industry. + + \ No newline at end of file