question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

g-link no longer working for pages?

See original GitHub issue

Description

Describe the issue that you’re seeing.

Since updating to 0.6.3 (from 0.5.8), my g-link elements no longer work for pages (they’re still fine for posts).

Steps to reproduce

<ul class="uk-navbar-nav">
	<li><g-link :to="{ name: 'posts' }" active-class="uk-active">Posts</g-link></li>
	<li><g-link :to="{ name: 'projects' }" active-class="uk-active">Projects</g-link></li>
	<li><g-link :to="{ name: 'about' }" active-class="uk-active">About</g-link></li>
</ul>

With the corresponding Posts.vue, Projects.vue etc files within src/pages.

Expected result

Previously, these links would resolve to /posts, /projects etc

Actual result

Now, there is no URL, clicking the link just takes me to a blank page.

Environment


Libs:
- gridsome version: 0.6.3

Browser:
- [x] Chrome (desktop) version XX
- [x] Chrome (Android) version XX
- [x] Chrome (iOS) version XX
- [x] Firefox version XX
- [x] Safari (desktop) version XX
- [x] Safari (iOS) version XX
- [x] IE version XX
- [x] Edge version XX
 
For Tooling issues:
- Node version: v8.12.0
- Platform: Mac + Linux

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
SteveEdsoncommented, May 28, 2019

Ah right ok, I was thinking you could do something like reference one and have it generate the /page/one URL.

Thanks for the clarification.

0reactions
hjvedvikcommented, May 28, 2019

The name was generated from the path. So /page/one became pageOne. Which means /page/One.vue and /PageOne.vue would get the same name.

Read more comments on GitHub >

github_iconTop Results From Across the Web

<g-link /> components not opening new pages #337 - GitHub
I am linking to different parts of my site using the <g-link /> component, which works correctly on my local environment.
Read more >
Glink user's guide - Gallagher & Robertson AS
Additionally, if the help files are not found in the GLINK directory then the ... This may be useful if you are running...
Read more >
java - the g:link not working while using inside the g:formremote ...
You are putting url attribute in g:link that's why it is not working. Use this it will help you . <g:link controller:"anotherController" ...
Read more >
Linking - Gridsome
#Linking. The <g-link> component is available globally in all your Pages, Templates & Components. It's a wrapper for router-link from Vue Router.
Read more >
Glink VT100/220 Terminal Emulation Software - AML
The parameter should normally not be used, but if the host needs 7 bits characters with parity, check this option. Page 23. 23....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found