mirror of
https://gitea.com/gitea/docs.git
synced 2026-07-22 02:37:42 +00:00
Pre-fill suggested New File 'name' and 'content' with Query Params (#16556)
* feature: add (GitHub-style) querystrings for pre-filling new file content * docs: add query parameters for new files
This commit is contained in:
@@ -24,3 +24,22 @@ If you are looking for [CI/CD](https://gitea.com/gitea/awesome-gitea#user-conten
|
|||||||
an [SDK](https://gitea.com/gitea/awesome-gitea#user-content-sdk),
|
an [SDK](https://gitea.com/gitea/awesome-gitea#user-content-sdk),
|
||||||
or even some extra [themes](https://gitea.com/gitea/awesome-gitea#user-content-themes),
|
or even some extra [themes](https://gitea.com/gitea/awesome-gitea#user-content-themes),
|
||||||
you can find them listed in the [awesome-gitea](https://gitea.com/gitea/awesome-gitea) repository!
|
you can find them listed in the [awesome-gitea](https://gitea.com/gitea/awesome-gitea) repository!
|
||||||
|
|
||||||
|
## Pre-Fill New File name and contents
|
||||||
|
|
||||||
|
If you'd like to open a new file with a given name and contents,
|
||||||
|
you can do so with query parameters:
|
||||||
|
|
||||||
|
```txt
|
||||||
|
GET /{{org}}/{{repo}}/_new/{{filepath}}
|
||||||
|
?filename={{filename}}
|
||||||
|
&value={{content}}
|
||||||
|
```
|
||||||
|
|
||||||
|
For example:
|
||||||
|
|
||||||
|
```txt
|
||||||
|
GET https://git.example.com/johndoe/bliss/_new/articles/
|
||||||
|
?filename=hello-world.md
|
||||||
|
&value=Hello%2C%20World!
|
||||||
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user