@@ -90,10 +90,6 @@ struct ParseContext {
9090 fn_lines: HashMap<String, usize>,
9191 /// Line numbers of attribute bundle definitions (name -> line)
9292 define_lines: HashMap<String, usize>,
93− /// Canonical URL
94− canonical: Option<String>,
95− /// Base URL for relative links
96− base_url: Option<String>,
9793}
9894
9995/// Evaluates a syntax tree (see `syntax.rs`) into the document's nodes.
@@ -170,8 +166,6 @@ pub fn parse_with_base(input: &str, base_path: Option<&Path>) -> ParseResult {
170166 let_lines: HashMap::new(),
171167 fn_lines: HashMap::new(),
172168 define_lines: HashMap::new(),
173− canonical: None,
174− base_url: None,
175169 };
176170 load_prelude(&mut ctx);
177171 let nodes = Evaluator.eval_block(&tree, &mut ctx);
@@ -189,8 +183,6 @@ pub fn parse_with_base(input: &str, base_path: Option<&Path>) -> ParseResult {
189183 css_vars: ctx.css_vars,
190184 custom_css: ctx.custom_css,
191185 og_tags: ctx.og_tags,
192− canonical: ctx.canonical,
193− base_url: ctx.base_url,
194186 nodes,
195187 },
196188 diagnostics: ctx.diagnostics,
@@ -292,7 +284,7 @@ impl Evaluator {
292284 });
293285 }
294286
295− // @page [lang en, favicon /f.png, canonical URL, base URL] Title
287+ // @page [lang en, favicon /f.png] Title
296288 if let Some(rest) = content.strip_prefix("@page ") {
297289 let rest = rest.trim_start();
298290 let title = if rest.starts_with('[') {
@@ -302,13 +294,11 @@ impl Evaluator {
302294 match attr.key.as_str() {
303295 "lang" => ctx.lang = Some(value),
304296 "favicon" => ctx.favicon = Some(value),
305− "canonical" => ctx.canonical = Some(value),
306− "base" => ctx.base_url = Some(value),
307297 other => ctx.diagnostics.push(Diagnostic {
308298 line: line_num,
309299 column: None,
310300 message: format!(
311− "unknown @page attribute '{}' (expected lang, favicon, canonical or base)",
301+ "unknown @page attribute '{}' (expected lang or favicon)",
312302 other
313303 ),
314304 severity: Severity::Warning,
@@ -1447,8 +1437,8 @@ const REMOVED_SYNTAX: &[(&str, &str)] = &[
14471437 ("@css-property", "write an `@property` rule in an `@style` block"),
14481438 ("@lang", "use `@page [lang ...] Title`"),
14491439 ("@favicon", "use `@page [favicon ...] Title`"),
1450− ("@canonical", "use `@page [canonical ...] Title`"),
1451− ("@base", "use `@page [base ...] Title`"),
1440+ ("@canonical", "write `<link rel=\"canonical\" href=\"...\">` in `@head`"),
1441+ ("@base", "write `<base href=\"...\">` in `@head`"),
14521442 ("@og", "use `@meta og:NAME VALUE`"),
14531443 ("@debug", "removed: a layout needs no compile-time messages"),
14541444 ("@svg", "use `@image [inline] file.svg`"),