Closed gadomski closed 11 years ago
Cheers, a good idea. Do you fancy renaming the config setting to "read_more" and updating this PR?
No problem, config key changed.
Cheers. I was just looking at merging this, and ran the tests. They're failing because there's no default value for read_more
in existing config files. I'm glad they're failing, or I wouldn't have noticed that this'll break existing installations that haven't got read_more
in their config files.
We're going to need a Config.read_more
class method, instead of just adding it to the settings list.
I think we'll need to:
Config.read_more
that uses from_environment
and from_yaml
, and falls back to "Continue reading" if read_more
isn't set in either location.I don't think we'll need a unit test for it if the implementation is as simple as I envisage, as it'll just need to pick from one of three values, using methods that are already well tested.
If you could replace all the commits on this branch down to 1 commit, that'd be awesome. Ideally it'll all appear on the master branch as a single commit.
Config.read_more
class method added, branch squashed to one commit, and tests passing. Apologies for not testing before creating the pull request, poor form from this guy...
I kept a commented-out version of the read_more
config key in the settings file. Would you like to keep it there, or add it to the docs instead (or in addition)?
Nice one.
I think jt should stay in the config file, commented out, and also go in the docs. They're the "reference" docs really.
Alright, then I think this pull request is good to go from my side. I've opened gma/nestacms.com#25 for the documentation update.
Merged, cheers.
I'm using the latest gem (0.9.13) and somehow it has no effect in config/config.yml
read_more: "Read More"
I still get "Continue reading" rendered in pages.
@settings = %w[
title subtitle theme disqus_short_name cache content google_analytics_code
]
apparently the patch didn't get into that version, so I will just use the git version.
This value allows the user to change the default 'Continue reading' string that is used when the
Read more
metadata is not set.