Code Monkey home page Code Monkey logo

Comments (9)

brc-dd avatar brc-dd commented on August 16, 2024 1

from vitepress.

brc-dd avatar brc-dd commented on August 16, 2024

Disable auto-minify in your host and vitepress is not removing that .html either. You probably have clean urls enabled in your host / or have auto-redirects set up.

from vitepress.

nbari avatar nbari commented on August 16, 2024

Hi @brc-dd thanks for the prompt reply, this is my config.mjs:

import { defineConfig } from "vitepress";

// https://vitepress.dev/reference/site-config
export default defineConfig({
	title: "s3m",
	description: "A command-line tool for storing and sharing files on S3",
	head: [
		[
			"link",
			{
				rel: "apple-touch-icon",
				sizes: "120x120",
				href: "/assets/favicons/apple-touch-icon-120x120.png",
			},
		],
		["link", { rel: "icon", href: "/favicon.ico" }],
	],
	themeConfig: {
		// https://vitepress.dev/reference/default-theme-config
		nav: [
			{ text: "Issues", link: "https://github.com/s3m/s3m/issues" },
			{ text: "About", link: "/about" },
		],

		sidebar: [
			{
				text: "Commands",
				items: [
					{ text: "acl (ACL)", link: "/acl" },
					{ text: "cb (Create bucke)", link: "/cb" },
					{ text: "get (download)", link: "/get" },
					{ text: "ls (list)", link: "/ls" },
					{ text: "put (stream)", link: "/stream" },
					{ text: "rm (delete)", link: "/rm" },
					{ text: "share", link: "/share" },
					{ text: "show", link: "/show" },
				],
			},
			{
				text: "How it works",
				link: "/how-it-works",
			},
			{
				text: "Install",
				link: "/install",
			},
			{
				text: "config.yml",
				link: "/config",
			},
			{
				text: "Stream",
				link: "/stream",
			},
		],

		socialLinks: [{ icon: "github", link: "https://github.com/s3m/s3m" }],

		footer: {
			message: "Released under the BSD License.",
		},
	},
});

But where do disable auto-minify and check for clean urls / auto-redirects?

from vitepress.

brc-dd avatar brc-dd commented on August 16, 2024

Where are you hosting your site?

from vitepress.

nbari avatar nbari commented on August 16, 2024

In cloudflare pages

from vitepress.

brc-dd avatar brc-dd commented on August 16, 2024

for auto-redirect thing maybe check Rules > Page Rules / Transform Rules and remove those

from vitepress.

nbari avatar nbari commented on August 16, 2024

Hi, many thanks I change it to:

image

Regarding transform rules I don't have any, this one is only enable but I think is not a problem:
image

from vitepress.

nbari avatar nbari commented on August 16, 2024

Hi @brc-dd 🥇 many thanks it is working now

from vitepress.

brc-dd avatar brc-dd commented on August 16, 2024

It's still not correct though. It should not send 308 for config.html:

image

There might some other option there 👀

Ah looks like there is no option - https://community.cloudflare.com/t/is-there-an-option-prevent-removing-the-html-suffix/494412

I think you can try enabling vitepress' cleanUrl too to match the behavior:

export default defineConfig({
  cleanUrls: true,
  // ... other stuff ...
})

from vitepress.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.