How do I customise the 404 page? - docusaurus

I would like to know how to change the text on the 404 page to be custom not the generic message. How would I go about this? The standard 404 page looks like
this.

You need to swizzle it.
1) Open a Terminal/Power Shell inside your docusaurus folder.
2) Run:
npm run swizzle #docusaurus/theme-classic NotFound
3) Edit the file src/theme/NotFound.js.
Reference: https://github.com/facebook/docusaurus/discussions/6030

Related

How to get rid of react manifest.json error

I'm trying to use the json-server and when I run the command json-server --watch jb.json the home link, e.g., https://localhost:3000, is not rendered due to the following error in the console.
Essentially this image below is where I'm trying to land when clicking on the link.
✅ Solution: After asking around, I found that creating a json-server.json file in the root of your project and adding the following custom configuration works for me:
{
.`.`.`,
"static": "./node_modules/json-server/public"
}
Essentially, you call the home route, e.g., https://localhost:3000, from the static root directory, not the public directory, because it's located in your app. https://github.com/typicode/json-server/issues/1100

Call nested Nuxt 3 route with absolute URL

Just a quick question, that I couldn't find an answer to.
I have two routes "/" and "/auth".
-- pages
-- auth
-- index.vue
-- index.vue
When I call "/" everything is fine. When I call "/auth" with a <NuxtLink to="/auth" /> component, everything works.
But when I call the url http://localhost:3000/auth directly, I get the base Nuxt 3 404 error screen.
Is this a config setting I'm missing?
Cheers
I found the answer myself:
If I want to use yarn dev I need to first call yarn generate.
Hope this helps someone else, too.

Direct nested URL fails with error "Uncaught SyntaxError: Unexpected token '<'" - Create React App/React-router-dom/Netlify

I've got an app created with create-react-app (with react-router-dom) and deployed with Netlify. Whenever I try and route to a page through a direct (nested) URL, such as 'https://jvcparry.com/products/indie', it fails to load a page and gives the errors
Uncaught SyntaxError: Unexpected token '<' main.e3eaf229.chunk.js:1
However when I navigate the deployed version through links, everything loads fine. I also don't get this error when I'm running the app locally, which I guess means it must be something to do with deployment?
I've trawled through all the other posts I can find with this error, and also things to do with Netlify/CRA deployments. I've got a _redirects file with '/* /index.html 200' in it in my /public folder, and I've tried refactoring my routes to use code-splitting but that's made no difference.
My code is on github here: https://github.com/NatClamp/jvcparry
Deployed version is here: https://jvcparry.com/
and if you go to https://jvcparry.com/products/indie you'll see the error I'm getting.
Can anyone shed any light on this? Thanks in advance
A rigid but working solution is to update _redirects file this way:
/*/main.e3eaf229.chunk.js /main.e3eaf229.chunk.js 200
/* /index.html 200
You can also be updating this file every time you build new js bundle during your CICD run

Have error for converting to website from web app

Hi I convert the web app to web site. I follow this link to do it. However I have an error for a few pages which are .ascx and the Global.asax. The error is “Context is not a member of …”. I also exclude the .vbroj file.
I searched the web for fixing the above error and found that link http://forums.asp.net/t/1148374.aspx?Context+is+not+a+member+of+Page+name+
. Although I did what it said, but the error didn’t go away. Would someone tell me what I can solve the issue.
Summary what I did:
1. Delete the .desginer file
2. Changed Codebehind to CodeFile
3. Change the path of the code file with full path within the root directory.
For example:
Form CodeFile=" Footer.ascx.vb" Inherits="Testing.Footer"
To CodeFile="~/Templates/Footer.ascx.vb" Inherits="Testing.Footer"
I solved the problem by deleted the namespace of inherits and change the full path of CodeFile. Also change the full path of #Reference

enchant_broker_init() performance issue

I have a web site which uses enchant enchant_broker_init().
I`m not sure why but enchant_broker_init() takes something like 19~ seconds to load the page.
Once I remove this function page loads right away.
anyone has an idea why this is? or how can I debug it?
Thanks
Steps to install php enchant plugin.
APACHE
http://apache.mivzakim.net//httpd/binaries/win32/#warnings
PHP
http://windows.php.net/download/
ENABLE PHP ON APACHE
http://php.net/manual/en/install.windows.apache2.php
Enchant will not work using WAMP. ( at least for it hasn't... ).
Afterwards add the following path
share\myspell\dicts
to your PHP directory.
should look like that.
C:\PHP\share\myspell\dicts
Put the dictionary files there.
.aff
.dic