diff --git a/k8s.yaml b/k8s.yaml deleted file mode 100644 index 43a115e..0000000 --- a/k8s.yaml +++ /dev/null @@ -1,56 +0,0 @@ ---- -apiVersion: apps/v1 -kind: Deployment -metadata: &metadata - name: blog - labels: &label - app: blog -spec: - selector: - matchLabels: *label - template: - metadata: *metadata - spec: - containers: - - name: nginx - image: gitea.tymur999.com/tymur999/blog:latest - ports: - - containerPort: 8000 - name: http ---- -apiVersion: v1 -kind: Service -metadata: - name: blog - labels: &labels - app: blog -spec: - selector: *labels - ports: - - port: 8000 - protocol: TCP - targetPort: http - name: http ---- -apiVersion: networking.k8s.io/v1 -kind: Ingress -metadata: - name: blog - labels: - app: blog -spec: - ingressClassName: traefik - tls: - - hosts: - - tymur999.com - rules: - - host: tymur999.com - http: - paths: - - path: / - pathType: Prefix - backend: - service: - name: blog - port: - name: http \ No newline at end of file diff --git a/package.json b/package.json index 3a176f9..809b571 100644 --- a/package.json +++ b/package.json @@ -21,7 +21,6 @@ "scripts": { "dev": "NODE_ENV=development webpack serve -c webpack.config.ts", "build": "NODE_ENV=production webpack -c webpack.config.ts", - "deploy": "gh-pages -d build", "serve": "serve -s build" }, "browserslist": { diff --git a/public/index.html b/public/index.html index 0f13f18..4a253ef 100644 --- a/public/index.html +++ b/public/index.html @@ -2,7 +2,6 @@ - (null); - const router = useRouter(); - - useEffect(() => { - const params = new URLSearchParams(location.search); - if(params.has(ARTICLE_QUERY)) { - const id = Number.parseInt(params.get(ARTICLE_QUERY)!); - setArticle(ARTICLES[id] ?? null); - } - }, [setArticle]); - - useEffect(() => { - if(!article) { - // query param - const params = new URLSearchParams(location.search); - if(params.has(ARTICLE_QUERY)) { - router.replacePage(location.pathname as Path); - } - } else { - const id = ARTICLES.indexOf(article); - router.replacePage(`${location.pathname}?${ARTICLE_QUERY}=${id}` as Path); - } - }, [article]); - return diff --git a/public/favicon.ico b/src/img/favicon.ico similarity index 100% rename from public/favicon.ico rename to src/img/favicon.ico diff --git a/staticwebapp.config.json b/staticwebapp.config.json deleted file mode 100644 index a98bfd8..0000000 --- a/staticwebapp.config.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "routes": [ - { - "route": "/about", - "rewrite": "/" - }, - { - "route": "/articles", - "rewrite": "/" - } - ] -} \ No newline at end of file diff --git a/webpack.config.ts b/webpack.config.ts index f816bd2..b8a0f78 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -139,6 +139,7 @@ const config: webpack.Configuration = { plugins: [ new HtmlWebpackPlugin({ template: path.resolve(import.meta.dirname, "public/index.html"), + favicon: "./src/img/favicon.ico", inject: true, }), new webpack.DefinePlugin({