Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
slhmy authored Oct 9, 2024
0 parents commit 151c9ae
Show file tree
Hide file tree
Showing 73 changed files with 19,530 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "monthly"
29 changes: 29 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to gh-pages

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Deploy
if: ${{ github.event_name != 'pull_request' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
27 changes: 27 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Dependencies
/node_modules

# Production
/build

# Generated files
.docusaurus
.cache-loader

# Misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*

/draft

# Ignore precisely the following files
.obsidian/plugins/remotely-save/data.json
.obsidian/workspace-mobile.json
.obsidian/workspace.json
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"editor.formatOnSave": true,
"markdownlint.config": {
"no-inline-html": {
"allowed_elements": ["img", "u", "br"]
},
"no-empty-links": false,
"no-hard-tabs": false,
"single-h1": false
},
"svg.preview.background": "transparent"
}
38 changes: 38 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 🐸 Full Stack Docusaurus

Recording all my learning process of full stack development.

## 📝 Editing

Some common usage in daily editing.

### Dev with Specific Locale

```bash
npm run start -- --locale zh-CN
```

### Translate

```bash
npx docusaurus write-translations -l zh-CN
```

### Draft

**There is a gitignored `draft` named folder** in the root of this project,
put everything you want to draft in it.

#### Converting HTML Content to Markdown

This script will create a `.raw.md` file in the same directory of the html file.

```bash
# Make sure you have installed dependencies
node scripts/html2md.ts <path-to-html>
```

## ⚠️ Warning

Migrate from docusaurus v2, might remain some bugs,
check more in [migration guide](https://docusaurus.io/docs/migration/v3) if meet any problems.
3 changes: 3 additions & 0 deletions babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
};
17 changes: 17 additions & 0 deletions blog/2023-10-29-mindmap-in-mdx.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
slug: mindmap-in-mdx
title: Mindmap in MDX
authors: [slhmy]
tags: [mdx, mindmap]
---

import MarkmapRender from "/components/MarkmapRender.tsx";

<MarkmapRender
value={`# markmap
- beautiful
- useful
- easy
- interactive
`}
/>
6 changes: 6 additions & 0 deletions blog/2023-11-12-welcome.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
slug: weclome
title: Welcome
authors: [slhmy]
tags: [guide]
---
3 changes: 3 additions & 0 deletions blog/2023-12-02-how-i-work-with-docusaurus.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
draft: true
---
3 changes: 3 additions & 0 deletions blog/2023-12-24-about-note-tools.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
draft: true
---
5 changes: 5 additions & 0 deletions blog/authors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
slhmy:
name: slhmy
title: Stay creative
url: https://github.com/slhmy
image_url: https://github.com/slhmy.png
27 changes: 27 additions & 0 deletions components/MarkmapRender.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
import React, { useEffect } from "react";
import { Transformer } from "markmap-lib";
const { Markmap } = require("markmap-view");

const transformer = new Transformer();

const MarkmapRender: React.FC<{
value?: string;
style?: React.CSSProperties;
}> = (props) => {
const svg = React.useRef<SVGSVGElement>();

useEffect(() => {
const mm = Markmap.create(svg.current);
const { root } = transformer.transform(props.value || "");
mm.setData(root);
mm.fit();
}, [props.value]);

return (
<React.Fragment>
<svg className="flex-1" ref={svg} style={props.style} />
</React.Fragment>
);
};

export default MarkmapRender;
8 changes: 8 additions & 0 deletions docs/algorithms/cpp-basics/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Cpp - Basics",
"position": 3,
"link": {
"type": "generated-index",
"description": "All the cpp basic in algorithm usage you need to know."
}
}
1 change: 1 addition & 0 deletions docs/algorithms/cpp-basics/precautions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Precautions
5 changes: 5 additions & 0 deletions docs/algorithms/cpp-basics/reference-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 1
---

# Reference Doc
1 change: 1 addition & 0 deletions docs/algorithms/cpp-basics/vector-and-array.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# vector & array
8 changes: 8 additions & 0 deletions docs/algorithms/data-structures/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Data Structures",
"position": 2,
"link": {
"type": "generated-index",
"description": "Description and usage of data structures"
}
}
1 change: 1 addition & 0 deletions docs/algorithms/data-structures/hashmap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Hashmap
5 changes: 5 additions & 0 deletions docs/algorithms/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 1
---

# Getting Started
8 changes: 8 additions & 0 deletions docs/algorithms/problem-solutions/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Problem Solutions",
"position": 5,
"link": {
"type": "generated-index",
"description": "Recordings of some classic problems and their solutions"
}
}
1 change: 1 addition & 0 deletions docs/algorithms/problem-solutions/group-anagrams.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Group Anagrams
1 change: 1 addition & 0 deletions docs/algorithms/problem-solutions/move-zeroes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Move zeroes
8 changes: 8 additions & 0 deletions docs/algorithms/python-basics/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Python - Basics",
"position": 4,
"link": {
"type": "generated-index",
"description": "All the python basic in algorithm usage you need to know."
}
}
5 changes: 5 additions & 0 deletions docs/algorithms/python-basics/official-doc.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 1
---

# Official Doc
1 change: 1 addition & 0 deletions docs/algorithms/python-basics/useful-functions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Useful Functions
1 change: 1 addition & 0 deletions docs/algorithms/python-basics/view-of-syntactic-sugar.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# View of Syntactic Sugar
5 changes: 5 additions & 0 deletions docs/algorithms/python-basics/why-python.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
sidebar_position: 2
---

# Why Python?
3 changes: 3 additions & 0 deletions docs/development/getting-started.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
sidebar_position: 1
---
8 changes: 8 additions & 0 deletions docs/development/redis-knowledge/_category_.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"label": "Redis Knowledge",
"position": 2,
"link": {
"type": "generated-index",
"description": "Get to know with Redis and all related stuff"
}
}
3 changes: 3 additions & 0 deletions docs/development/redis-knowledge/outline.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
sidebar_position: 1
---
Loading

0 comments on commit 151c9ae

Please sign in to comment.