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

Make post list shortcode independent of the reSt directive #3044

Merged
merged 8 commits into from Apr 16, 2018

Conversation

@ralsina
Copy link
Member

@ralsina ralsina commented Apr 15, 2018

Moved the actual code into a shortcode plugin, made the reSt directive use the handler.

@Kwpolska
Copy link
Member

@Kwpolska Kwpolska commented Apr 15, 2018

I think you forgot a file.

@ralsina
Copy link
Member Author

@ralsina ralsina commented Apr 15, 2018

Or 2

Copy link
Member

@Kwpolska Kwpolska left a comment

Looks reasonable on first glance. I’m too lazy to test it now, so I’ll assume it works.

return output, template_deps

# Request file name from shortcode (Issue #2412)
Plugin.handler.nikola_shortcode_pass_filename = True
Copy link
Member

@Kwpolska Kwpolska Apr 15, 2018

No newline at the end of file? What editor is this, notepad.exe?

# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

"""Post list directive for reStructuredText."""
Copy link
Member

@Kwpolska Kwpolska Apr 15, 2018

Not quite.

import uuid

import natsort
from docutils import nodes
Copy link
Member

@Kwpolska Kwpolska Apr 15, 2018

Are these docutils imports necessary, and if yes, how can we get rid of them?

@ralsina
Copy link
Member Author

@ralsina ralsina commented Apr 15, 2018

@Kwpolska I forgot to run falke8 on it, all those should be fixed now.

@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018

name = "post_list"

def handler(self, start=None, stop=None, reverse=False, tags=None, require_all_tags=False, categories=None,
Copy link
Member

@Kwpolska Kwpolska Apr 15, 2018

@ralsina, perhaps move the long docstring from rest/post_list.py here?

@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 15, 2018
@getnikola getnikola deleted a comment Apr 16, 2018
@getnikola getnikola deleted a comment Apr 16, 2018
@getnikola getnikola deleted a comment Apr 16, 2018
@getnikola getnikola deleted a comment Apr 16, 2018
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
@getnikola getnikola deleted a comment Apr 16, 2018
@getnikola getnikola deleted a comment Apr 16, 2018
@getnikola getnikola deleted a comment Apr 16, 2018
@Kwpolska Kwpolska merged commit 9487a25 into master Apr 16, 2018
0 of 2 checks passed
@Kwpolska Kwpolska deleted the make-post-list-independent branch Apr 16, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants