Closed gma closed 12 years ago
came here to ask if it'd be possible to use custom metadata :-) is there a way available today?
Do you see that first bullet point? That got implemented on master by Wynn from thechangelog, and is in the latest gem. You can read it by calling page.metadata('string'). You don't need to worry about getting the case right; it should just work if you query it in lower case.
thanks for the fast reply – it works awesomely.
There's no reason why you shouldn't be able to add any meta data that you like to a page. This new meta data could have a structure to it (e.g. it could be a list of usernames, URLs, twitter accounts, etc.). Rather than re-inventing the wheel and writing a new parser, we'll allow people to specify meta data in YAML (the existing format is already a subset of YAML). Sadly the current metadata format isn't backwards compatible (the keys are, but typical values for article summaries aren't), so it should be implemented as a plugin.
Tasks
Page.metadata
method public.