Merge pull request 'rework of patch for streamlit to display my favicon and title when paste url in messengers with preload-function' (#2) from better_streamlit_patch into main

Reviewed-on: #2
This commit was merged in pull request #2.
This commit is contained in:
2025-08-24 14:28:10 +02:00
3 changed files with 7 additions and 48 deletions

View File

@@ -15,7 +15,13 @@ RUN pip install --no-cache-dir -r requirements.txt
COPY ./app /app
COPY ./patch-streamlit/* /usr/local/lib/python3.13/site-packages/streamlit/static/
# ein bisschen Patchen um auch beim Bookmarken oder Versenden der Webadresse per Messenger den richtigen Titel und das
# richtige Favicon zu verwenden/sehen
COPY ./app/images/favicon.ico /usr/local/lib/python3.13/site-packages/streamlit/static/favicon.ico
RUN sed -i -e 's|favicon\.png|favicon.ico|' \
-e 's|<title>.*</title>|<title>tebarius Mysteryhelfer (web)</title>|' \
/usr/local/lib/python3.13/site-packages/streamlit/static/index.html
EXPOSE 8501

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 KiB

View File

@@ -1,47 +0,0 @@
<!--
Copyright (c) Streamlit Inc. (2018-2022) Snowflake Inc. (2022-2025)
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta
name="viewport"
content="width=device-width, initial-scale=1, shrink-to-fit=no"
/>
<link rel="shortcut icon" href="./favicon.ico" />
<link
rel="preload"
href="./static/media/SourceSansVF-Upright.ttf.BsWL4Kly.woff2"
as="font"
type="font/woff2"
crossorigin
/>
<title>tebarius Mysteryhelfer (web)</title>
<!-- initialize window.prerenderReady to false and then set to true in React app when app is ready for indexing -->
<script>
window.prerenderReady = false
</script>
<script type="module" crossorigin src="./static/js/index.BTGIlECR.js"></script>
<link rel="stylesheet" crossorigin href="./static/css/index.CJVRHjQZ.css">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<div id="root"></div>
</body>
</html>