@@ -167,13 +167,26 @@ void print_list(std::ostream & out, Container const & source, char const * separ
167
167
168
168
169
169
170
- void print_file_header (std::ostream& out, std::string const & title) {
170
+ void print_file_header (std::ostream& out, std::string const & title, std::string const & url_filename = {}, std::string const & desc = {} ) {
171
171
out <<
172
172
R"( <!DOCTYPE html>
173
173
<html lang="en">
174
174
<head>
175
175
<meta charset="utf-8">
176
- <title>)" << title << R"( </title>
176
+ <title>)" << title << R"( </title>)" ;
177
+
178
+ if (url_filename.size ()) {
179
+ // Open Graph metadata
180
+ out << R"(
181
+ <meta property="og:title" content=")" << title << R"( ">
182
+ <meta property="og:description" content=")" << desc << R"( ">
183
+ <meta property="og:url" content="https://cplusplus.github.io/LWG/)" << url_filename << R"( ">
184
+ <meta property="og:type" content="website">
185
+ <meta property="og:image" content="https://isocpp.org/assets/images/cpp_logo.png">
186
+ <meta property="og:image:alt" content="C++ logo">)" ;
187
+ }
188
+
189
+ out << R"(
177
190
<style>
178
191
p {text-align:justify}
179
192
li {text-align:justify}
@@ -226,7 +239,6 @@ R"(<!DOCTYPE html>
226
239
</head>
227
240
<body>
228
241
)" ;
229
-
230
242
}
231
243
232
244
@@ -491,7 +503,8 @@ void report_generator::make_active(std::vector<issue> const & issues, fs::path c
491
503
std::ofstream out{filename};
492
504
if (!out)
493
505
throw std::runtime_error{" Failed to open " + filename.string ()};
494
- print_file_header (out, " C++ Standard Library Active Issues List" );
506
+ print_file_header (out, " C++ Standard Library Active Issues List" , filename.filename ().string (),
507
+ " Unresolved issues in the C++ Standard Library" );
495
508
print_paper_heading (out, " active" , lwg_issues_xml);
496
509
out << lwg_issues_xml.get_intro (" active" ) << ' \n ' ;
497
510
out << " <h2 id='History'>Revision History</h2>\n " << lwg_issues_xml.get_revisions (issues, diff_report) << ' \n ' ;
@@ -509,7 +522,8 @@ void report_generator::make_defect(std::vector<issue> const & issues, fs::path c
509
522
std::ofstream out (filename);
510
523
if (!out)
511
524
throw std::runtime_error{" Failed to open " + filename.string ()};
512
- print_file_header (out, " C++ Standard Library Defect Reports and Accepted Issues" );
525
+ print_file_header (out, " C++ Standard Library Defect Reports and Accepted Issues" , filename.filename ().string (),
526
+ " Resolved issues in the C++ Standard Library" );
513
527
print_paper_heading (out, " defect" , lwg_issues_xml);
514
528
out << lwg_issues_xml.get_intro (" defect" ) << ' \n ' ;
515
529
out << " <h2 id='History'>Revision History</h2>\n " << lwg_issues_xml.get_revisions (issues, diff_report) << ' \n ' ;
@@ -526,7 +540,8 @@ void report_generator::make_closed(std::vector<issue> const & issues, fs::path c
526
540
std::ofstream out{filename};
527
541
if (!out)
528
542
throw std::runtime_error{" Failed to open " + filename.string ()};
529
- print_file_header (out, " C++ Standard Library Closed Issues List" );
543
+ print_file_header (out, " C++ Standard Library Closed Issues List" , filename.filename ().string (),
544
+ " Rejected C++ standard library issues" );
530
545
print_paper_heading (out, " closed" , lwg_issues_xml);
531
546
out << lwg_issues_xml.get_intro (" closed" ) << ' \n ' ;
532
547
out << " <h2 id='History'>Revision History</h2>\n " << lwg_issues_xml.get_revisions (issues, diff_report) << ' \n ' ;
@@ -768,7 +783,8 @@ void report_generator::make_sort_by_status_mod_date(std::vector<issue> & issues,
768
783
std::ofstream out{filename};
769
784
if (!out)
770
785
throw std::runtime_error{" Failed to open " + filename.string ()};
771
- print_file_header (out, " LWG Index by Status and Date" );
786
+ print_file_header (out, " LWG Index by Status and Date" , filename.filename ().string (),
787
+ " C++ standard library issues list" );
772
788
773
789
out <<
774
790
R"( <h1>C++ Standard Library Issues List (Revision )" << lwg_issues_xml.get_revision () << R"( )</h1>
@@ -815,7 +831,8 @@ void report_generator::make_sort_by_section(std::vector<issue>& issues, fs::path
815
831
std::ofstream out (filename);
816
832
if (!out)
817
833
throw std::runtime_error{" Failed to open " + filename.string ()};
818
- print_file_header (out, " LWG Index by Section" );
834
+ print_file_header (out, " LWG Index by Section" , filename.filename ().string (),
835
+ " C++ standard library issues list" );
819
836
820
837
out << " <h1>C++ Standard Library Issues List (Revision " << lwg_issues_xml.get_revision () << " )</h1>\n " ;
821
838
out << " <h1>Index by Section</h1>\n " ;
@@ -881,11 +898,13 @@ void report_generator::make_individual_issues(std::vector<issue> const & issues,
881
898
}
882
899
883
900
for (auto & iss : issues){
884
- fs::path filename{path / (" issue" + std::to_string (iss.num ) + " .html" )};
901
+ auto num = std::to_string (iss.num );
902
+ fs::path filename{path / (" issue" + num + " .html" )};
885
903
std::ofstream out{filename};
886
904
if (!out)
887
905
throw std::runtime_error{" Failed to open " + filename.string ()};
888
- print_file_header (out, std::string (" Issue " ) + std::to_string (iss.num ) + " : " + prune_title_tags (iss.title ));
906
+ print_file_header (out, std::string (" Issue " ) + num + " : " + prune_title_tags (iss.title ),
907
+ filename.filename ().string (), " C++ library issue. Status: " + iss.stat );
889
908
print_issue (out, iss, section_db, all_issues, issues_by_status, active_issues, print_issue_type::individual);
890
909
print_file_trailer (out);
891
910
}
0 commit comments