Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
0f8bfb63
Commit
0f8bfb63
authored
Dec 29, 2023
by
Steven
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: update index.html
parent
4cd01ece
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
frontend.go
server/frontend/frontend.go
+2
-1
index.html
web/index.html
+2
-1
No files found.
server/frontend/frontend.go
View file @
0f8bfb63
...
@@ -79,7 +79,8 @@ func (s *FrontendService) registerRoutes(e *echo.Echo) {
...
@@ -79,7 +79,8 @@ func (s *FrontendService) registerRoutes(e *echo.Echo) {
}
}
// Inject memo metadata into `index.html`.
// Inject memo metadata into `index.html`.
indexHTML
:=
strings
.
ReplaceAll
(
rawIndexHTML
,
"<!-- memos.metadata -->"
,
generateMemoMetadata
(
memo
,
creator
)
.
String
())
indexHTML
:=
strings
.
ReplaceAll
(
rawIndexHTML
,
"<!-- memos.metadata.head -->"
,
generateMemoMetadata
(
memo
,
creator
)
.
String
())
indexHTML
=
strings
.
ReplaceAll
(
indexHTML
,
"<!-- memos.metadata.body -->"
,
fmt
.
Sprintf
(
"<!-- memos.memo.%d -->"
,
memo
.
ID
))
return
c
.
HTML
(
http
.
StatusOK
,
indexHTML
)
return
c
.
HTML
(
http
.
StatusOK
,
indexHTML
)
})
})
}
}
...
...
web/index.html
View file @
0f8bfb63
...
@@ -6,11 +6,12 @@
...
@@ -6,11 +6,12 @@
<meta
name=
"theme-color"
media=
"(prefers-color-scheme: light)"
content=
"#f4f4f5"
/>
<meta
name=
"theme-color"
media=
"(prefers-color-scheme: light)"
content=
"#f4f4f5"
/>
<meta
name=
"theme-color"
media=
"(prefers-color-scheme: dark)"
content=
"#27272a"
/>
<meta
name=
"theme-color"
media=
"(prefers-color-scheme: dark)"
content=
"#27272a"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, user-scalable=no"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1, user-scalable=no"
/>
<!-- memos.metadata -->
<!-- memos.metadata
.head
-->
<title>
Memos
</title>
<title>
Memos
</title>
</head>
</head>
<body>
<body>
<div
id=
"root"
></div>
<div
id=
"root"
></div>
<script
type=
"module"
src=
"/src/main.tsx"
></script>
<script
type=
"module"
src=
"/src/main.tsx"
></script>
<!-- memos.metadata.body -->
</body>
</body>
</html>
</html>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment