Skip to content

Commit 1378241

Browse files
committed
2 parents 4a4084b + 5a043ad commit 1378241

27 files changed

+598
-58
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ _vendor/
88
/playwright-report/
99
/blob-report/
1010
/playwright/.cache/
11+
*.exe
1112
.env
1213
.venv

adminEditor/buildAndRun

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
go build main.go && .\main.exe

adminEditor/bundle.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

adminEditor/bundle.js

Whitespace-only changes.

adminEditor/bundle.min.css

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

adminEditor/bundle.min.js

Whitespace-only changes.

adminEditor/bundle_script.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
import requests
2+
import csscompressor
3+
from jsmin import jsmin
4+
5+
# List of CDN URLs for CSS and JS files
6+
css_urls = [
7+
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/css/bootstrap.min.css',
8+
'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css'
9+
'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.62.0/codemirror.min.css'
10+
]
11+
12+
js_urls = [
13+
'https://cdnjs.cloudflare.com/ajax/libs/bootstrap/5.2.3/js/bootstrap.bundle.min.js'
14+
'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.62.0/codemirror.min.js'
15+
'https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.62.0/mode/markdown/markdown.min.js'
16+
]
17+
18+
# Function to download and bundle files
19+
def bundle_files(urls, output_file, minify=False):
20+
content = ''
21+
for url in urls:
22+
response = requests.get(url)
23+
if response.status_code == 200:
24+
content += response.text + '\n'
25+
else:
26+
print(f"Failed to download {url}")
27+
28+
if minify:
29+
if output_file.endswith('.css'):
30+
content = csscompressor.compress(content)
31+
elif output_file.endswith('.js'):
32+
content = jsmin(content)
33+
34+
with open(output_file, 'w') as bundle:
35+
bundle.write(content)
36+
37+
# Bundle and minify CSS and JS files
38+
bundle_files(css_urls, 'bundle.css')
39+
bundle_files(css_urls, 'bundle.min.css', minify=True)
40+
bundle_files(js_urls, 'bundle.js')
41+
bundle_files(js_urls, 'bundle.min.js', minify=True)
42+
43+
print("Bundling and minification complete!")

adminEditor/config.json

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,42 @@
55
"link": "[link text](url)",
66
"code": "`code`",
77
"image": "![alt text](image_url)",
8-
"file": "{{< file full=\"false\" path=\"./config/_default/languages.toml\" id=\"file-collapse-1\" >}}"
8+
"standardList": "- Item",
9+
"numberedList": "1. Item",
10+
"checkboxList": "- [ ] Task",
11+
"coloredCode": "```language\ncode\n```",
12+
"horizontalLine": "---",
13+
"internalLink": "{{< link \"path/to/file\" >}}text{{< /link >}}",
14+
"mediaSelect": "![alt text](/img/blog/image.jpg)"
915
},
1016
"icons": {
1117
"bold": "bold",
1218
"italic": "italic",
1319
"link": "link",
1420
"code": "code",
1521
"image": "image",
16-
"file": "file"
22+
"standardList": "list",
23+
"numberedList": "list-ol",
24+
"checkboxList": "tasks",
25+
"coloredCode": "code",
26+
"horizontalLine": "minus",
27+
"internalLink": "file-alt",
28+
"mediaSelect": "photo-video"
1729
},
1830
"server": {
1931
"port": 8081,
2032
"showURLOnStart": true,
21-
"germanFolder": "E:/git/d-oit/blog/d-oit.github.io/content/de/blog",
22-
"englishFolder": "E:/git/d-oit/blog/d-oit.github.io/content/en/blog"
33+
"germanFolder": "../content/de/blog",
34+
"englishFolder": "../content/en/blog",
35+
"mediaFolder": "../media-data",
36+
"assetFolder": "../assets/img/blog",
37+
"imageResize": {
38+
"method": "fit",
39+
"maxWidth": 2800
40+
},
41+
"thumbnailResize": {
42+
"method": "fit",
43+
"maxWidth": 640
44+
}
2345
}
2446
}

adminEditor/go.mod

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
11
module markdown-editor
22

33
go 1.23.1
4+
5+
require (
6+
github.com/disintegration/imaging v1.6.2 // indirect
7+
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 // indirect
8+
)

adminEditor/go.sum

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
github.com/disintegration/imaging v1.6.2 h1:w1LecBlG2Lnp8B3jk5zSuNqd7b4DXhcjwek1ei82L+c=
2+
github.com/disintegration/imaging v1.6.2/go.mod h1:44/5580QXChDfwIclfc/PCwrr44amcmDAg8hxG0Ewe4=
3+
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8 h1:hVwzHzIUGRjiF7EcUjqNxk3NCfkPxbDKRdnNE1Rpg0U=
4+
golang.org/x/image v0.0.0-20191009234506-e7c1f5e7dbb8/go.mod h1:FeLwcggjj3mMvU+oOTbSwawSJRM1uh48EjtB4UJZlP0=
5+
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=

0 commit comments

Comments
 (0)