-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
"base" property does not work as expected #1042
Comments
Hey @godmar this should be fixed by
|
Hi, I am also facing this same issue. Till when version |
Hey @ronaklalwaniii 2.0.0-rc.40 is already released. You can do |
@rakannimer thanks for the quick reply. I am facing some console errors after the update. Can you please check image and tell me if this is how I am supposed to add the base path and this is how dist folder is supposed to be. . |
The way you're setting Did you try deleting .docz and node_modules and re-installing docz ? |
Doesn't work for me, either, even with a fully wiped |
Ok thanks for the link ! @Dangoo do you think our recent change to the route field in The files are there if you append the slug to the base argument so prefixPaths is working as expected. For example |
@rakannimer @godmar can you reproduce the hosted behavior locally as well by running the following? $ docz build
# $ gatsby build --prefixPaths
# ...
# ✨ Done in 30.35s.
$ docz serve
# $ gatsby serve --prefixPaths
# info gatsby serve running at: http://localhost:9000/cpp2019/ |
I don't have a globally installed
I'm using |
@godmar $ npx docz build
$ npx docz serve
Yes, it does. In fact, that’s the way how it should be used with gatsby under the hood.
Have a look here: |
Edit: see comment below for an explanation of what was happening here. Same result with npx.
The documentation says to run
Here, paths are screwed up. I am overriding gatsby-theme-docz/index.js as described here - all I do is add one more built-in component so I don't have to import it, see here I have been successfully using BTW, when I use I am a bit confused regarding whether to use the |
So - why does If I wipe that directory and start over, I observe the following: (a) when using (b) when using (c) when running (d) Now I wipe my
but this build eventually fails with:
This is an error I have previously tracked down to your Code component; if no language is specified in a triple backquote section, docz fails. This is why I had to override your component like so:
but when running |
ps: so there seems to be differences in behavior when using |
@rakannimer after hours of trying, removing extra slash at the end of base worked for me. |
@ronaklalwaniii can you share if you're using |
@godmar, I am using |
I am now getting everything to work correctly except when I set the base, it actually adds it twice resulting in my sidebar links being |
What's the specific case/cases when this fails? Trying to reproduce.
docz: 2.0-rc.45 |
I was able to get it to work by downgrading docz to My doczrc.js looks like this
|
Any updates on this? I would really love to update the version number to latest... |
Hey @rubencustodio Any chance you can provide a repo with a small repro of the problem ? EDIT: I was able to repro, fixing. |
I think this should be solved with the latest docz release candidate You can also see a working example here : https://github.com/doczjs/docz/tree/master/examples/custom-base-path If you're using docz as a theme in a gatsby site then you can just pass |
|
"docz": "^2.3.1"
|
This is my export default {
title: 'Some title',
description: 'Some desc.',
base: '/contents/',
files: './docs/**/*.{md,markdown,mdx}',
themeConfig: {
initialColorMode: 'dark',
},
typescript: true,
} However, when I do Furthermore the I've tried everything but can't get it to work. I'm developing on a Mac and using |
When specifying a
base: /mybase/
indoczrc.js
, and then runningyarn run docz build
, the created.docz/dist
folder looks like this:The file
.docz/dist/mybase/index.html
contains references such as:that do not contain
mybase
.There is no
index.html
file.I was expecting to copy (or link) the .docz/dist folder to the server root directory of my Apache server and then be able to access it at
https://host/mybase
. This does not work with these generated files.I would appreciate guidance whether what I am trying to do is possible with docz: build and then copy to a subfolder hanging off the server's root, with all necessary files contained in that subfolder.
The text was updated successfully, but these errors were encountered: