Index NavLink not working in NavMenu
I have two pages, Index and Register
My navbar's
SkullDugDungeon
text should redirect to Index/Home
While the Register NavLink works, the former does not.30 Replies
if any other files are needed, lemme know
well yes you shared some files, but it still isn't all the files, and sharing the files in that format isn't very helpful
we can't take your files and run it at this point
since you appear to be fine making the code public, why not just make a GitHub repo?
I think I had some secrets in dev or something
checking
if you had secrets in your code at one time
you need to make sure you scrub your git repo
you should never put secrets in the source code
they will be accessible in the git history
yeah I know; ive not uploaded to a repo yet and just checked this project does not have any
uploading in a sec
is there a way for me to push only one project to a repo instead of a whole solution?
yeah sure
are you new to
git
?
git
is a vital skill every developer needs to know
if you aren't very familiar with git
yet
you need to learnuh kinda? I don't use it a huge amount
I just need to run the cmd line options im guessing?
there are many
git
interfacesI'm using VS
but yes many developers prefer the comamnd line
if you don't want to upload the entire solution to GitHub then I would just use the CLI (command line)
can you run this command?
git --version
yeah
git version 2.30.0.windows.1
okay. that is not the latest version but that si fine
did you already make a repo in GitHub?
updating
about to
here you go; sorry for the delay https://github.com/SKullDugDev/SkullDugDungeon.Web
GitHub
GitHub - SKullDugDev/SkullDugDungeon.Web
Contribute to SKullDugDev/SkullDugDungeon.Web development by creating an account on GitHub.
Will look once I have time. probably busy for next few hours at least
where does the one with
href=""
take you? my instinct is to do href="/"
try including the leading slash with all of your linkswe still can't run your code. you checked in the Web Project but not the Shared project so your code doesn't build
wait what?
that should be the whole project
oh you need the shared project too
gotcha hold on
it is but you reference another project
hmmmm what's the easiest way to combine these dammit
can I just push the other project to the same repo?
would that work?
like meaning would that make it build for yall
no where it just doesn't do anything
did you try adding
/
?yeah, I had tried that already and knew it worked; I was mainly asking why doing it like the documentation/boilerplate wasn't
@ZacharyPatten @blinkbat sorry for the delay, I believe it should be buildable now with both projects in the repo including the sln file https://github.com/SKullDugDev/SkullDugDungeon.Web
GitHub
GitHub - SKullDugDev/SkullDugDungeon.Web
Contribute to SKullDugDev/SkullDugDungeon.Web development by creating an account on GitHub.
I am still unable to determine why it doesn't work without the
/
when the doc doesn't include it
in fact, in the Blazor WASM boiler plate, the nav even has a non nav-link <a> that also has no href
<a class="navbar-brand" href="">BlazorApp1</a>
in addition to
like I know I can use the /
but I want to understand what's happening that's making it required
this also makes it less clear why the href is empty:
https://html.spec.whatwg.org/multipage/text-level-semantics.html#the-a-element
so yeah I've done as much research as I can so just lemme know if yall can help
anyone? should I just repost or something?So to clarify, the question is why
<NavLink href"" />
does not redirect to the base page?
Can you try adding <base />
or <base href="/" />
to your index.html
file?yes
ohhh that probably is what I'm missing damn
i saw a thing about it but didn't see where it was in the original boilerplate
testing now
yup! that works!
thank you so much!
No worries! Glad it worked :)
That one can also be used if you want a different base route, like domain.org/something/ as base
ah ok, that makes sense
thank you again!
i mean,
href=""
is bizarre to me anyway, but if it's in the docs I guess go for itnice catch. 🙂