From 16264885e84b5f305f624d10715d9ac05d94d41c Mon Sep 17 00:00:00 2001 From: Kevin Woo Date: Fri, 30 Oct 2020 13:26:49 -0700 Subject: [PATCH] chore(formatting): add .editorconfigs (#292) --- .editorconfig | 20 ++++++++ .github/workflows/mlc_config.json | 46 +++++++++--------- layouts/docs/release-notes-archive.html | 22 ++++----- layouts/partials/footer.html | 14 +++--- .../partials/list-archived-release-notes.html | 48 +++++++++---------- layouts/partials/section-index.html | 26 +++++----- 6 files changed, 97 insertions(+), 79 deletions(-) create mode 100644 .editorconfig diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000..dd2a0096 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,20 @@ +# https://editorconfig.org + +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 2 +indent_style = space +trim_trailing_whitespace = true + +[*.go] +indent_size = 8 +indent_style = tab + +[*.js] +insert_final_newline = true + +[*.md] +trim_trailing_whitespace = false diff --git a/.github/workflows/mlc_config.json b/.github/workflows/mlc_config.json index b7e12ad9..f46b753d 100644 --- a/.github/workflows/mlc_config.json +++ b/.github/workflows/mlc_config.json @@ -1,25 +1,25 @@ { - "ignorePatterns": [ - { - "pattern": "/^images/(*.*)" - }, - { - "pattern": "/^Images/(*.*)" - }, - { - "pattern": "^http://localhost:9000" - }, - { - "pattern": "^http://gate.org.com:8084" - }, - { - "pattern": "^http://demo.armory.io" - }, - { - "pattern": "^https://github.com/organizations/your_org_here/settings/hooks" - }, - { - "pattern": "^http://opa.opaserver:8181" - } - ] + "ignorePatterns": [ + { + "pattern": "/^images/(*.*)" + }, + { + "pattern": "/^Images/(*.*)" + }, + { + "pattern": "^http://localhost:9000" + }, + { + "pattern": "^http://gate.org.com:8084" + }, + { + "pattern": "^http://demo.armory.io" + }, + { + "pattern": "^https://github.com/organizations/your_org_here/settings/hooks" + }, + { + "pattern": "^http://opa.opaserver:8181" + } + ] } diff --git a/layouts/docs/release-notes-archive.html b/layouts/docs/release-notes-archive.html index 964a394d..baa52a5e 100644 --- a/layouts/docs/release-notes-archive.html +++ b/layouts/docs/release-notes-archive.html @@ -1,20 +1,20 @@ {{ define "main" }}
-

{{ .Title }}

+

{{ .Title }}

{{ with .Params.description }}
{{ . | markdownify }}
{{ end }} - {{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }} + {{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }} {{ partial "reading-time.html" . }} {{ end }} - {{ .Content }} + {{ .Content }} {{ partial "list-archived-release-notes.html" . }} - {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} - {{ partial "feedback.html" .Site.Params.ui.feedback }} -
- {{ end }} - {{ if (.Site.DisqusShortname) }} -
- {{ partial "disqus-comment.html" . }} + {{ if (and (not .Params.hide_feedback) (.Site.Params.ui.feedback.enable) (.Site.GoogleAnalytics)) }} + {{ partial "feedback.html" .Site.Params.ui.feedback }} +
+ {{ end }} + {{ if (.Site.DisqusShortname) }} +
+ {{ partial "disqus-comment.html" . }} {{ end }} -
{{ partial "page-meta-lastmod.html" . }}
+
{{ partial "page-meta-lastmod.html" . }}
{{ end }} diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 116b2214..0331567f 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -18,17 +18,17 @@
{{ with .Site.Params.copyright }}© {{ now.Year}} {{ .}} {{ T "footer_all_rights_reserved" }}{{ end }} -
+
- {{ with .Site.Params.terms_and_conditions }}{{ T "footer_terms_and_conditions" }}{{ end }} + {{ with .Site.Params.terms_and_conditions }}{{ T "footer_terms_and_conditions" }}{{ end }} - {{ with .Site.Params.terms_of_service }}{{ T "footer_terms_of_service" }}{{ end }} + {{ with .Site.Params.terms_of_service }}{{ T "footer_terms_of_service" }}{{ end }} - {{ with .Site.Params.privacy_policy }}{{ T "footer_privacy_policy" }}{{ end }} + {{ with .Site.Params.privacy_policy }}{{ T "footer_privacy_policy" }}{{ end }} - {{ if not .Site.Params.ui.footer_about_disable }} - {{ with .Site.GetPage "about" }}

{{ .Title }}

{{ end }} - {{ end }} + {{ if not .Site.Params.ui.footer_about_disable }} + {{ with .Site.GetPage "about" }}

{{ .Title }}

{{ end }} + {{ end }}
diff --git a/layouts/partials/list-archived-release-notes.html b/layouts/partials/list-archived-release-notes.html index b3927003..4a64f943 100644 --- a/layouts/partials/list-archived-release-notes.html +++ b/layouts/partials/list-archived-release-notes.html @@ -1,34 +1,32 @@
- {{ $pages := (where .Site.Pages "Section" .Section).ByWeight }} - {{ $pagesReverse := (where .Site.Pages "Section" .Section).ByWeight.Reverse }} - {{ $parent := .Page }} +{{ $pages := (where .Site.Pages "Section" .Section).ByWeight }} +{{ $pagesReverse := (where .Site.Pages "Section" .Section).ByWeight.Reverse }} +{{ $parent := .Page }} - + {{end}} +
diff --git a/layouts/partials/section-index.html b/layouts/partials/section-index.html index f1989c99..e48054e4 100644 --- a/layouts/partials/section-index.html +++ b/layouts/partials/section-index.html @@ -6,32 +6,32 @@ {{/* If no_list is true we don't show a list of subpages */}} {{ else if $parent.Params.simple_list }} {{/* If simple_list is true we show a bulleted list of subpages */}} - {{ else if $parent.Params.simple_list_reverse }} - {{ else }} {{/* Otherwise we show a nice formatted list of subpages with page descriptions */}} -
+
{{ range $pages }} {{ if eq .Parent $parent }} -
-
- {{- .Title -}} -
-

{{ .Description | markdownify }}

-
+
+
+ {{- .Title -}} +
+

{{ .Description | markdownify }}

+
{{ end }} {{ end }} {{ end }}