hadadrjt commited on
Commit
a974556
·
1 Parent(s): 47d9885

ai: Allow Spaces to be indexed by search engines.

Browse files

This configuration is required to turn Open-WebUI into a website and to ensure it can be indexed by search engines.

Files changed (5) hide show
  1. BingSiteAuth.xml +4 -0
  2. Dockerfile +26 -0
  3. google15aba15fe250d693.html +1 -0
  4. robots.txt +2 -0
  5. sitemap.xml +12 -0
BingSiteAuth.xml ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ <?xml version="1.0"?>
2
+ <users>
3
+ <user>6F0E69E47393F89FAEEEE8B9212EBAE4</user>
4
+ </users>
Dockerfile CHANGED
@@ -19,6 +19,32 @@ COPY --chown=$UID:$GID webui.db /app/backend/data/
19
  # and Secret Environment settings of Hugging Face Spaces.
20
  RUN chmod 555 /app/backend/data/webui.db
21
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
22
  # Open the port so the application can be accessed
23
  EXPOSE 8000
24
 
 
19
  # and Secret Environment settings of Hugging Face Spaces.
20
  RUN chmod 555 /app/backend/data/webui.db
21
 
22
+ # Search Engine Optimization (SEO)
23
+ # Robots Exclusion Protocol
24
+ RUN search='<meta name="robots" content="noindex,nofollow"' && \
25
+ replace='<meta name="robots" content="index,follow"' && \
26
+ find /app -type f -name '*.html' -exec grep -l "$search" {} \; | \
27
+ while IFS= read -r file; do \
28
+ echo "Processing: $file" && \
29
+ if sed -i "s|$search|$replace|g" "$file"; then \
30
+ echo "Success: $file updated"; \
31
+ else \
32
+ echo "Error: failed to update $file"; \
33
+ exit 1; \
34
+ fi; \
35
+ done
36
+ # https://umint-ai.hf.space/robots.txt
37
+ COPY --chown=$UID:$GID robots.txt /app/build/
38
+ # Sitemaps
39
+ # https://umint-ai.hf.space/sitemap.xml
40
+ COPY --chown=$UID:$GID sitemap.xml /app/build/
41
+ # Google Search Console Tools
42
+ # https://umint-ai.hf.space/google15aba15fe250d693.html
43
+ COPY --chown=$UID:$GID google15aba15fe250d693.html /app/build/
44
+ # Bing Webmaster Tools
45
+ # https://umint-ai.hf.space/BingSiteAuth.xml
46
+ COPY --chown=$UID:$GID BingSiteAuth.xml /app/build/
47
+
48
  # Open the port so the application can be accessed
49
  EXPOSE 8000
50
 
google15aba15fe250d693.html ADDED
@@ -0,0 +1 @@
 
 
1
+ google-site-verification: google15aba15fe250d693.html
robots.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ User-agent: *
2
+ Allow: /
sitemap.xml ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <!--
3
+ SPDX-FileCopyrightText: Hadad <[email protected]>
4
+ SPDX-License-Identifier: MIT
5
+ -->
6
+ <urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
7
+ <url>
8
+ <loc>https://umint-ai.hf.space</loc>
9
+ <changefreq>daily</changefreq>
10
+ <priority>1.0</priority>
11
+ </url>
12
+ </urlset>