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
Conversation
I think you forgot a file. |
Or 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite.
import uuid | ||
|
||
import natsort | ||
from docutils import nodes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these docutils imports necessary, and if yes, how can we get rid of them?
@Kwpolska I forgot to run falke8 on it, all those should be fixed now. |
|
||
name = "post_list" | ||
|
||
def handler(self, start=None, stop=None, reverse=False, tags=None, require_all_tags=False, categories=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ralsina, perhaps move the long docstring from rest/post_list.py here?
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
[ci skip]
Moved the actual code into a shortcode plugin, made the reSt directive use the handler.