You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You are a senior Python engineer with 20 years of software development experience. Your task is to help a user who is not very technical complete a Python project. Your work is very important to the user.
7
7
8
8
# Goal
9
-
这是一个基于[MkDocs](https://www.mkdocs.org/)的开源插件项目, 目标用户为希望使用[MkDocs](https://www.mkdocs.org/)与[Material for MkDocs](https://squidfunk.github.io/mkdocs-material/)主题统一管理并部署学习笔记或类笔记文档的人
- 参考[Keep a Changelog](https://keepachangelog.com/en/1.1.0/)的规范更新docs/about/changelog.md文件,包括新增功能说明和优化建议;有关版本的标签应使用[Semantic Versioning](https://semver.org/spec/v2.0.0.html)规范。
This is an open-source plugin project based on [MkDocs](https://www.mkdocs.org/), targeting users who wish to use [MkDocs](https://www.mkdocs.org/) with the [Material for MkDocs](https://squidfunk.github.io/mkdocs-material/) theme to uniformly manage and deploy study notes or note-like documents.
10
+
11
+
Your goal is to assist users in the design and development of Python projects in a way that is easy for them to understand.
12
+
13
+
When understanding user requirements, writing code, and solving problems, you should always adhere to the following principles:
14
+
15
+
## Step 1: Project Initialization
16
+
- When the user presents any requirements, first browse the README.md file in the project root directory, docs/about/architecture.md, and all code documentation to understand the project goals, architecture, and implementation methods.
17
+
18
+
## Step 2: Requirements Analysis and Development
19
+
### When Understanding User Requirements:
20
+
- Fully understand user requirements and think from the user's perspective.
21
+
- As a product manager, analyze whether there are any gaps in the requirements, discuss with users, and refine the requirements.
22
+
- Choose the simplest solution to meet user needs.
23
+
24
+
### When writing code:
25
+
- Follow the PEP 8 Python code style guide.
26
+
- Use the latest Python 3 syntax features and best practices.
27
+
- Properly utilize object-oriented programming (OOP) and functional programming paradigms.
28
+
- Leverage Python's standard library and high-quality third-party libraries from the ecosystem.
29
+
- Implement modular design to ensure code scalability, reusability, and maintainability.
30
+
- Use type hints for type checking to improve code quality.
31
+
- Write detailed docstrings and comments.
32
+
- Implement proper error handling and logging.
33
+
- Write unit tests to ensure code quality.
34
+
- When adding new features, ensure code scalability and forward compatibility without breaking existing functionality.
35
+
36
+
### When solving problems:
37
+
- Thoroughly read the relevant code files to understand the functionality and logic of all the code.
38
+
- Analyze the causes of the error and propose ideas for solving the problem.
39
+
- Engage in multiple interactions with the user and adjust the solution based on feedback.
40
+
41
+
## Step 3: Project Summary and Optimization
42
+
- After completing the tasks, reflect on the steps taken, and consider potential issues and improvement methods for the project.
43
+
- Update all project documents (located in the docs directory), including new feature descriptions and optimization suggestions.
44
+
- Update the docs/about/changelog.md file following the [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) specification, including new feature descriptions and optimization suggestions; version tags should follow the [Semantic Versioning](https://semver.org/spec/v2.0.0.html) specification.
45
+
- If there are modifications to the underlying architecture, key APIs/call chains/workflows, or project dependencies, the docs/architecture.md file and its diagrams should be updated accordingly based on the changes.
46
+
- Consider using advanced Python features such as asynchronous programming and concurrent processing to optimize performance.
47
+
- Optimize code performance, including algorithm complexity, memory usage, and execution efficiency.
48
+
49
+
## Notes
50
+
- Throughout the entire process, always refer to the [Python official documentation](https://docs.python.org/) to ensure the use of the latest Python development best practices.
51
+
- Pay special attention that this project uses [uv](https://docs.astral.sh/uv/) as the project management tool. Any commands involving Python environment or dependency operations must use the uv command-line tool, and running Python code requires the `uv run` command.
52
+
- If the user does not explicitly request "help me implement/modify/fix xxx," you should proactively provide suggestions regarding project architecture, code structure, development standards, testing, deployment, etc., and explain the reasoning behind these suggestions, but you must not make any modifications to files. You can ask the user whether they accept the suggestions, and only if the user agrees, proceed with actual modifications.
53
+
- If the user's request conflicts with this rule, you should point it out and prioritize following the user's request.
54
+
- Strictly prohibit hardcoding any information involving paths, user plugin configurations, etc. Configuration information variables from config.py in the source code should be called instead.
Copy file name to clipboardExpand all lines: docs/about/changelog.md
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
date: 2025-11-05 10:53:00
2
+
date: 2026-01-10 22:35:00
3
3
title: Changelog
4
4
permalink:
5
5
publish: true
@@ -12,6 +12,16 @@ All notable changes to this project will be documented in this file.
12
12
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
13
13
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
14
14
15
+
## 3.1.0 - 2026-01-10
16
+
17
+
### Changed
18
+
19
+
-[Commands Line Interface](../usage/cli.md) and [Asset manager](../usage/asset-manager.md) now use permalink to determine asset directory, instead of filename.
20
+
21
+
- Keep forward compatibility if can't identify permalink from note file.
22
+
23
+
- Affacted CLI commands: `new`, `remove`, `move`. For users, only notice that `new` command now requires a permalink argument.
Copy file name to clipboardExpand all lines: docs/getting-started.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
date: 2025-11-04 23:45:00
2
+
date: 2026-01-10 22:04:00
3
3
title: Getting Started
4
4
permalink:
5
5
publish: true
@@ -34,7 +34,7 @@ The most highlighted feature of the plugin is the CLI commands to manage notes,
34
34
35
35
To create a note, you can use the following command:
36
36
```bash
37
-
mkdocs-note new /path/to/note
37
+
mkdocs-note new my-permalink /path/to/note
38
38
```
39
39
40
40
It will create a note in the specified path and create a corresponding asset directory in the `assets` directory which will be co-located with the note.
Copy file name to clipboardExpand all lines: docs/index.md
+4-1Lines changed: 4 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,12 +1,15 @@
1
1
---
2
-
date: 2025-10-15 00:57:12
2
+
date: 2026-01-10 22:10:12
3
3
title: Welcome
4
4
permalink:
5
5
publish: true
6
6
---
7
7
8
8
# Welcome
9
9
10
+
!!! tip "Notice"
11
+
`v3.1.0` is now avaliable, the release now make some changes in [Commands Line Interface](usage/cli.md), See [Changelog](about/changelog.md#310---2026-01-10) for more details.
12
+
10
13
## Mkdocs Note
11
14
12
15
**MkDocs Note** is a plugin for MkDocs that automatically manages documentations in your mkdocs-based sites. It's designed to create a unified note-taking and documentation experience.
Copy file name to clipboardExpand all lines: docs/usage/cli.md
+76-15Lines changed: 76 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,5 @@
1
1
---
2
-
date: 2025-11-05 20:30:00
2
+
date: 2026-01-10 23:40:00
3
3
title: Command Line Interface
4
4
permalink:
5
5
publish: true
@@ -60,13 +60,10 @@ Create a new note file with proper asset structure.
60
60
61
61
```bash
62
62
# Create a simple note
63
-
mkdocs-note new docs/notes/my-note.md
63
+
mkdocs-note new my-permalink docs/notes/my-note.md
64
64
65
65
# Create a note in nested directory
66
-
mkdocs-note new docs/notes/python/intro.md
67
-
68
-
# Using template (feature planned)
69
-
mkdocs-note new docs/notes/article.md --template templates/article.md
66
+
mkdocs-note new python-intro docs/notes/python/intro.md
70
67
```
71
68
72
69
- **Output:**
@@ -76,7 +73,8 @@ Create a new note file with proper asset structure.
76
73
```
77
74
✅ Successfully created note
78
75
📝 Note: docs/notes/my-note.md
79
-
📁 Assets: docs/notes/assets/my-note/
76
+
🔗 Permalink: my-permalink
77
+
📁 Assets: docs/notes/assets/my-permalink/
80
78
```
81
79
82
80
### `remove`
@@ -133,7 +131,13 @@ Remove a note file and its corresponding asset directory.
133
131
134
132
### `move`
135
133
136
-
Move or rename a note file/directory and its corresponding asset directory.
134
+
Move or rename a note file/directory and its corresponding asset directory, or rename permalink value.
135
+
136
+
The `move` command supports two modes:
137
+
138
+
#### File Move Mode (default)
139
+
140
+
Move or rename a note file/directory and its corresponding asset directory. The permalink value remains unchanged, and asset directories are moved based on their permalink.
137
141
138
142
- **Usage:**
139
143
@@ -146,18 +150,24 @@ Move or rename a note file/directory and its corresponding asset directory.
146
150
147
151
- `SOURCE` (required): Current path of the note file or directory
148
152
149
-
- `DESTINATION` (required): Destination path
153
+
- `DESTINATION` (required): Destination path (or parent directory if exists)
150
154
151
155
- **Options:**
152
156
153
-
- `--keep-source-assets`: Keep the source asset directory (don't move it)
0 commit comments