File tree Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Expand file tree Collapse file tree 3 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 11[book ]
2- title = " CXX "
2+ # title = "Rust ♡ C++ "
33authors = [" David Tolnay" ]
4- description = " Guide for the `cxx` crate, a safe approach to FFI between Rust and C++. "
4+ description = " CXX — safe interop between Rust and C++"
55
66[rust ]
77edition = " 2018"
Original file line number Diff line number Diff line change @@ -14,6 +14,15 @@ https://github.com/dtolnay/cxx\
1414</a>\
1515</li>` ;
1616
17+ const opengraph = `\
18+ <meta property="og:image" content="https://cxx.rs/cxx.png" />\
19+ <meta property="og:site_name" content="CXX" />\
20+ <meta property="og:title" content="CXX — safe interop between Rust and C++" />\
21+ <meta name="twitter:image:src" content="https://cxx.rs/cxx.png" />\
22+ <meta name="twitter:site" content="@davidtolnay" />\
23+ <meta name="twitter:card" content="summary" />\
24+ <meta name="twitter:title" content="CXX — safe interop between Rust and C++" />` ;
25+
1726const htmljs = `\
1827var html = document.querySelector('html');
1928html.classList.remove('no-js');
@@ -37,6 +46,7 @@ while (dirs.length) {
3746 const index = fs . readFileSync ( path , 'utf8' ) ;
3847 const $ = cheerio . load ( index , { decodeEntities : false } ) ;
3948
49+ $ ( 'head' ) . append ( opengraph ) ;
4050 $ ( 'script:nth-of-type(3)' ) . text ( htmljs ) ;
4151 $ ( 'nav#sidebar ol.chapter' ) . append ( githublink ) ;
4252 $ ( 'head link[href="tomorrow-night.css"]' ) . attr ( 'disabled' , true ) ;
You can’t perform that action at this time.
0 commit comments