예제 #1
0
std::string Stencil::page(void) const {
	// Get base document
	Html::Document doc = Component_page_doc<Stencil>(*this);
	Html::Node head = doc.find("head");
	Html::Node body = doc.find("body");

	// Extra metadata
	head.append("meta",{
		{"itemprop","contexts"},
		{"content",join(contexts(),",")}
	});

	// Add stencil content to the main element and give #content id
	auto main = body.select("main");
	main.attr("id","content");
	main.append(*this);

	return doc.dump(false);
}