Skip to content

Commit fd9221c

Browse files
committed
chore: Fix spelling errors
1 parent 946ffb4 commit fd9221c

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed

Diff for: contrib/cobalt-git-deploy

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ and `right` of STAGE-DIR to check out the contents of the current
4949
master branch of the bare git repository, which must exist in the
5050
current working directory. It will then build the site in one of these
5151
directories using cobalt. If successful, DEPLOY-DIR will be updated
52-
with a symblic link pointing to generated `_site` directory.
52+
with a symbolic link pointing to generated `_site` directory.
5353
EOF
5454
}
5555

Diff for: src/cobalt.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ use crate::cobalt_model::files;
1212
use crate::cobalt_model::permalink;
1313
use crate::cobalt_model::Collection;
1414
use crate::cobalt_model::{Config, Minify, SortOrder};
15-
use crate::document::{Document, RenderContex};
15+
use crate::document::{Document, RenderContext};
1616
use crate::error::*;
1717
use crate::pagination;
1818

@@ -221,7 +221,7 @@ fn generate_doc(
221221
liquid::model::Value::Object(doc.attributes.clone()),
222222
);
223223
{
224-
let render_context = RenderContex {
224+
let render_context = RenderContext {
225225
parser: &context.liquid,
226226
markdown: &context.markdown,
227227
vimwiki: &context.vimwiki,
@@ -242,7 +242,7 @@ fn generate_doc(
242242
"page".into(),
243243
liquid::model::Value::Object(doc.attributes.clone()),
244244
);
245-
let render_context = RenderContex {
245+
let render_context = RenderContext {
246246
parser: &context.liquid,
247247
markdown: &context.markdown,
248248
vimwiki: &context.vimwiki,

Diff for: src/document.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ use crate::cobalt_model::slug;
1717
use crate::cobalt_model::Minify;
1818
use crate::error::*;
1919

20-
pub struct RenderContex<'a> {
20+
pub struct RenderContext<'a> {
2121
pub parser: &'a cobalt_model::Liquid,
2222
pub markdown: &'a cobalt_model::Markdown,
2323
pub vimwiki: &'a cobalt_model::Vimwiki,
@@ -26,12 +26,12 @@ pub struct RenderContex<'a> {
2626
}
2727

2828
#[cfg(not(feature = "html-minifier"))]
29-
fn minify_if_enabled(html: String, _context: &RenderContex, _file_path: &Path) -> Result<String> {
29+
fn minify_if_enabled(html: String, _context: &RenderContext, _file_path: &Path) -> Result<String> {
3030
Ok(html)
3131
}
3232

3333
#[cfg(feature = "html-minifier")]
34-
fn minify_if_enabled(html: String, context: &RenderContex, file_path: &Path) -> Result<String> {
34+
fn minify_if_enabled(html: String, context: &RenderContext, file_path: &Path) -> Result<String> {
3535
let extension = file_path.extension().unwrap_or_else(Default::default);
3636
if context.minify.html && (extension == "html" || extension == "htm") {
3737
Ok(html_minifier::minify(html)?)
@@ -299,7 +299,7 @@ impl Document {
299299
/// Takes `content` string and returns rendered HTML. This function doesn't
300300
/// take `"extends"` attribute into account. This function can be used for
301301
/// rendering content or excerpt.
302-
fn render_html(&self, content: &str, context: &RenderContex) -> Result<String> {
302+
fn render_html(&self, content: &str, context: &RenderContext) -> Result<String> {
303303
let html = if self.front.templated {
304304
let template = context.parser.parse(content)?;
305305
template.render(context.globals)?
@@ -322,7 +322,7 @@ impl Document {
322322
/// given, or extracted from the content, if `excerpt_separator` is not
323323
/// empty. When neither condition applies, the excerpt is set to the `Nil`
324324
/// value.
325-
pub fn render_excerpt(&mut self, context: &RenderContex) -> Result<()> {
325+
pub fn render_excerpt(&mut self, context: &RenderContext) -> Result<()> {
326326
let value = if let Some(excerpt_str) = self.front.excerpt.as_ref() {
327327
let excerpt = self.render_html(excerpt_str, context)?;
328328
Value::scalar(excerpt)
@@ -345,7 +345,7 @@ impl Document {
345345
/// Renders the content and adds it to attributes of the document.
346346
///
347347
/// When we say "content" we mean only this document without extended layout.
348-
pub fn render_content(&mut self, context: &RenderContex) -> Result<()> {
348+
pub fn render_content(&mut self, context: &RenderContext) -> Result<()> {
349349
let content_html = self.render_html(&self.content, context)?;
350350
self.attributes
351351
.insert("content".into(), Value::scalar(content_html));
@@ -359,7 +359,7 @@ impl Document {
359359
/// * layout may be inserted to layouts cache
360360
pub fn render(
361361
&mut self,
362-
context: &RenderContex,
362+
context: &RenderContext,
363363
layouts: &HashMap<String, String>,
364364
) -> Result<String> {
365365
if let Some(ref layout) = self.front.layout {

Diff for: typos.toml

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[default.extend-words]
2+
# flate crate
3+
flate = "flate"

0 commit comments

Comments
 (0)