0

Test case:

a.org

* This is a big section

  I have some content here

** And a second level section

   And more content here

*** And a third level section

    And more content here

b.org

** I have another second level section

   These files in my real world case are supposed to be split by date

*** You can see that

    [[In the repository][https://gitlab.com/srnb/notes]]

*** The actual real world case can be seen

    [[In the two APUSH sections][https://gitlab.com/srnb/notes/tree/master/AP%20US%20History]]

main.org

#+INCLUDE: a.org
#+INCLUDE: b.org

Resulting output when exported to HTML is that I have another second level section is a top level section.

Real world case: GitLab/srnb/notes@master/AP US History

Real world output: m.s5.pm/notes/AP US History

The second file, 2019-08-20-NeoEuropean-Colonies.org, is the one with the second level header.

The script that generates the big Org files with all the includes is .deploy.sh in the repository's root; it can be run locally.

1

You have to use the :minlevel option on the #+INCLUDE: line to get b.org to start at the second level (the corollary is that you might as well not worry about the levels in b.org itself):

main.org:

#+INCLUDE: a.org
#+INCLUDE: b.org :minlevel 2

b.org:

* I have another second level section 

  ... but that is set through the #+INCLUDE directive in the parent file. This file can pretend that its top level headline is a level-1 headline.

   These files in my real world case are supposed to be split by date

** You can see that

    [[https://gitlab.com/srnb/notes][In the repository]]

** The actual real world case can be seen

    [[https://gitlab.com/srnb/notes/tree/master/AP%20US%20History][In the two APUSH sections]]

BTW, your links are backwards (I fixed them in my version): they should have the form [[URL][Description]].

  • Ahaha thanks I don't normally use links in Org :^( I'll need to edit my .deploy.sh to add the :minlevel option by counting asterisks, I hope it won't be that hard. – Soren Aug 21 at 4:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.