From 8492565266890b75f93859697faca2108b767fea Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Mon, 23 Jan 2023 00:25:12 +0330 Subject: [PATCH 1/4] add first commit --- .pre-commit-config.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .pre-commit-config.yaml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000..ca7e4654 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,10 @@ +# See https://pre-commit.com for more information +# See https://pre-commit.com/hooks.html for more hooks +repos: +- repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.3.0 + hooks: + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-yaml + - id: check-added-large-files From b419d0210707f38b9e0947e68b6de8ae88663350 Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Mon, 23 Jan 2023 00:43:29 +0330 Subject: [PATCH 2/4] add pre-commit config --- .pre-commit-config.yaml | 17 +++++++++++++---- content/_index.md | 2 +- content/blog/_index.md | 2 +- content/blog/first-blog/index.md | 2 +- layouts/404.html | 2 +- layouts/_default/single.html | 2 +- layouts/index.html | 8 ++++---- layouts/partials/footer.html | 2 +- layouts/partials/head.html | 4 ++-- layouts/partials/scripts/hamburger.html | 2 +- postcss.config.js | 2 +- sass/_base.scss | 2 +- 12 files changed, 28 insertions(+), 19 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ca7e4654..9e1fd5a5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,16 @@ repos: - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - - id: trailing-whitespace - - id: end-of-file-fixer - - id: check-yaml - - id: check-added-large-files + - id: trailing-whitespace + - id: end-of-file-fixer + - id: check-added-large-files + - id: check-json + - id: check-merge-conflict + - id: check-toml + - id: check-xml + - id: check-yaml + - id: end-of-file-fixer + - id: mixed-line-ending + - id: pretty-format-json + - id: trailing-whitespace + args: [ --markdown-linebreak-ext=md ] diff --git a/content/_index.md b/content/_index.md index 5f523a2b..b8b2192b 100644 --- a/content/_index.md +++ b/content/_index.md @@ -1,7 +1,7 @@ **Albert Einstein** was a German-born theoretical physicist, widely acknowledged to be one of the greatest and most influential physicists of all time. He is best known for developing the ***theory of relativity***, but he also made important contributions to the development of ***quantum mechanics***. Together ***relativity*** and ***quantum mechanics*** formed the two pillars of modern physics. His ***mass–energy*** equivalence formula `E = mc²`, which arises from relativity theory, has been dubbed *"the world's most famous equation"*. His work is also known for its influence on the philosophy of science. - + He received the 1921 Nobel Prize in Physics *"for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect"*, a pivotal step in the development of ***quantum theory***. His intellectual achievements and originality resulted in *"Einstein"* becoming synonymous with *"genius"*. ***Einsteinium***, one of the synthetic elements in the periodic table, was named in his honor. *Source: Wikipedia, CC-BY-SA-3.0* diff --git a/content/blog/_index.md b/content/blog/_index.md index af65566b..1ff6a397 100644 --- a/content/blog/_index.md +++ b/content/blog/_index.md @@ -1,3 +1,3 @@ --- title: list template ---- \ No newline at end of file +--- diff --git a/content/blog/first-blog/index.md b/content/blog/first-blog/index.md index 98e4cbee..ea4a1181 100644 --- a/content/blog/first-blog/index.md +++ b/content/blog/first-blog/index.md @@ -3,4 +3,4 @@ title: First blog decritption: This is the first blog post --- -Add the stuff here. \ No newline at end of file +Add the stuff here. diff --git a/layouts/404.html b/layouts/404.html index 0df9d3ae..e2b0d284 100644 --- a/layouts/404.html +++ b/layouts/404.html @@ -3,4 +3,4 @@

404: Page not found!

Looks like there has been a mistake. Try going back to the homepage.

-{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index bc22ef8c..5fb0e0fe 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -3,7 +3,7 @@

{{ .Page.Title }}

- + {{ with .Page.Params.description }}

{{ . }}

{{ end }} diff --git a/layouts/index.html b/layouts/index.html index e4564eda..bca384c8 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -5,10 +5,10 @@

{{ .Site.Params.firstName }} {{ .Site.Params.lastName }} {{ else }} - {{ .Site.Title }} + {{ .Site.Title }} {{ end }}

- + {{ with .Site.Params.description }}

{{ . }}

{{ end }} @@ -24,8 +24,8 @@

{{ . }}

{{ .Site.Params.email }}

- +
{{ .Content }}
-{{ end }} \ No newline at end of file +{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index f69b9e96..484f9b33 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -3,7 +3,7 @@ {{ . }} {{ end }} • - Powered by Hugo with + Powered by Hugo with Academic Folio theme {{ if .Site.Params.footerLastUpdated }} • diff --git a/layouts/partials/head.html b/layouts/partials/head.html index 13a4efbc..fb81e0d6 100644 --- a/layouts/partials/head.html +++ b/layouts/partials/head.html @@ -23,7 +23,7 @@ {{ $tailwindStyles = $tailwindStyles | resources.ExecuteAsTemplate (printf "tailwind.dev.%v.css" now.UnixMilli) . }} {{ $styles = $styles | resources.ExecuteAsTemplate (printf "main.dev.%v.css" now.UnixMilli) . }} {{ end }} - + {{/* Stylesheets */}} @@ -31,4 +31,4 @@ {{/* Scripts */}} {{ partial "scripts/hamburger.html" . }} {{ partial "scripts/theme.html" . }} - \ No newline at end of file + diff --git a/layouts/partials/scripts/hamburger.html b/layouts/partials/scripts/hamburger.html index bb688cfc..a2acc38f 100644 --- a/layouts/partials/scripts/hamburger.html +++ b/layouts/partials/scripts/hamburger.html @@ -2,4 +2,4 @@ function hamburger() { document.getElementById("hamburger-menu").classList.toggle("hidden") } - \ No newline at end of file + diff --git a/postcss.config.js b/postcss.config.js index ca0c0cda..b28b7e10 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -3,4 +3,4 @@ module.exports = { tailwindcss: {}, autoprefixer: {}, } -} \ No newline at end of file +} diff --git a/sass/_base.scss b/sass/_base.scss index 3f9de1ce..3d77bf19 100644 --- a/sass/_base.scss +++ b/sass/_base.scss @@ -43,4 +43,4 @@ nav .active a { #hamburger span { background-color: var(--global-text-color); -} \ No newline at end of file +} From 32322bbd6e71b2f61bd198379df2fb8eb200fc8d Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Mon, 23 Jan 2023 00:45:49 +0330 Subject: [PATCH 3/4] fix pre-commit config --- .pre-commit-config.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 9e1fd5a5..6f247114 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -5,7 +5,6 @@ repos: rev: v4.3.0 hooks: - id: trailing-whitespace - - id: end-of-file-fixer - id: check-added-large-files - id: check-json - id: check-merge-conflict From b567f4697b5c5bedcd63e5f100321e54deb0c4e3 Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Mon, 23 Jan 2023 00:56:03 +0330 Subject: [PATCH 4/4] fix typos automatically --- .pre-commit-config.yaml | 7 ++++++- content/teaching.md | 2 +- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 6f247114..abf3662d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,7 +1,7 @@ # See https://pre-commit.com for more information # See https://pre-commit.com/hooks.html for more hooks repos: -- repo: https://github.com/pre-commit/pre-commit-hooks + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.3.0 hooks: - id: trailing-whitespace @@ -16,3 +16,8 @@ repos: - id: pretty-format-json - id: trailing-whitespace args: [ --markdown-linebreak-ext=md ] + + - repo: https://github.com/crate-ci/typos + rev: v1.13.8 + hooks: + - id: typos diff --git a/content/teaching.md b/content/teaching.md index e24b8a6c..b8fa7253 100644 --- a/content/teaching.md +++ b/content/teaching.md @@ -1,6 +1,6 @@ --- title: "Teaching" -description: "A breif note on Albert Einstein's teaching experiences" +description: "A brief note on Albert Einstein's teaching experiences" --- By 1908, Albert Einstein was recognized as a leading scientist and was appointed lecturer at the University of Bern. The following year, after he gave a lecture on electrodynamics and the relativity principle at the University of Zurich, Alfred Kleiner recommended him to the faculty for a newly created professorship in theoretical physics. Einstein was appointed associate professor in 1909.