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

Accepting query string elements to pre-populate metadata #807

Closed
jasonlally opened this issue Jan 19, 2015 · 5 comments
Closed

Accepting query string elements to pre-populate metadata #807

jasonlally opened this issue Jan 19, 2015 · 5 comments

Comments

@jasonlally
Copy link

I don't think I saw this anywhere in the current issues or functionality, but it would be great if we could pass query string elements that matched the metadata labels to prose. The use case would be this:

  • User is on a Jekyll site and would like to add a related update to a project post.
  • The add update link would pass in a query string parameter that would pre-populate a field used to link the two post types together.
  • User could still edit the metadata, but would have all the reasonable defaults in place
  • Because the liquid templates already link together posts by a yaml field, publishing the post via prose would mean the user could complete an "add related post" workflow without ever really thinking about how they connect
@jasonlally
Copy link
Author

I see this similar issue #437 closed because of security and complexity concerns. That makes sense to me. Is there another way to get the desired workflow without introducing these problems? My use case is about passing data from within an existing website, not via an extension.

If it's not possible at all, feel free to close, otherwise, it really would support a lot of useful workflows for managing linked and related content (posts).

@mikemorris
Copy link
Contributor

I would think you could implement this functionality by using metadata configuration paired with a custom directory structure.

@jasonlally
Copy link
Author

Is it possible to create a post in a new folder before it exists? I think the issue is it certainly is possible to link 2 posts together, but I'm attempting to lower some of the admin overhead of doing that. I think the custom directory structure would have to be in place already to create posts there, isn't that right?

I'm okay with doing something less "automatic," I'm just trying to save users from too many steps to post a related post. The query string is just one way I thought of doing this.

But if it were possible to create a new post in a completely new folder just from a link (without the existing structure in place), I think that would get me there. (e.g. http://prose.io/#githubUser/repo/new/master/_posts/updates/_new_folder_name_

The other path is just generating a list of options and in a select and having users select the corresponding content. That works too, but the user could forget to select the metadata as I don't think we can require a field.

I guess the main point is there are plenty of ways to accomplish the linking, I was looking for something that would make it dead simple for novice users or provide me a way to make sure the user completes the linking.

@jasonlally
Copy link
Author

Bah! Figured out a way to get at what I want to do. You're right, I can just send people to a folder with the particular ID as the folder name and then generate a name with the current date and some naming convention like update-1, update-2, etc.

@mikemorris
Copy link
Contributor

Yep, configure metadata presets for a folder in _config.yml (it doesn't have to exist yet), then stick that folder name in the link path.

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

No branches or pull requests

2 participants