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

Allow edit URL to be customized with doc metadata #443

Merged
merged 3 commits into from
Feb 12, 2018

Conversation

Glavin001
Copy link
Contributor

@Glavin001 Glavin001 commented Feb 10, 2018

Motivation

Some of the Markdown docs are generated and therefore should not be edited. Instead contributors should edit the source data files (e.g. .json or .yaml or otherwise) which are used to generate the final Markdown docs.

Test Plan

Documentation has been updated to reflect usage.

Example:

---
id: options
title: Options
sidebar_label: Options
edit_url: https://github.com/unibeautify/unibeautify/edit/master/src/options.ts
---

Notice the Edit Button in the following screenshot does not have a link in the conventional editUrl format. In this screenshot my cursor is hovering over the Edit Button and its URL is shown in the bottom left corner.

image

Live demos from Pull Request: https://github.com/Unibeautify/website/pull/39/files

Related PRs

None.

@JoelMarcey
Copy link
Contributor

Hi @Glavin001. Thank you very much for this pull request. And the great detail you provided for it, especially the test plan and the live demo.

I think I am going to merge this. I might have a question or two as I review it. But looks good on the surface.

Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great I think 👍

Only one thing is concerning me. It is something small, but could be important if we decide we want to change it in the future -- easier to change now.

Do you think the name edit_url is the best name? It indeed may be - but what I am thinking is that it is so close to editUrl that it has the possibility of becoming confusing.

Would doc_specific_edit_url be better? Or is that too long, in your opinion?

@Glavin001
Copy link
Contributor Author

I agree. Maybe omit the specific part and go with doc_edit_url or custom_edit_url? 🤔

@JoelMarcey
Copy link
Contributor

@Glavin001 custom_edit_url seems good to me. Want to make that change? And then I can merge this in. Thanks!

@Glavin001
Copy link
Contributor Author

@JoelMarcey : Updated the Pull Request. Let me know if there's anything else. Thank you for your prompt replies! 😃

Glavin001 added a commit to Unibeautify/website that referenced this pull request Feb 11, 2018
Copy link
Contributor

@JoelMarcey JoelMarcey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants