You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/06/28 02:40:15 UTC

[GitHub] [apisix-website] Yiyiyimu opened a new issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Yiyiyimu opened a new issue #392:
URL: https://github.com/apache/apisix-website/issues/392


   Currently docusaurus code block copy button would copy all texts including the leading dollar sign, so users could not run commands by simple copy and paste.
   ![image](https://user-images.githubusercontent.com/34589752/123570658-b106a100-d796-11eb-8d21-66be0faf0105.png)
   
   A easy option is to remove all the dollar sign, but it would lead to messy structure in code blocks, making commands and results the same. So a better method could be refining code block copy button behavior to ignore leading `$`, as [discussed in docusaurus](https://github.com/facebook/docusaurus/issues/1745#issuecomment-546798830)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan closed issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
juzhiyuan closed issue #392:
URL: https://github.com/apache/apisix-website/issues/392


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] SkyeYoung commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-1078599271


   @juzhiyuan in fact it's not easy to copy but ignore the `$`. We need parse the code, or use a different structure.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] iamayushdas commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869885003


   Should i work on it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] SkyeYoung commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-1076002498


   Any update here? 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] navendu-pottekkat commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
navendu-pottekkat commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-1078675878


   @juzhiyuan Yes. We are including this in the style guide and would be using more of Docusaurus' features.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] iamayushdas commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869298145


   I see that people stuck into this has opted to trim the ` $` , I would like to  give a try to fix this.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-1078598368


   > Any update here? It's been a long time.
   
   Would you like to take this one?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] juzhiyuan commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
juzhiyuan commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-1078604921


   Hi, there is a lot of documentation containing code blocks with `shell` and `output.`, so I will close this issue and cc @hf400159 @navendu-pottekkat to take a look: this is one point on the documentation style guide. 🙏 😉


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] iamayushdas commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-879522969


   can we also change the format of our code blocks @Yiyiyimu 
   
   from this:
   
   <img width="1440" alt="image" src="https://user-images.githubusercontent.com/40708551/125547714-c4c9d65c-09fb-4ec6-a4ff-85e45f160b05.png">
   
   
   
   to this: 
   
   This adds the `title` to code blocks, we don't have to write the filename or instructions regarding code snippet in (#comment) format
   
   <img width="1440" alt="image" src="https://user-images.githubusercontent.com/40708551/125547801-dc235545-2b07-40b4-a95e-939efa3665f2.png">
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Yiyiyimu commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-882129610


   > We could use those comments as a title, how is it?
   
   Like I think we don't need to add title for github.com/apache/apisix-docker/pull/194
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Yiyiyimu commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869877826






-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Yiyiyimu commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869877826


   > On researching,Many of the websites under facebook like create-react-app , relay, flow , uses the code snippet without `$`
   
   Thank you for your time! I think README/getting-started/how-to-build/install-dependencies will not contain a complex code structure so it would be cool to me to remove leading `$` there.
   
   BTW, I just remembered I create a relative PR https://github.com/apache/apisix/issues/4076 🤣 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] SkyeYoung edited a comment on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
SkyeYoung edited a comment on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-1076002498


   Any update here? It's been a long time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] iamayushdas commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-882126146


   > Cool @iamayushdas but could we make it work for part of the code blocks, since I think in APISIX most code blocks don't need to clarify its file name
   
   We could use those comments as a title, how is it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Yiyiyimu commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869889701


   > Should i work on it?
   
   Sure thanks for your help!!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Yiyiyimu commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869295570


   Hi @iamayushdas are you interested in working on this problem~


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] iamayushdas commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869885003


   Should i work on it?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] iamayushdas commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
iamayushdas commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-869400463


   On researching,Many of the websites under facebook like create-react-app , relay, flow , uses the code snippet without `$`


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] Yiyiyimu commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
Yiyiyimu commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-882125148


   Cool @iamayushdas but could we make it work for part of the code blocks, since I think in APISIX most code blocks don't need to clarify its file name


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [apisix-website] SkyeYoung commented on issue #392: feature request: refine code block copy button behaviour to ignore the leading `$`

Posted by GitBox <gi...@apache.org>.
SkyeYoung commented on issue #392:
URL: https://github.com/apache/apisix-website/issues/392#issuecomment-1078602519


   I think we should close this issue, because:
   
   1. If we keep the existing code format, we inevitably need to parse the code. Then we have to change the core code of docusaurus, and this will bring difficulties to subsequent upgrade.
   2. If we change the code format, this requires modifying too many documents.
   
   In summary, It is unlikely to solve this problem at present.
   
   @juzhiyuan WDYT? 
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org