Ver código fonte

2025-05-24 11:57:18

john.hong 2 meses atrás
pai
commit
9c99180696
4 arquivos alterados com 48 adições e 0 exclusões
  1. 11 0
      README.md
  2. 1 0
      ant-design-vue
  3. 1 0
      docker-compose.yml
  4. 35 0
      nginx.conf

+ 11 - 0
README.md

@@ -48,3 +48,14 @@ module.exports = {
 127.0.0.1 2x-ant-design.hht.test
 127.0.0.1 better-scroll-docs.hht.test
 ```
+
+
+# 下载
+
+## git clone
+下载 gh-pages 分支的最后一次提交
+```
+git clone --branch gh-pages --depth=1 --single-branch https://github.com/ant-design/4x.ant.design.git
+```
+
+git clone --branch gh-pages --depth=1 --single-branch https://github.com/vueComponent/ant-design-vue.git

+ 1 - 0
ant-design-vue

@@ -0,0 +1 @@
+Subproject commit 59b2184c7e2d438d61c8162e8fd1811942f0679a

+ 1 - 0
docker-compose.yml

@@ -15,6 +15,7 @@ services:
       - ./3x.ant.design:/usr/share/nginx/html/3x.ant.design:ro
       - ./2x.ant.design:/usr/share/nginx/html/2x.ant.design:ro
       - ./better-scroll-docs:/usr/share/nginx/html/better-scroll-docs:ro
+      - ./ant-design-vue:/usr/share/nginx/html/ant-design-vue:ro
       - ./logs:/var/log/nginx
     restart: always
     networks:

+ 35 - 0
nginx.conf

@@ -466,6 +466,41 @@ http {
             rewrite ^.*$ /index.html last;
         }
     }
+    
+     # ant-design-vue 子域名配置
+    server {
+        listen 80;
+        server_name ant-design-vue.hht.test;
+
+        access_log /var/log/nginx/ant-design-vue.access.log main;
+        error_log /var/log/nginx/ant-design-vue.error.log warn;
+    
+        location / {
+            root /usr/share/nginx/html/ant-design-vue;
+            index index.html index.htm;
+            try_files $uri $uri/ @router;
+
+            # 针对不同类型的文件设置不同的缓存时间
+            location ~* \.(jpg|jpeg|png|gif|ico|css|js)$ {
+                expires 7d;
+                add_header Cache-Control "public, no-transform";
+            }
+            
+            location ~* \.(html|htm)$ {
+                expires 1h;
+                add_header Cache-Control "public, no-transform";
+            }
+
+            # 跨域支持
+            add_header 'Access-Control-Allow-Origin' $cors_origin always;
+            add_header 'Access-Control-Allow-Methods' 'GET, POST, OPTIONS' always;
+            add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
+            add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
+        }
+        location @router {
+            rewrite ^.*$ /index.html last;
+        }
+    }
 
     # better-scroll 子域名配置
     server {