middleman / middleman-blog

Blog Engine Extension for Middleman
https://middlemanapp.com
MIT License
326 stars 179 forks source link

Add next_local_article and previous_local_article #336

Closed Linuus closed 7 years ago

Linuus commented 7 years ago

This PR adds two new methods to fetch the previous and next local article.

The tests fail on Travis, but I don't think that's my fault :)

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.04%) to 93.669% when pulling f1a798f4e358d89403d48d5013cc7872588a35e3 on varvet:feature/next-previous-local-articles into 7b7eaa8213c07648cc8b16ac47c89c8ee2c37052 on middleman:master.

iwarner commented 7 years ago

@Linuus Thanks for this - I have updated the Travis credentials - could you please merge and submit the PR again please.

coveralls commented 7 years ago

Coverage Status

Coverage increased (+0.05%) to 93.669% when pulling 21579c83b4cb31cb7d95ee34b55fa3622dc2d56b on varvet:feature/next-previous-local-articles into 98670afda463dd8fa9f84ecc5649817625128f24 on middleman:master.

Linuus commented 7 years ago

@iwarner Rebased and force pushed! 👍

iwarner commented 7 years ago

@Linuus

Ok looks promising - thanks

Ok some comments on this

I have just taken this up so getting up to speed also - should get more on this over the weekend and help out more. But if you can look at the wider scenarios then cool

Linuus commented 7 years ago

I agree about the name, the reason I chose it was because I tried to be consistent with BlogData#local_article. That method should probably be called articles_by_locale or something, but that's up to you 😊

I'll change my method to locale though.

iwarner commented 7 years ago

Hiya

I have implemented this manually as I sort out some code styling also.

I have called them

article_locale_previous article_locale_next

Also implemented articles_by_locale

placed a deprecation notice on the other methods.

Would be great if you can offer further assistance on this extension, for sure there are a lot of locale items that need completing - such as Tag / Calendar templates getting the correct locales.

Many thanks