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

feat: Toggle ommission of subheading content #673

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Commits on Sep 24, 2022

  1. feat: Toggle ommission of subheading content

    Previously, when a heading was rendered, each of its subheadings'
    output was included in the output. With this change, a customizable
    variable is added that, if set, will omit those subheadings that have
    the :EXPORT_FILE_NAME property set from the output of their parent.
    
    This can be handy for non-blogging sites, where the content is still
    hierarchical, but doesn't lend itself to the blogging format where a
    parent page includes the content of each of its children (like a year
    index page, month index page, etc.)
    
    At the rist of being annoyingly verbose, before this change, if you
    had a post structure like this (in pseudo-org-mode format):
    
        * Post A
          :EXPORT_FILE_NAME: post-a
    
          Some text.
    
        ** Post B
           :EXPORT_FILE_NAME: post-b
    
           Text that relates to Post B.
    
        ** Post C
    
           General text, but no :EXPORT_FILE_NAME.
    
    When rendered into HTML at the URL of /posts/post-a/, one would see:
    
        Post A
    
        Some text.
    
        Post B
    
        Text that relates to Post B.
    
        Post C
    
        General text, but no :EXPORT_FILE_NAME.
    
        …
    
    After this change (and when the variable is set):
    
        Post A
    
        Some text.
    
        Post C
    
        General text, but no :EXPORT_FILE_NAME.
    
        …
    
    The premise is that Post B will have its own page (as indicated by the
    :EXPORT_FILE_NAME property) and so doesn't or shouldn't be included in
    the content of Post A.
    ewollesen committed Sep 24, 2022
    Configuration menu
    Copy the full SHA
    8a1a647 View commit details
    Browse the repository at this point in the history