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

Some "Edit this page" links don't work #6802

Open
maiieul opened this issue Aug 17, 2024 · 20 comments
Open

Some "Edit this page" links don't work #6802

maiieul opened this issue Aug 17, 2024 · 20 comments
Assignees
Labels
COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it COMP: docs Improvements or additions to documentation

Comments

@maiieul
Copy link
Contributor

maiieul commented Aug 17, 2024

The urls are constructed based on a hard-coded list of paths:

const QWIK_GROUP = [
  'components',
  'concepts',
  'faq',
  'getting-started',
  'think-qwik',
  'deprecated-features',
];

const QWIK_ADVANCED_GROUP = [
  'containers',
  'custom-build-dir',
  'dollar',
  'eslint',
  'library',
  'optimizer',
  'modules-prefetching',
  'qrl',
  'qwikloader',
  'vite',
];

const QWIKCITY_GROUP = [
  'action',
  'api',
  'caching',
  'endpoints',
  'env-variables',
  'guides',
  'html-attributes',
  'layout',
  'middleware',
  'pages',
  'project-structure',
  'qwikcity',
  'route-loader',
  'routing',
  'server$',
  'troubleshooting',
  'validator',
];
const QWIKCITY_ADVANCED_GROUP = [
  'content-security-policy',
  'menu',
  'request-handling',
  'routing',
  'sitemaps',
  'speculative-module-fetching',
  'static-assets',
];

We could probably use a menu with useContent hook https://qwik.dev/docs/advanced/menu/#menu.

@maiieul maiieul converted this from a draft issue Aug 17, 2024
@maiieul maiieul added COMP: docs Improvements or additions to documentation COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it labels Aug 17, 2024
@iitzIrFan
Copy link

@maiieul Can I work on this issue ?

@gioboa
Copy link
Member

gioboa commented Dec 8, 2024

@iitzIrFan yep, feel free to drop a PR for this

@maiieul
Copy link
Contributor Author

maiieul commented Dec 9, 2024

Yes please, thanks for letting us know 🙏

@iitzIrFan
Copy link

@gioboa @maiieul assign this issue to me so that I cab work on !

@iitzIrFan
Copy link

@gioboa Thanks for assigning the issue to me. Can you give some details what you want me to work on this issue in detail as there should be no misunderstanding!

@gioboa
Copy link
Member

gioboa commented Dec 24, 2024

Let's wait @maiieul

@maiieul
Copy link
Contributor Author

maiieul commented Dec 24, 2024

Thanks @iitzIrFan, the goal is to make sure that all edit this page links work as expected and that it's a maintainable solution. If you can think of a better alternative to useContent, feel free to suggest here or ask on discord docs contributors channel ✌️

@iitzIrFan
Copy link

@maiieul Will work on it and let you know if any issue!

@iitzIrFan
Copy link

@maiieul How do I run this project locally on my machine to test and contribute ?

@maiieul
Copy link
Contributor Author

maiieul commented Dec 25, 2024

Hmmm, doesn't ‘pnpm docs.dev’ work for you? We have a contributing.md if you haven't read it yet.

@iitzIrFan
Copy link

Nah this didn't work pnpm docs.dev
And as per this contributing.md, trying to figure it out but no results...
Can you directly tell me the steps for now ?

@gioboa
Copy link
Member

gioboa commented Dec 25, 2024

Can you try to run pnpm build.local and then pnpm docs.dev?

@iitzIrFan
Copy link

This was the error I got after using the above mentioned cammand, Any fix ?

51 self.qwikBuild = {
~~~~~~~~~~~~~~

Found 1 error in packages/docs/src/repl/worker/repl-dependencies.ts:51

❌ Error: Command failed with exit code 2: tsc -p packages\docs\tsconfig.json
at makeError (file:///C:/Users/irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///C:/Users/irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async tscDocs (C:\Users\irfan\Downloads\Qwik\qwik\scripts\tsc-docs.ts:8:18)
at async build (C:\Users\irfan\Downloads\Qwik\qwik\scripts\build.ts:147:7)
Error: Error: Command failed with exit code 2: tsc -p packages\docs\tsconfig.json
at makeError (file:///C:/Users/irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/lib/error.js:60:11)
at handlePromise (file:///C:/Users/irfan/Downloads/Qwik/qwik/node_modules/.pnpm/[email protected]/node_modules/execa/index.js:124:26)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async tscDocs (C:\Users\irfan\Downloads\Qwik\qwik\scripts\tsc-docs.ts:8:18)
at async build (C:\Users\irfan\Downloads\Qwik\qwik\scripts\build.ts:147:7)
at panic (C:\Users\irfan\Downloads\Qwik\qwik\scripts\util.ts:287:33)
at build (C:\Users\irfan\Downloads\Qwik\qwik\scripts\build.ts:192:5)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
 ELIFECYCLE  Command failed with exit code 1.

C:\Users\irfan\Downloads\Qwik\qwik>pnpm docs.dev

[email protected] docs.dev C:\Users\irfan\Downloads\Qwik\qwik
cd packages/docs && pnpm build.repl-sw && pnpm dev

cd: no such file or directory: packages/docs
 ELIFECYCLE  Command failed with exit code 1.

@gioboa
Copy link
Member

gioboa commented Dec 25, 2024

Are you using windows?

@iitzIrFan
Copy link

yes !

@gioboa
Copy link
Member

gioboa commented Dec 25, 2024

yes !

We have a PR for that #7177
The command should be
"docs.dev": "concurrently \"cd packages/docs && pnpm build.repl-sw\" \"cd packages/docs && pnpm dev\"",

@iitzIrFan
Copy link

@gioboa Ok it got the project running !

@iitzIrFan
Copy link

iitzIrFan commented Dec 25, 2024

@maiieul @gioboa I had gone through the codebase and understood that, I only have to arrange the elements in the array in the menu.md file[format] to be in structured format and later it would generate respective links when clicked like a loader right ?
If anything that, I missed let me know !

@maiieul
Copy link
Contributor Author

maiieul commented Dec 26, 2024

Not sure I understand what you mean by loader here. But yeah I think we should be able to use the menu.md to get the links.

@iitzIrFan
Copy link

@gioboa @maiieul I had made a PR req to resolve this issue and had also mentioned the changes that, I had made there. Do check & let me know if, any changes are required !
Thank you !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
COMMUNITY: good first issue Good for newcomers COMMUNITY: PR is welcomed We think it's a good feature to have but would love for the community to help with the PR for it COMP: docs Improvements or additions to documentation
Projects
Status: Upcoming
Development

No branches or pull requests

3 participants