Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using different base results into error 404 on root link #4429

Closed
4 tasks done
dudo50 opened this issue Dec 17, 2024 · 1 comment
Closed
4 tasks done

Using different base results into error 404 on root link #4429

dudo50 opened this issue Dec 17, 2024 · 1 comment
Labels
question This is a question rather than an issue or pull request

Comments

@dudo50
Copy link

dudo50 commented Dec 17, 2024

Describe the bug

How can I set my root link aka - "/" to redirect into "/base"?

There is no guide for this anywhere. Is it possible?

Reproduction

Here is my config.js

export default {
    title: 'ParaSpell',
    description: 'Make world more connected with XCM.',
    base: '/docs/',
    head: [
      [
        'link',
        { rel: 'icon', type: 'image/x-icon',  href: '/docs/favicon.ico' }
      ]
    ],
    themeConfig: {
        notFound: {
          title: 'PAGE NOT FOUND',
          quote: "ParaSpell docs use \"/docs/\", make sure you have entered it.", // set to '' to hide
          linkLabel: '/docs/', // aria-label
          linkText: 'Proceed to ParaSpell documentation',
          code: '404'
        },
        logo: '/paraspell.png',

        socialLinks: [
            { icon: 'github', link: 'https://github.com/paraspell' },
            { icon: 'twitter', link: 'https://twitter.com/paraspell' },
        ],
        sidebar: [
          {
            items: [
                { text: '<div style="display: flex; align-items: center;"><span>Welcome to</span><img width="90" alt="ParaSpell logo" src="https://user-images.githubusercontent.com/55763425/251588903-bcf72b05-bdf7-46d8-b804-16b0e3236792.png" style="margin: 0 5px;"></div>', link: '/' },
            ]
          },
          {
            text: '<div style="display: flex; align-items: center;"><img width="90" alt="ParaSpell logo" src="https://user-images.githubusercontent.com/55763425/251588903-bcf72b05-bdf7-46d8-b804-16b0e3236792.png"><span>XCM SDK</span></div>',
            items: [
              { text: 'Getting started', link: '/sdk/getting-started' },
              { text: 'Send XCM', link: '/sdk/xcmPallet' },
              { text: 'Asset query', link: '/sdk/AssetPallet' },
              { text: 'Query XCM pallets', link: '/sdk/NodePallets' },
            ]
          },
          {
            text: ' <div style="display: flex; align-items: center;"><img width="90" alt="Lightspell logo" src="https://user-images.githubusercontent.com/55763425/251588168-4855abc3-445a-4207-9a65-e891975be62c.png"><span>XCM API</span></div>',
            items: [
              { text: 'Getting started', link: '/api/g-started' },
              { text: 'XCM SDK🪄', link: '/api/xcmP' },
              { text: 'XCM Router☄️', link: '/api/xcmRouter' },
              { text: 'XCM Analyser🔎', link: '/api/xcmAnalyser' },
              { text: 'Upgrade request amount', link: '/api/upgrade' },
              { text: 'Deploy API yourself', link: '/api/deploy' },
            ]
          },
          {
            text: '<div style="display: flex; align-items: center;"><img width="90" alt="Spellrouter logo" src="https://raw.githubusercontent.com/paraspell/presskit/refs/heads/main/logos_spellrouter/Full%20name.png"><span>XCM ROUTER</span></div>',
            items: [
              { text: 'Getting started', link: '/router/getting-strtd' },
              { text: 'Send routed XCM', link: '/router/router-use' },
            ]
          },
          {
            text: 'XCM analyser 🔎',
            items: [
              { text: 'Getting started', link: '/analyser/getng-strtd' },
              { text: 'Convert multilocations', link: '/analyser/analyser-use' },
            ]
          },
          {
            text: 'XCM visualizator 🖼️',
            items: [
              { text: 'Getting started', link: '/visualizator/getting-start' },
              { text: 'User guide', link: '/visualizator/user-guide' },
            ]
          },
          {
            text: 'XCM playground 🛝',
            items: [
              { text: 'Getting started', link: '/tools/playground' },

            ]
          },
          {
            text: 'Might interest you 🔭',
            items: [
              { text: 'Interesting links', link: '/links' },
              { text: 'List of supported chains', link: '/supported' },
            ]
          },
        ]
    }
  }

The documentation is exposed at url.github.io/docs/ ... How do I fix when user uses url.github.io to redirect him into url.github.io/docs/?

Expected behavior

Should redirect from root to base

System Info

MacOS

Additional context

No response

Validations

@dudo50 dudo50 added the bug: pending triage Maybe a bug, waiting for confirmation label Dec 17, 2024
@brc-dd
Copy link
Member

brc-dd commented Dec 17, 2024

You’ll need to create a repo of form <user>.github.io to serve things at /. Put an html file similar to https://www.w3.org/TR/WCAG20-TECHS/H76.html there to redirect. There isn’t anything that can be done at vitepress level for this.

@brc-dd brc-dd added question This is a question rather than an issue or pull request and removed bug: pending triage Maybe a bug, waiting for confirmation labels Dec 17, 2024
@brc-dd brc-dd closed this as not planned Won't fix, can't repro, duplicate, stale Dec 17, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question This is a question rather than an issue or pull request
Projects
None yet
Development

No branches or pull requests

2 participants