pub fn render_excerpt(&mut self,
                          globals: &liquid::Object,
                          parser: &template::LiquidParser,
                          syntax_theme: &str)
                          -> Result<()> {
        let value = if let Some(excerpt_str) = self.front.excerpt.as_ref() {
            let excerpt = self.render_html(excerpt_str, globals, parser, syntax_theme)?;
            Value::Str(excerpt)
        } else if self.front.excerpt_separator.is_empty() {
            Value::Nil
        } else {
            let excerpt = extract_excerpt(&self.content,
                                          self.front.format,
                                          &self.front.excerpt_separator);
            let excerpt = self.render_html(&excerpt, globals, parser, syntax_theme)?;
            Value::Str(excerpt)
        };

        self.attributes.insert("excerpt".to_owned(), value);
        Ok(())
    }
/// Renders excerpt and adds it to attributes of the document.
Renders excerpt and adds it to attributes of the document.
Renders excerpt and adds it to attributes of the document .
pub fn render_excerpt(&mut self,
                          globals: &liquid::Object,
                          parser: &template::LiquidParser,
                          syntax_theme: &str)
                          -> Result<()> {
        let value = if let Some(excerpt_str) = self.front.excerpt.as_ref() {
            let excerpt = self.render_html(excerpt_str, globals, parser, syntax_theme)?;
            Value::Str(excerpt)
        } else if self.front.excerpt_separator.is_empty() {
            Value::Nil
        } else {
            let excerpt = extract_excerpt(&self.content,
                                          self.front.format,
                                          &self.front.excerpt_separator);
            let excerpt = self.render_html(&excerpt, globals, parser, syntax_theme)?;
            Value::Str(excerpt)
        };
        self.attributes.insert("excerpt".to_owned(), value);
        Ok(())
    }
pub fn render_excerpt ( & mut self , globals : & liquid :: Object , parser : & template :: LiquidParser , syntax_theme : & str ) -> Result < ( ) > { let value = if let Some ( excerpt_str ) = self . front . excerpt . as_ref ( ) { let excerpt = self . render_html ( excerpt_str , globals , parser , syntax_theme ) ? ; Value :: Str ( excerpt ) } else if self . front . excerpt_separator . is_empty ( ) { Value :: Nil } else { let excerpt = extract_excerpt ( & self . content , self . front . format , & self . front . excerpt_separator ) ; let excerpt = self . render_html ( & excerpt , globals , parser , syntax_theme ) ? ; Value :: Str ( excerpt ) } ; self . attributes . insert ( " " . to_owned ( ) , value ) ; Ok ( ( ) ) }
Renders excerpt and adds it to attributes of the document.
Renders excerpt and adds it to attributes of the document .
&mut self
globals
&liquid::Object
parser
&template::LiquidParser
syntax_theme
&str
&mut self
globals
&liquid::Object
parser
&template::LiquidParser
syntax_theme
&str