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 1
1
[book ]
2
- title = " CXX "
2
+ # title = "Rust ♡ C++ "
3
3
authors = [" 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++"
5
5
6
6
[rust ]
7
7
edition = " 2018"
Original file line number Diff line number Diff line change @@ -14,6 +14,15 @@ https://github.com/dtolnay/cxx\
14
14
</a>\
15
15
</li>` ;
16
16
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
+
17
26
const htmljs = `\
18
27
var html = document.querySelector('html');
19
28
html.classList.remove('no-js');
@@ -37,6 +46,7 @@ while (dirs.length) {
37
46
const index = fs . readFileSync ( path , 'utf8' ) ;
38
47
const $ = cheerio . load ( index , { decodeEntities : false } ) ;
39
48
49
+ $ ( 'head' ) . append ( opengraph ) ;
40
50
$ ( 'script:nth-of-type(3)' ) . text ( htmljs ) ;
41
51
$ ( 'nav#sidebar ol.chapter' ) . append ( githublink ) ;
42
52
$ ( 'head link[href="tomorrow-night.css"]' ) . attr ( 'disabled' , true ) ;
You can’t perform that action at this time.
0 commit comments