Comments (9)
ooh, now I get it. thanks for clarifying. that being said can't we add another field there to control the "Edit this page on Github" URL? n1ru4l/envelop@
main
/website/src/lib/plugins.ts#L38 π
I assume it is possible, probably just point to a specific file, something like that:
editLink: false | string // false to disable, in case of an external link or unknown, and a string is to set the path to the GH file
But we also need a way to pass this from pluginsArr
to getStaticPaths
and then all the way to the Edit component (@B2o5T is it even possible?)
from docs.
@YassinEldeeb I think this happens because of the lack of support for the dynamic pages?
from docs.
mmm... interesting. can you please elaborate more? I don't have much context about how this's working
For all regular pages (md, mdx) in our websites, the path to the file when clicking on "Edit this page" is inferred from the MDX file (which is static).
For Envelop plugins pages, we have a "dynamic" page that is being filled by the fact that we implement getStaticPaths
, you can find it here:
https://github.com/n1ru4l/envelop/blob/main/website/src/pages/plugins/%5Bname%5D.mdx and https://github.com/n1ru4l/envelop/blob/main/website/src/lib/plugin-get-static-props.ts#L7
So when Next builds the pages, it uses getStaticPaths
to generate the URLs. The Edit this page
takes the NextJS route name by default (the static one).
@B2o5T can refine my answer and correct me if I'm wrong
from docs.
oh, so it's a matter of how to pass these metadata this far? π€ curious about @B2o5T's opinion as well
from docs.
I guess so. I think the edit button is coming from Nextra (see https://github.com/shuding/nextra/blob/73241b3fee58f0318e9349a5eb7650a7cd55a4e3/packages/nextra-theme-docs/src/constants.tsx#L33 ) and it's using getGitEditUrl
.
I guess we can override this in https://github.com/n1ru4l/envelop/blob/main/website/theme.config.tsx#L6 and have a custom editLink.component
that uses custom behavior for the plugins pages of Envelop?
from docs.
closed since was fixed for envelop
from docs.
π€ interesting. can you please elaborate more? I don't think I have much context about how this's working
from docs.
ooh, now I get it. thanks for clarifying. that being said can't we add another field there to control the "Edit this page on Github" URL? https://github.com/n1ru4l/envelop/blob/main/website/src/lib/plugins.ts#L38 π
from docs.
oh wait, you already have this field there https://github.com/n1ru4l/envelop/blob/main/website/src/lib/plugins.ts#L81, but why it's not working/being used
from docs.
Related Issues (20)
- Bug: hmr not work HOT 1
- logo right click brand kit
- [NEW FEATURE] - @theguild/remark-mermaid to support mermaidConfig as parameter HOT 4
- ERR_PNPM_LINKING_FAILEDβ Error: EAGAIN: resource temporarily unavailable, copyfile HOT 6
- Move Yoga versions into a drop down and bring versions to all websites HOT 1
- Bring changelog to all websites HOT 1
- Have a dropdown to get to other Guild libraries on each library website
- line break toggle covers code block content HOT 6
- Configurable og-image
- Require meta > description on every page HOT 1
- Enforce titles shorter than X characters
- Detection of broken links, no longer available pages and new urls
- Visual regression testing
- Remove meta > application-name, apple-mobile-web-app-title
- SEO checker for basic things
- Configurable title suffix / prefix
- Configurable name + tagline of the library in the top bar
- Allow to overwrite/extend the footer
- Ability to hide search on specific pages
- Nextra's search shows duplicated results
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docs.