Fixed rust example in doc + some tweaks for html validation
This commit is contained in:
parent
05ab31d882
commit
a0040733e9
|
@ -8,11 +8,12 @@ integrate it in current projects. Here is a short example:
|
||||||
extern crate mdBook;
|
extern crate mdBook;
|
||||||
|
|
||||||
use mdBook::MDBook;
|
use mdBook::MDBook;
|
||||||
|
use std::path::Path;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let book = MDBook::new("my-book") // Path to root
|
let book = MDBook::new(Path::new("my-book")) // Path to root
|
||||||
.set_src("src") // Path from root to source directory
|
.set_src(Path::new("src")) // Path from root to source directory
|
||||||
.set_dest("book") // Path from root to output directory
|
.set_dest(Path::new("book")) // Path from root to output directory
|
||||||
.read_config() // Parse book.json file for configuration
|
.read_config() // Parse book.json file for configuration
|
||||||
|
|
||||||
book.build().unwrap(); // Render the book
|
book.build().unwrap(); // Render the book
|
||||||
|
|
|
@ -7,10 +7,10 @@
|
||||||
<meta name="description" content="{% block description %}{% endblock %}">
|
<meta name="description" content="{% block description %}{% endblock %}">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}book.css" media="screen" title="no title" charset="utf-8">
|
<link rel="stylesheet" href="{{ path_to_root }}book.css">
|
||||||
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
<link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/css'>
|
||||||
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
<link rel="stylesheet" href="http://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
|
||||||
<link rel="stylesheet" href="{{ path_to_root }}highlight.css" media="screen" title="no title" charset="utf-8">
|
<link rel="stylesheet" href="{{ path_to_root }}highlight.css">
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue