docs: private IncludeAllPageAndToc addPaginationInformation(List<IncludeAllPageWithOutput> pages, boolean includeChildSummary) {
  
      List<Header> globalToc = new ArrayList<>();
  
      List<IncludeAllPageWithPagination> processedResources = new ArrayList<>();
      for (int i = 0; i < pages.size(); i++) {
        if (!pages.get(i).files.isEmpty()) {
  
          IncludeAllPageWithOutput current = pages.get(i);
          
          int summaryPositionBegin = globalToc.size();
          
          globalToc.addAll(current.summary);
          
          int includedChildCount = 0;
          if(includeChildSummary) {
            for (int j = i+1; j < pages.size(); j++) {
              if(pages.get(j).depth > current.depth) {
                includedChildCount += pages.get(j).summary.size();
              } else {
                break;
              }
            }
          }
          
          int summaryPositionEnd = globalToc.size() + includedChildCount;
  
          String previousPageUrl = null;
          String previousPageTitle = null;
          String nextPageUrl = null;
          String nextPageTitle = null;
          
          
          List<Link> breadcrumbs = extractBreadcrumbs(pages, i, current.outputPath);
          
          if (i > 0) {
            previousPageUrl = PathUtils.relativePathTo(pages.get(i - 1).outputPath, current.outputPath);
            previousPageTitle = pages.get(i - 1).title.orElse(null);
          }
          if (i < pages.size() - 1) {
            nextPageUrl = PathUtils.relativePathTo(pages.get(i + 1).outputPath, current.outputPath);
            nextPageTitle = pages.get(i + 1).title.orElse(null);
          }
  
          Pagination pagination = new Pagination(i + 1, pages.size(), current.depth, new Link(previousPageUrl, 
              previousPageTitle), new Link(nextPageUrl, nextPageTitle), current.title.orElse(null), breadcrumbs);
          processedResources.add(new IncludeAllPageWithPagination(current, pagination, summaryPositionBegin, summaryPositionEnd));
        }
      }
      return new IncludeAllPageAndToc(processedResources, addPositionsToGlobalToc(globalToc));
    }