θΏ™ζ˜―indexlocζδΎ›ηš„ζœεŠ‘οΌŒδΈθ¦θΎ“ε…₯任何密码
Skip to content

Feat | PWA Support | Dark Theme Enhancements | New Deployment Workflow #4016

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
5d0542e
:wrench: add external nginx network and update service port mapping i…
christiandesantis Dec 17, 2024
9e86876
:wrench: add pwa manifest and meta tags
christiandesantis Dec 17, 2024
df77b4f
:truck: add pwa meta tags from meta generator instead of directly to …
christiandesantis Dec 17, 2024
14f8bb2
:art: replace single quotes with double quotes for consistency
christiandesantis Dec 17, 2024
3dcd2cc
:wrench: remove theme and background colors from manifest.json
christiandesantis Dec 17, 2024
cf0b659
:lipstick: add dark mode support for body background color
christiandesantis Dec 17, 2024
9618911
:fire: unnecessary blank line in index.html
christiandesantis Dec 17, 2024
cc02cac
:children_crossing: update viewport meta tag to include max scale to …
christiandesantis Dec 17, 2024
4dbb7f5
:children_crossing: prevent overscroll behavior for mobile
christiandesantis Dec 17, 2024
0f6111c
Revert ":wrench: add external nginx network and update service port m…
christiandesantis Jun 13, 2025
5895e85
:wrench: add github actions workflow for deployment
christiandesantis Jun 13, 2025
e0db743
:wrench: update deploy workflow to navigate to docker directory befor…
christiandesantis Jun 13, 2025
83544dd
fix: only run if docker scout if credentials are available
christiandesantis Jun 13, 2025
072c05f
:wrench: ensure .env file is created if it doesn't exist during deplo…
christiandesantis Jun 17, 2025
dbe8c4d
:recycle: format meta tag generator file with yarn lint
christiandesantis Jun 17, 2025
634b56e
Merge branch 'master' into master
christiandesantis Jun 17, 2025
e6be370
:truck: add pwa meta tags from meta generator instead of directly to …
christiandesantis Dec 17, 2024
3573cc5
:wrench: ensure docker service restarts unless-stopped
christiandesantis Jun 18, 2025
573712f
:recycle: lint css file
christiandesantis Jun 18, 2025
f73d361
:bug: ensure the pwa tags are preserved when using custom branding
christiandesantis Jun 18, 2025
39bae6a
:bug: ensure the custom title is added in meta tags
christiandesantis Jun 19, 2025
e06f5a1
uncheck changes to core workflows
timothycarambat Jul 2, 2025
45238d9
patch max-scale on index.html
timothycarambat Jul 2, 2025
3b713f7
patch max-scale on index.html
timothycarambat Jul 2, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-and-push-image-semver.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ jobs:
# About VEX attestations https://docs.docker.com/scout/explore/exceptions/
# Justifications https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md#status-justifications
- name: Add VEX attestations
if: steps.dockerhub.outputs.enabled == 'true'
env:
CVE_EXCEPTIONS: ${{ steps.cve-list.outputs.CVE_EXCEPTIONS }}
run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/build-and-push-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ jobs:
# About VEX attestations https://docs.docker.com/scout/explore/exceptions/
# Justifications https://github.com/openvex/spec/blob/main/OPENVEX-SPEC.md#status-justifications
- name: Add VEX attestations
if: steps.dockerhub.outputs.enabled == 'true'
env:
CVE_EXCEPTIONS: ${{ steps.cve-list.outputs.CVE_EXCEPTIONS }}
run: |
Expand Down
4 changes: 4 additions & 0 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@

<link rel="icon" href="/favicon.png" />
<link rel="apple-touch-icon" href="/favicon.png" />
<!-- PWA -->
<meta name="mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<link rel="manifest" href="/manifest.json" />
</head>

<body>
Expand Down
6 changes: 6 additions & 0 deletions frontend/public/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"name":"AnythingLLM",
"short_name":"AnythingLLM",
"display":"standalone",
"orientation":"portrait"
}
12 changes: 12 additions & 0 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,18 @@ body {
background-color: white;
}

@media (max-width: 600px) {
html {
overscroll-behavior: none;
}
}

@media (prefers-color-scheme: dark) {
body {
background-color: #0e0f0f;
}
}

a {
color: inherit;
text-decoration: none;
Expand Down
109 changes: 95 additions & 14 deletions server/utils/boot/MetaGenerator.js
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,19 @@ class MetaGenerator {

{ tag: "link", props: { rel: "icon", href: "/favicon.png" } },
{ tag: "link", props: { rel: "apple-touch-icon", href: "/favicon.png" } },
// PWA tags
{
tag: "meta",
props: { name: "mobile-web-app-capable", content: "yes" },
},
{
tag: "meta",
props: {
name: "apple-mobile-web-app-status-bar-style",
content: "black-translucent",
},
},
{ tag: "link", props: { rel: "manifest", href: "/manifest.json" } },
];
}

Expand Down Expand Up @@ -168,10 +181,19 @@ class MetaGenerator {
async #fetchConfg() {
this.#log(`fetching custom meta tag settings...`);
const { SystemSettings } = require("../../models/systemSettings");
const customTitle = await SystemSettings.getValueOrFallback(

let customTitle = await SystemSettings.getValueOrFallback(
{ label: "meta_page_title" },
null
);

if (!customTitle) {
customTitle = await SystemSettings.getValueOrFallback(
{ label: "custom_app_name" },
null
);
}

const faviconURL = await SystemSettings.getValueOrFallback(
{ label: "meta_page_favicon" },
null
Expand All @@ -181,19 +203,78 @@ class MetaGenerator {
if (customTitle === null && faviconURL === null) {
this.#customConfig = this.#defaultMeta();
} else {
this.#customConfig = [
{
tag: "link",
props: { rel: "icon", href: this.#validUrl(faviconURL) },
},
{
tag: "title",
props: null,
content:
customTitle ??
"AnythingLLM | Your personal LLM trained on anything",
},
];
// When custom settings exist, include all default meta tags but override specific ones
this.#customConfig = this.#defaultMeta().map((tag) => {
// Override favicon link
if (tag.tag === "link" && tag.props?.rel === "icon") {
return {
tag: "link",
props: { rel: "icon", href: this.#validUrl(faviconURL) },
};
}
// Override page title
if (tag.tag === "title") {
return {
tag: "title",
props: null,
content:
customTitle ??
"AnythingLLM | Your personal LLM trained on anything",
};
}
// Override meta title
if (tag.tag === "meta" && tag.props?.name === "title") {
return {
tag: "meta",
props: {
name: "title",
content:
customTitle ??
"AnythingLLM | Your personal LLM trained on anything",
},
};
}
// Override og:title
if (tag.tag === "meta" && tag.props?.property === "og:title") {
return {
tag: "meta",
props: {
property: "og:title",
content:
customTitle ??
"AnythingLLM | Your personal LLM trained on anything",
},
};
}
// Override twitter:title
if (tag.tag === "meta" && tag.props?.property === "twitter:title") {
return {
tag: "meta",
props: {
property: "twitter:title",
content:
customTitle ??
"AnythingLLM | Your personal LLM trained on anything",
},
};
}
// Override apple-touch-icon if custom favicon is set
if (
tag.tag === "link" &&
tag.props?.rel === "apple-touch-icon" &&
faviconURL
) {
return {
tag: "link",
props: {
rel: "apple-touch-icon",
href: this.#validUrl(faviconURL),
},
};
}
// Return original tag for everything else (including PWA tags)
return tag;
});
}

return this.#customConfig;
Expand Down