”, that haven’t be updated:
+ https://www.npmjs.com/package/check-pages#noemptyfragments
+ ###
+ noEmptyFragments: true
+
+ ###
+ [INFO] Fail if link to localhost are encountered;
+ this option detect temporary links from development.
+ Use it in production, not in development:
+ https://www.npmjs.com/package/check-pages#nolocallinks
+ ###
+ noLocalLinks: false
+
+ ###
+ [INFO] Fail task, if any redirect are encountered:
+ https://www.npmjs.com/package/check-pages#noredirects
+ ###
+ noRedirects: true
+
+ ###
+ [INFO] Check solely internal, not third-party links:
+ https://www.npmjs.com/package/check-pages#onlysamedomain
+ ###
+ onlySameDomain: true
+
+ ###
+ [INFO] Fail task, if we use HTTP link, when https is also valid:
+ https://www.npmjs.com/package/check-pages#prefersecure
+ ###
+ preferSecure: true
+
+ ###
+ [INFO] Verify links with file hashes as “styles.css?md5=4f47458e34bc855a46349c1335f58cc3”:
+ https://www.npmjs.com/package/check-pages#queryhashes
+ ###
+ queryHashes: true
+
+ ###
+ [INFO] Verifies the HTTP Cache-Control and ETag response headers are present and valid:
+ https://www.npmjs.com/package/check-pages#checkcaching
+
+ [FIXME][ISSUE] “checkCaching”, “checkXhtml” and “checkCompression”
+ works incorrectly on localhost.
+ Therefore, “false”
+ ###
+ checkCaching: false
+
+ ###
+ [INFO] Parse each URL’s content as XHTML:
+ https://www.npmjs.com/package/check-pages#checkxhtml
+ ###
+ checkXhtml: false
+
+ ###
+ [INFO] Verifies the HTTP Content-Encoding response header is present and valid
+ https://www.npmjs.com/package/check-pages#checkcompression
+ ###
+ checkCompression: false
+
+ ###
+ [INFO] Show summary results after all checks:
+ https://www.npmjs.com/package/check-pages#summary
+ ###
+ summary: true
+
+ ###
+ [INFO] Brief overview instead of default verbose output:
+ https://www.npmjs.com/package/check-pages#terse
+ ###
+ terse: false
+
+ ###
+ [INFO] Maximum time in milliseconds (not seconds) a page request can take a finish downloading:
+ https://www.npmjs.com/package/check-pages#maxresponsetime
+ ###
+ maxResponseTime: 7000
+
+ ###
+ [INFO] Custom User-Agent:
+ https://www.npmjs.com/package/check-pages#useragent
+ https://www.whoishostingthis.com/tools/user-agent/
+ ###
+ # userAgent: "default"
diff --git a/grunt/clean-console.coffee b/grunt/clean-console.coffee
index 89fb566a..984663a0 100644
--- a/grunt/clean-console.coffee
+++ b/grunt/clean-console.coffee
@@ -17,7 +17,7 @@ module.exports =
options:
# [FIXME] Check all URLs instead of specific, when fix Pelican categories and tags:
# https://stackoverflow.com/q/54388924/5951529
- # url: ["<%= templates.getFiles() %>"]
+ # url: ["<%= templates.all_html_array %>"]
# [BUG] Not include index.html, due to AdSense scripts:
# https://github.com/Kristinita/SashaMiscellaneous/issues/20
# [BUG] Non-ASCII symbols in path doesn't support; URL decoding required;
@@ -40,5 +40,5 @@ module.exports =
%D0%9D%D0%BE%D0%B2%D1%8B%D0%B5-%D0%BD%D0%B5%D0%B4%D0%BE%D0%B2%D0%BE%D0%BB%D1%8C%D0%BD%D1%8B%D0%B5\
-%D1%80%D1%83%D1%81%D1%81%D0%BA%D0%B8%D0%B5.html"
"http://localhost:4147/<%= templates.yamlconfig.OUTPUT_PATH %>/Sublime-Text/Sacagawea.html"]
- # Second to wait any error
+ # [INFO] Second to wait any error
timeout: 4
diff --git a/grunt/concurrent.coffee b/grunt/concurrent.coffee
index 43f64e16..6d0256b7 100644
--- a/grunt/concurrent.coffee
+++ b/grunt/concurrent.coffee
@@ -1,15 +1,20 @@
######################
## grunt-concurrent ##
######################
-# Run multiple tasks:
-# https://www.npmjs.com/package/grunt-concurrent
+###
+[ACTION] Run multiple tasks:
+https://www.npmjs.com/package/grunt-concurrent
+###
+
+
#################
## grunt-newer ##
#################
-# grunt-newer
-# Run task, if src files change.
-# https://www.npmjs.com/package/grunt-newer
-# https://www.html5rocks.com/en/tutorials/tooling/supercharging-your-gruntfile/#toc-buildtime
+###
+[ACTION] Run task, if src files change:
+https://www.npmjs.com/package/grunt-newer
+https://www.html5rocks.com/en/tutorials/tooling/supercharging-your-gruntfile/#toc-buildtime
+###
module.exports =
options:
@@ -37,12 +42,12 @@ module.exports =
tarb3: ['newer:coffee'
'newer:stylus']
tarb4: ['clean']
- # [FIXME] grunt-newer doesn't work with purifycss:
+ # [FIXME] grunt-newer doesn't work with purgecss:
# Warning: Cannot read property 'forEach' of undefined Use --force to continue.
- # https://github.com/purifycss/grunt-purifycss/issues/26
+ # https://github.com/purgecss/grunt-purgecss/issues/26
tarb5: ['curl'
'newer:string-replace'
- 'purifycss']
+ 'newer:purgecss']
tarb6: ['shell:tidymodify']
tarb7: ['newer:postcss:build']
tarb8: ['shell:eclintfix']
@@ -73,9 +78,6 @@ module.exports =
# Don't use “newer” for “move”! Files from “root-html” doesn't move.
# Don't use “newer” with “realFavicon”! “index.html” will not changed!
tarp3: ['license_finder'
- # [DONE]
- # [FIXME] realFavicon doesn't work after upgrade to Node.js 12:
- # https://github.com/RealFaviconGenerator/grunt-real-favicon/issues/46
'realFavicon'
'humans_txt'
'robotstxt'
@@ -94,30 +96,38 @@ module.exports =
tarp7: ['clean'
'curl'
'imagemin'
- 'purifycss']
+ 'purgecss']
tarp8: ['shell:tidymodify'
'postcss:build'
'uglify']
- tarp9: ['cssnano'
- 'critical']
+ tarp9: ['cssnano']
tarp10: ['cacheBust']
- tarp11: ['htmlmin']
- tarp12: ['shell:eclintfix']
- tarp13: ['notify:publish']
+ tarp11: ['critical']
+ tarp12: ['htmlmin']
+ tarp13: ['shell:eclintfix']
+ tarp14: ['notify:publish']
###
For updating dependencies, “target update”.
###
taru1: [
+ # [DONE]
+ # [PATCH] https://github.com/seaneking/poststylus/pull/28
+
# [FIXME] PostStylus doesn’t work after
# Autoprefixer update to version 10:
# https://github.com/postcss/autoprefixer/issues/1358
# https://github.com/postcss/autoprefixer/releases/tag/10.0.0
+
# [FIXME] grunt-critical works too slow after upgrade to 2.0.0;
# 1.1.3 — 1m42s
# 2.0.0 — 21m31s
# I downgraded it, because AppVeyor hangs:
# https://ci.appveyor.com/project/Kristinita/kristinitapelican/build/job/9pr390t692pr65oa#L2999
+ # [NOTE] grunt-critical + grunt-pageres + grunt-load-config issue:
+ # https://github.com/bezoerb/grunt-critical/issues/65
+
+ # [DONE]
# [FIXME] grunt-cwebp doesn’t convert images to webp in 3.0.1;
# I downgraded it:
# https://github.com/1000ch/grunt-cwebp/issues/14
@@ -133,50 +143,51 @@ module.exports =
For validating sources, “target sources”.
###
tars1: ['coffeelint:configs'
- # [DONE]
- # [FIXME]
- # content.trimEnd is not a function
- # https://travis-ci.org/github/Kristinita/KristinitaPelican/jobs/702631558#L1948-L1950
'markdownlint'
- # [DONE]
- # [FIXME] “.remarkrc.yaml” doesn't work
'remark'
'shell:bashate']
###
For validating output, “target validate”.
-
- [DONE]
- [FIXME] “html-nu” temporary disabled, because footnotes obsolete syntax:
- https://github.com/Python-Markdown/markdown/issues/768
- https://travis-ci.org/Kristinita/KristinitaPelican/jobs/471091236#L1220
###
tarv1: ['coffeelint:site'
- # [DONE]
- # [FIXME] “space: none”
'html-nu'
'path_validator'
'postcss:lint'
'shell:tidyvalidate'
'stylelint'
'stylint']
- tarv2: ['csslint'
+ tarv2: [
+ # [DEPRECATED] CSSLint is abandoned;
+ # I can’t ignore CSS parts with variables.
+ # https://github.com/CSSLint/csslint/issues/720
+ # https://github.com/CSSLint/csslint/issues/682
+ # 'csslint'
'shell:eclintcheck']
tarv3: ['notify:validate']
+
###
- For validating only in development mode, “target validate development”.
+ For validating solely in development mode, “target validate development”.
- [NOTE] clean-console only for development:
+ [INFO] I haven’t combined the tasks, because “clean-console” and “pageres” is multiprocessor
+ and can take up a lot of CPU.
+
+ [NOTE] clean-console solely for development:
Site developer can create new files → absolute links will not works in production →
- clean-console will shown errors. So only for development.
+ clean-console will shown errors. Therefore, solely for development.
[NOTE] clean-console works with http-server — “grunt http-server clean-console”.
See “clean-console.coffee” for details.
###
- tard1: ['clean-console'
- # [NOTE] Files by absolute paths may not exists
- 'pageres']
- tard2: ['notify:validate']
+ tard1: ['clean-console']
+ tard2: ['checkPages']
+ ###
+ [FIXME] pageres doesn’t work with grunt-critical:
+ https://github.com/bezoerb/grunt-critical/issues/65
+
+ tard3: ['pageres']
+ ###
+ tard3: ['notify:validate']
###
For Continuous Integration tasks, “target remote”.
@@ -192,9 +203,11 @@ module.exports =
'shell:shellcheck']
tarr2: ['notify:validate']
+
###
- [FIXME] “travis lint -x” successfully works for me,
- but after “shell:travislint” command prompt hangs
+ [BUG] “travis lint -x” successfully works for me,
+ but after “shell:travislint” command prompt hangs:
+ https://github.com/sindresorhus/grunt-shell/issues/121
###
###
[DONE]
@@ -208,6 +221,7 @@ module.exports =
###
# tarr2: ['shell:travislint']
+
###
For Travis CI specific tasks, not for local or another CI — “target travis”.
If task in this section, please, give reasons, why not local or another CI:
@@ -232,21 +246,19 @@ module.exports =
###
tarna1: ['htmlhint'
'htmllint'
+ # [DONE]
# [FIXME] AttributeError: module 'isort' has no attribute 'SortImports'
- # 'pylint'
+ 'pylint'
]
tarna2: ['notify:validate']
###
For tasks after site deploy — “target after deploy”:
[INFO] PageSpeed require remote site;
- I can't fix “Serve static assets with an efficient cache policy” for localhost
+ I can’t fix “Serve static assets with an efficient cache policy” for localhost
###
tarad1: [
- # [NOTE] “shell:shellcheck” not needed here!
- # Delete it after pagespeed will fixed!
- 'shell:shellcheck'
- # [FIXME] Bug “Warning: Expected a string”
- # 'pagespeed'
+ # [PATCH] https://github.com/jrcryer/grunt-pagespeed/pull/36
+ 'pagespeed'
]
tarad2: ['notify:validate']
diff --git a/grunt/critical.coffee b/grunt/critical.coffee
index 1d43feec..8a52f7db 100644
--- a/grunt/critical.coffee
+++ b/grunt/critical.coffee
@@ -2,24 +2,31 @@
# critical #
############
###
-Inline critical CSS for PageSpeed Insights:
+
+[INFO] Inline critical CSS for PageSpeed Insights:
https://www.npmjs.com/package/critical
http://prgssr.ru/development/razbiraemsya-s-kritichnym-css.html
https://medium.com/web-standards/critical-and-progressive-css-d6611f034d7d
-Grunt wrapper:
+https://web.dev/preload-critical-assets/
+
+[INFO] Grunt wrapper:
https://www.npmjs.com/package/grunt-critical
-Penthouse:
+
+[INFO] Penthouse:
https://www.npmjs.com/package/penthouse
https://www.npmjs.com/package/grunt-penthouse
+
[NOTE] Doesn't need special “mobile” critical CSS:
https://github.com/pocketjoso/penthouse/issues/171#issuecomment-320516807
I use default 1300/900 size.
-Options:
+
+[INFO] Options:
https://www.npmjs.com/package/critical#usage
https://www.npmjs.com/package/critical#options
-[NOTE] Critical use Penthouse + Puppeteer, but I don't use Penthouse direct, because Critical
+[NOTE] Critical use Penthouse + Puppeteer, but I don’t use Penthouse direct, because Critical
automatically inject CSS to HTML:
https://www.npmjs.com/package/critical#when-should-i-just-use-penthouse-directly
+
[NOTE] CSS should be duplicated in external CSS document:
1. Cache in external CSS
2. Problems with multiple HTML, linked to single CSS
diff --git a/grunt/csslint.coffee b/grunt/csslint.coffee
index e73d9309..00de691d 100644
--- a/grunt/csslint.coffee
+++ b/grunt/csslint.coffee
@@ -1,28 +1,36 @@
###########
# csslint #
###########
-# Linter for CSS:
-# http://csslint.net/
-# Grunt wrapper:
-# https://www.npmjs.com/package/grunt-contrib-csslint
-# Rules:
-# https://github.com/CSSLint/csslint/wiki/Rules
-# Grunt options:
-# https://www.npmjs.com/package/grunt-contrib-csslint#csslint-task
-# [INFO] Ignoring parts of CSS during linting:
-# https://github.com/CSSLint/csslint/wiki/Ignoring-parts-of-CSS-during-linting
-# [NOTE] Isn't possible ignore specific rules for specific lines:
-# https://stackoverflow.com/questions/29248792#comment103080092_35260823
-# [NOTE] Stylus single-line buffered comments doesn't worked for
-# CSSLint ignore rules per line; they still removed:
-# http://stylus-lang.com/docs/comments.html#multi-line-buffered
-# https://github.com/CSSLint/csslint/wiki/Ignoring-parts-of-CSS-during-linting#ignoring-rules-per-line
+###
+[OVERVIEW] Linter for CSS:
+http://csslint.net/
+
+[INFO] Grunt wrapper:
+https://www.npmjs.com/package/grunt-contrib-csslint
+
+[INFO] Rules:
+https://github.com/CSSLint/csslint/wiki/Rules
+
+[INFO] Grunt options:
+https://www.npmjs.com/package/grunt-contrib-csslint#csslint-task
+
+[INFO] Ignoring parts of CSS during linting:
+https://github.com/CSSLint/csslint/wiki/Ignoring-parts-of-CSS-during-linting
+
+[NOTE] Isn’t possible ignore specific rules for specific lines:
+https://stackoverflow.com/questions/29248792#comment103080092_35260823
+
+[NOTE] Stylus single-line buffered comments doesn’t worked for
+CSSLint ignore rules per line; they still removed:
+http://stylus-lang.com/docs/comments.html#multi-line-buffered
+https://github.com/CSSLint/csslint/wiki/Ignoring-parts-of-CSS-during-linting#ignoring-rules-per-line
+###
module.exports =
options:
csslintrc: '.csslintrc'
lint:
# [NOTE] “files” object doesn't work
src: [
- "<%= templates.yamlconfig.OUTPUT_PATH %>/**/*.css"
- "!<%= templates.yamlconfig.OUTPUT_PATH %>/**/*.min*css"
- ]
+ "<%= templates.yamlconfig.OUTPUT_PATH %>/**/*.css"
+ "!<%= templates.yamlconfig.OUTPUT_PATH %>/**/*.min*css"
+ ]
diff --git a/grunt/cssnano.coffee b/grunt/cssnano.coffee
index 2d72ce4e..862889bd 100644
--- a/grunt/cssnano.coffee
+++ b/grunt/cssnano.coffee
@@ -1,14 +1,19 @@
###########
# cssnano #
###########
-# CSS minifier:
-# http://cssnano.co/
-# https://www.npmjs.com/package/grunt-cssnano
-# Rules:
-# http://cssnano.co/guides/optimisations/
-# [NOTE] Delete “.beautified.css” files! cssnano incorrectly minify “.css” files, example:
-# Files: output/theme/css/general/basic.beautified.css, output/theme/css/general/basic.css ->
-# output/theme/css/general/basic.min.css
+###
+CSS minifier:
+http://cssnano.co/
+https://www.npmjs.com/package/grunt-cssnano
+Rules:
+http://cssnano.co/guides/optimisations/
+
+[INFO] CSS minification benchmark:
+https://goalsmashers.github.io/css-minification-benchmark/
+[NOTE] Delete “.beautified.css” files! cssnano incorrectly minify “.css” files, example:
+Files: output/theme/css/general/basic.beautified.css, output/theme/css/general/basic.css ->
+output/theme/css/general/basic.min.css
+###
module.exports =
options:
# [LEARN][CSS][JAVASCRIPT] Sourcemaps
diff --git a/grunt/cwebp.coffee b/grunt/cwebp.coffee
index f35c495f..4da8d4d8 100644
--- a/grunt/cwebp.coffee
+++ b/grunt/cwebp.coffee
@@ -1,20 +1,14 @@
###############
# grunt-cwebp #
###############
-# Convert images to webp:
+# [PURPOSE] Convert images to webp:
# https://www.npmjs.com/package/grunt-cwebp
+# Options (grunt-cwebp supports cwebp options):
+# https://developers.google.com/speed/webp/docs/cwebp#options
module.exports =
dynamic:
- options:
- ###
- # [NOTE] If “true”:
- # 1. src file will overwrite
- # 2. extension will the former, not “.webp”
- # I don’t recommend it.
- ###
- sameExt: false
###
- [NOTE] Don't use "<%= templates.paths.images %>", because it includes svg and gif, that
+ [NOTE] Don’t use "<%= templates.paths.images %>", because it includes svg and gif, that
not convert to webp
###
files: [
diff --git a/grunt/deprecated.coffee b/grunt/deprecated.coffee
index 337a909f..f6859f4c 100644
--- a/grunt/deprecated.coffee
+++ b/grunt/deprecated.coffee
@@ -5,12 +5,23 @@
# Save, because possibly I can use them again.
+# [FIXME] Re-install grunt-eslint, when I will have a time:
+# ################
+# # grunt-eslint #
+# ################
+# module.exports =
+# options:
+# maxWarnings: 40
+# lint:
+# files: "<%= templates.paths.js %>"
+
+
# ###################
# ## grunt-pelican ##
# ###################
# # Pelican tasks from Grunt
# # https://www.npmjs.com/package/grunt-pelican
-# # [WARNING] Pipenv doesn't work in Grunt Pelican
+# # [WARNING] Pipenv doesn’t work in Grunt Pelican:
# # https://github.com/chuwy/grunt-pelican/issues/4
# pelican:
# options:
@@ -46,7 +57,7 @@
########################
## grunt-text-replace ##
########################
-# # [DEPRECATED] grunt-string-replace active maintained
+# # [DECLINED] grunt-string-replace active maintained
# # https://www.npmjs.com/package/grunt-string-replace
# # Replace text, using regex
# # https://github.com/yoniholmes/grunt-text-replace
@@ -90,14 +101,18 @@
# ]
+# [DECLINED] Currently, I don’t need posthtml plugins
# ####################
# ## grunt-posthtml ##
# ####################
# # PostHTML wrapper for Grunt:
# # https://www.npmjs.com/package/grunt-posthtml
# # https://www.npmjs.com/package/posthtml
-# # [BUG] Any PostHTML plugin doesn't work for me, details:
+# # [NOTE] Any default PostHTML plugin doesn't work for me, details:
# # https://github.com/TCotton/grunt-posthtml/issues/3
+# # [INFO] Use grunt-juwain-posthtml, it fix this problem:
+# # https://github.com/posthtml/grunt-posthtml/issues/3
+# # https://www.npmjs.com/package/grunt-juwain-posthtml
# posthtml:
# options:
# use: [
@@ -105,13 +120,11 @@
# require('posthtml-doctype')(doctype : 'HTML 4.01 Frameset')
# require('posthtml-alt-always')()
# ]
-# build:
+# single:
# files: [
-# expand: true
-# cwd: 'output/Sublime-Text'
-# src: '**/*.html'
-# dest: 'output/Sublime-Text/tmp'
-# ]
+# src: '<%= templates.yamlconfig.OUTPUT_PATH %>/Programs/KristinitaLuckyLink.html'
+# dest: '<%= templates.yamlconfig.OUTPUT_PATH %>/Programs/KristinitaLuckyLink.html'
+# ]
# ####################
@@ -592,3 +605,270 @@
# # src: "<%= templates.yamlconfig.OUTPUT_PATH %>/Books-Reviews/Как-читать-архитектуру.html"
# # dest: "."
# # ]
+
+
+# [DEPRECATED]
+# [BUG] Checker works incorectly with encoded URLs, see examples:
+# Another users:
+# https://github.com/ChrisWren/grunt-link-checker/issues/28
+# Me:
+# “>> Resource not found linked from https://kristinita.netlify.app/opensearch.xml
+# to https://kristinita.netlify.app/favicon16%C3%9716.ico”
+# ################
+# # link-checker #
+# ################
+# ###
+# [PURPOSE] Check links via node-simplecrawler:
+# https://github.com/chriswren/grunt-link-checker
+# https://www.npmjs.com/package/simplecrawler
+# ###
+# module.exports =
+# development:
+# site: "kristinita.netlify.app"
+# options:
+# checkRedirect: true
+# noFragment: false
+
+
+# [DEPRECATED] grunt-crawl doesn’t support the newest Node.js and Grunt versions:
+# https://github.com/mradcliffe/grunt-crawl/pull/15
+# ###############
+# # grunt-crawl #
+# ###############
+# ###
+# [INFO] Grunt crawler; possibly, check URLs:
+# https://www.npmjs.com/package/grunt-crawl
+#
+# [NOTE] markdown-link-check tool doesn’t support internal links:
+# https://github.com/tcort/markdown-link-check
+# Example:
+# [✖] ../Special/Полная-библиография#Открытость → Status: 400
+# ###
+# module.exports =
+# myapp:
+# options:
+# baseUrl: "http://localhost:4147/"
+# contentDir: "output"
+
+
+# [FIXME][ISSUE] 2 problems:
+# 1. grunt-blank audit failed, but manually with (TreeSize Free) review shows,
+# that I haven’t files < 2 bytes
+# 2. grunt-blank doesn’t show, which files lower that 2 bytes.
+# ###############
+# # grunt-blank #
+# ###############
+# # [PURPOSE] Check files with size lower than “minBytes”:
+# # https://www.npmjs.com/package/grunt-blank
+# module.exports =
+# options:
+# minBytes: 2
+# task:
+# src: [
+# "<%= templates.yamlconfig.CONTENT_PATH %>"
+# "<%= templates.yamlconfig.THEME_STATIC_DIR %>"
+# ]
+
+
+# [DECLINED] The project no longer maintained since 2018:
+# https://github.com/purifycss/purifycss/issues/213
+# I migrate to PurgeCSS.
+# #####################
+# ## grunt-purifycss ##
+# #####################
+# ###
+
+# [OVERVIEW] Remove unused CSS for kristinita.netlify.app design:
+# https://www.npmjs.com/package/purify-css
+# https://www.npmjs.com/package/grunt-purifycss
+
+# [NOTE] Needs separate task for each style. Because theme use different styles:
+
+# [BUG] Doesn’t work with grunt-newer:
+# https://github.com/purifycss/grunt-purifycss/issues/30
+# ###
+# module.exports =
+# options:
+# ###
+# [WARNING] PurifyCSS support elements, that include simply methods.
+# Example:
in HTML;
+# .SashaClass { color: black } in CSS;
+# If elements generated by JavaScript, PurifyCSS doesn’t work:
+# https://github.com/purifycss/purifycss/issues/194
+# ###
+# whitelist: [
+# # [WARNING] Don't use multiline comments inside list!
+# # Coffeelint will show “unexpected newline” error:
+# # No issue, because coffeelint not maintained at March, 2019:
+# # https://github.com/clutchski/coffeelint/issues
+# # [INFO] Wildfire classes
+# # [INFO] “div” for parent classes not required.
+# # [FIXME] Migrate to PurgeCSS, that not add each Wildfire class separately:
+# # https://github.com/FullHuman/grunt-purgecss/issues/9
+# ".animate-flicker"
+# ".ivu-modal-body"
+# ".ivu-btn"
+# ".ivu-tabs-tabpane"
+# # [NOTE] Adjoining classes required in this case.
+# ".wf.wf-theme-dark"
+# ".ivu-btn-primary"
+# ".wf-separator"
+# ".wf-no-content-tip"
+# ":not(.v-transfer-dom)"
+# ".ivu-menu-submenu-title-icon"
+# ".ivu-input-wrapper"
+# ".wf-post-btn"
+# ".ivu-menu-horizontal"
+# ".ivu-menu-light"
+# ".ivu-icon-heart-broken"
+# ".ivu-icon-heart"
+# ".wf-inactive"
+# ".ivu-icon-at"
+# ".ivu-menu-item-selected"
+# ".ivu-menu"
+# "svg"
+# # [INFO] Tooltipster classes.
+# # [NOTE] Use parent classes:
+# # For:
+# # .tooltipster-punk-aquamarine .tooltipster-box
+# # .tooltipster-punk-purple .tooltipster-box
+# # “.tooltipster-box” in “whitelist” option will not works
+# ".tooltipster-punk-purple .tooltipster-box"
+# ".tooltipster-punk-aquamarine .tooltipster-box"
+# ]
+# indextarget:
+# src: ["<%= templates.yamlconfig.OUTPUT_PATH %>/index.html"]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/kristinita.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/kristinita.css"
+# sublimetexttarget:
+# src: [
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Erics-Rooms/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Programs/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Sublime-Text/*.html"
+# ]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/programs.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/programs.css"
+# gingerinastarget:
+# src: [
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Erics-Rooms/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Gingerinas/*.html"
+# ]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/gingerinas.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/gingerinas.css"
+# itarticlestarget:
+# src: [
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Erics-Rooms/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/IT-articles/*.html"
+# ]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/it-articles.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/it-articles.css"
+# giologicabluetarget:
+# src: ["<%= templates.yamlconfig.OUTPUT_PATH %>/Giologica/Valerywork-Kiravel.html"]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/giologica-blue.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/giologica-blue.css"
+# giologicatarget:
+# src: [
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Books-Reviews/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Giologica/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/G-Rights/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Special/*.html"
+# ]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/giologica.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/giologica.css"
+# sashablacktarget:
+# # Pages and Sasha Black
+# src: [
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Sasha-Black/*.html"
+# "<%= templates.yamlconfig.OUTPUT_PATH %>/Pages/*.html"
+# ]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/sasha-black-description.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/sasha-black-description.css"
+# smertsvobodetarget:
+# src: ["<%= templates.yamlconfig.OUTPUT_PATH %>/Smert-svobode/*.html"]
+# css: ["<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/smert-svobode.css"]
+# dest: "<%= templates.yamlconfig.OUTPUT_PATH %>/theme/css/sections/smert-svobode.css"
+
+
+# [DECLINED]
+# 1. posthtml-img-autosize doesn’t work for relative paths:
+# https://github.com/posthtml/grunt-posthtml/issues/4
+# 2. lazysizes plugin required for my environment,
+# I don’t add native lazy loading via posthtml-lazyload
+# ####################
+# ## grunt-posthtml ##
+# ####################
+# ###
+# [INFO] Framework to transform HTML/XML via JavaScript plugins:
+# https://posthtml.org/#/
+# https://www.npmjs.com/package/posthtml
+
+# [INFO] Plugins:
+# https://www.npmjs.com/package/posthtml#plugins
+
+# [INFO] Grunt wrapper:
+# https://www.npmjs.com/package/grunt-juwain-posthtml
+
+# [FIXED] https://github.com/posthtml/grunt-posthtml/issues/4
+# [NOTE] Default version — “https://www.npmjs.com/package/grunt-posthtml” —
+# doesn’t work for me. I use grunt-juwain-posthtml version:
+# https://github.com/posthtml/grunt-posthtml/issues/3
+# ###
+# module.exports =
+# options:
+# use: [
+# #####################
+# # posthtml-lazyload #
+# #####################
+# # [SOON] Currently, I still use JQuery Lazy for lazy loading images and iframes.
+# # We have polyfill for browsers that not supported loading="lazy":
+# # https://github.com/mfranzke/loading-attribute-polyfill
+# # Polyfill problems:
+# # 1. It not valid:
+# # https://github.com/mfranzke/loading-attribute-polyfill/issues/90
+# # 2. Additional syntax required:
+# # https://github.com/mfranzke/loading-attribute-polyfill#simple-image
+
+
+# # [ACTION] Add “loading="lazy"” to all images and iframes:
+# # https://www.npmjs.com/package/posthtml-lazyload
+
+# # [NOTE] I couldn’t find any method for applying lazy loading for
+# # all images and frames without adding “loading="lazy"” each time
+
+# # [INFO] “loading="eager"” — load resources immediatly:
+# # https://web.dev/browser-level-image-lazy-loading/
+
+# # [INFO] For “picture” tag the “loading” attribute required solely for
+# # the fallback “img” element:
+# # https://web.dev/browser-level-image-lazy-loading/
+
+# # [NOTE] CSS background images haven’t “loading” attribute:
+# # https://web.dev/browser-level-image-lazy-loading/\
+# #can-css-background-images-take-advantage-of-the-loading-attribute
+
+# # require('posthtml-lazyload')(loading: 'lazy')
+
+
+# #########################
+# # posthtml-img-autosize #
+# #########################
+# # [BUG] Plugin doesn’t work with relative paths:
+# # https://github.com/posthtml/posthtml-img-autosize/issues/17#issuecomment-706592803
+
+# # [OVERVIEW] Plugin adds “height” and “width” attributes to all images:
+# # https://www.npmjs.com/package/posthtml-img-autosize
+# # [INFO] It required for 2020:
+# # https://www.smashingmagazine.com/2020/03/setting-height-width-images-important-again/
+
+# # require('posthtml-img-autosize')(
+# # processEmptySize: true
+# # root: "output/Programs"
+# # )
+# ]
+# target:
+# files: [
+# expand: true
+# cwd: "."
+# src: "output/Programs/*.html"
+# dest: "."
+# ]
diff --git a/grunt/htmlhint.coffee b/grunt/htmlhint.coffee
index c8ee24a2..1e056893 100644
--- a/grunt/htmlhint.coffee
+++ b/grunt/htmlhint.coffee
@@ -10,17 +10,26 @@
# [NOTE] All options in “.htmlhintrc” required
module.exports =
options:
- # [NOTE] I prefer tabs, not spaces.
- # [LINK] “.editorconfig”
- # "space-tab-mixed-disabled": "tab",
- # [NOTE] BEM required underlines and dashes both:
- # https://en.bem.info/methodology/quick-start/#element
- # https://github.com/htmlhint/HTMLHint/issues/340
- # "id-class-value": false,
- # [NOTE] “script” tag must contain in head:
- # https://stackoverflow.com/a/24070373/5951529
- # https://github.com/htmlhint/HTMLHint/issues/340
- # "head-script-disabled": false
+ ###
+ [NOTE] I prefer tabs, not spaces.
+ [LINK] “.editorconfig”
+ "space-tab-mixed-disabled": "tab"
+
+ [NOTE] BEM required underlines and dashes both:
+ https://en.bem.info/methodology/quick-start/#element
+ https://github.com/htmlhint/HTMLHint/issues/340
+ "id-class-value": false
+
+ [NOTE] “script” tag must contain in head:
+ https://stackoverflow.com/a/24070373/5951529
+ https://github.com/htmlhint/HTMLHint/issues/340
+ "head-script-disabled": false
+
+ [INFO] Comments before DOCTYPE allowed for modern browsers:
+ https://stackoverflow.com/a/4897850/5951529
+ https://github.com/htmlhint/HTMLHint/wiki/doctype-first
+ "doctype-first": false
+ ###
htmlhintrc: ".htmlhintrc"
target:
src: "<%= templates.paths.html %>"
diff --git a/grunt/htmllint.coffee b/grunt/htmllint.coffee
index 7b1b53e0..c5d30e08 100644
--- a/grunt/htmllint.coffee
+++ b/grunt/htmllint.coffee
@@ -2,39 +2,54 @@
# htmllint #
############
###
-Lint HTML:
+[OVERWIEW] Lint HTML:
http://htmllint.github.io/
+https://www.npmjs.com/package/htmllint
+
+[INFO] Grunt wrapper:
https://www.npmjs.com/package/grunt-htmllint
-Configuration:
+
+[INFO] Configuration:
https://github.com/htmllint/htmllint/wiki/Options
-Inline options ignoring:
+
+[INFO] Inline options ignoring:
https://github.com/htmllint/htmllint/wiki/Inline-Configurations
+
[WARNING] 1 error — 1 toast. The number of toasts may be large!
https://github.com/htmllint/grunt-htmllint/issues/25
-Run “htmllint” after “grunt” or “grunt publish” task, not after “pelican” command/
-[DONE]
-# [BUG] “opts” argument erroneous:
-# https://github.com/htmllint/grunt-htmllint/pull/24
+
+[INFO] Run “htmllint” after “grunt” or “grunt publish” task, not after “pelican” command.
+
[NOTE] “attr-bans” modified, because Progressbar needs “style” attribute:
https://github.com/facelessuser/pymdown-extensions/issues/293
https://github.com/htmllint/htmllint/wiki/Options#attr-bans
+
+[NOTE] I remove “width” attribute from “attr-bans”, because:
+1. “width” and “height” for “img” is best practice.
+2. I couldn’t find tools that add “width” and “height” to CSS, not to HTML
+https://github.com/htmllint/htmllint-cli/issues/22#issuecomment-724600363
+
[FIXME] Migrate to BEM → remove “id-class-style”
https://github.com/htmllint/htmllint/wiki/Options#id-class-style
-[NOTE] “raw-ignore-regex” for ignoring linting inside style and script tags:
+
+[INFO] “raw-ignore-regex” for ignoring linting inside style and script tags:
"raw-ignore-regex": "/(\\
-
-
- {%- elif article.table == 'onecolumn' -%}
-
- {%- endif -%}
-{%- endblock %}
-
-
-{% block base_typoreporter -%}
- {# [NOTE] Migrate from npmcdn to JSDelivr; npmcdn hangs #}
-
- {%- if article.lang == 'ru' -%}
-
- {% else %}
-
- {%- endif -%}
-{%- endblock %}
-
-
-{% block base_tooltipster -%}
- {%- if article.tooltipster -%}
-
-
-
-
- {%- endif -%}
-{%- endblock %}
-
-
-{% block base_clipboardjs -%}
- {%- if article.clipboardjs -%}
-
-
- {%- endif -%}
-{%- endblock %}
-
-
-{# JavaScript pie and bar charts:
-http://www.kellyking.me/projects/visualize/
-https://github.com/kellyk/visualize #}
-{% block base_visualize -%}
- {%- if article.visualize -%}
-
-
-
- {%- endif -%}
-{%- endblock %}
-
-{# Runkit:
-https://runkit.com/docs/embed #}
-{% block base_runkit -%}
- {%- if article.runkit -%}
-
-
- {%- endif -%}
-{%- endblock %}
-
-
-
-{#
-
-{% block base_detailspolyfill -%}
- {%- if article.detailspolyfill == 'true' -%}
-
-
- {%- endif -%}
-{%- endblock %} #}
-
-
-{% block base_customjs -%}
- {%- if article.customjs -%}
-
- {%- endif -%}
-{%- endblock %}
-
-{% block base_iconleftorright %}{{ article.iconleftorright }}{% endblock %}
-
-{% block base_pagecolors %}{{ article.pagecolors }}{% endblock %}
-
-{# [INFO] Use webp for browsers, that support it and jpg for others:
-https://stackoverflow.com/a/54223755/5951529
-https://andywalpole.me/blog/142790/using-webp-image-format
-[WARNING] I don't use Modernizr, because it only self-hosted, CDNs not supported:
-https://css-tricks.com/using-webp-images/
-https://modernizr.com/download/
-https://github.com/Modernizr/Modernizr/issues/2214
-#}
-{% block base_modernizr %}
- {# [NOTE] Modernizr automatically generate minified file.
- It would be nice use “.min.js”, not {{MIN}} template:
- https://stackoverflow.com/a/41319855/5951529
- #}
-
- {#
- [DEPRECATED]
- Use modernizr; grunt-modernizr generate custom modernizr file automatically
- https://www.npmjs.com/package/grunt-modernizr
- Solution from https://stackoverflow.com/a/54223755/5951529 doesn't work for Safari in 2019:
- Safari support “-webkit-image-set”, but doesn't support “webp” →
- Safari doesn't show images.
- // [LEARN][STYLUS] Using templates in URLs
- // https//github.com/stylus/stylus/issues/2147#issuecomment-197338391
- // [NOTE] 1x — for normal display, 2x — for high-res
- // https//www.hongkiat.com/blog/css-image-set/
- // [NOTE] Use “-webkit-image-set” below “url” last property have higher priority
- // https//stackoverflow.com/a/1637380/5951529
- #}
-
-{% endblock %}
-
-{% block base_progressbar -%}
- {%- if article.progressbar -%}
-
- {%- endif -%}
-{%- endblock %}
-
-
-{% block base_customcss -%}
- {%- if article.customcss -%}
-
- {%- endif -%}
-{%- endblock %}
-
-{% block galleryblock -%}
- {% if article.photo_image %} {% endif %}
-{%- endblock %}
+
{% block base_atom_feed -%}
+ https://github.com/getpelican/pelican/blob/master/docs/changelog.rst#401-2018-11-30 -->
{# Use dot, no pipe:
https://github.com/getpelican/pelican/issues/2442#issuecomment-449426117 #}
{%- endblock %}
-
-
-
-{% block base_asidetitle %}{{ article.pagetitle }}{% endblock %}
-
-{% block base_h1 %}{{ article.pagetitle }}{% endblock %}
-{% block base_noco %}{{ article.noco }}{% endblock %}
-{% block base_version %}{{ article.version }}{% endblock %}
-{# “locale_date” and “locale_modified” variables as in notmyidea theme #}
-{% block base_date %}{{ article.locale_date }}{% endblock %}
-{% block base_date_modified %}{{ article.locale_modified }}{% endblock %}
-
-
-{% block base_epigraph -%}
- {%- if article.epigraph -%}
-
- {{ article.epigraphtext }}
-
- {% endif %}
-{%- endblock %}
-
-
-{% block base_titleimage -%}
- {# [LEARN][JINJA] “if article.titleimage” = “if article.titleimage == 'true'” #}
- {%- if article.titleimage -%}
- {# Picture tag:
- https://ru.stackoverflow.com/a/915298/199934 #}
-
-
-
-
-
-
- {% endif %}
-{%- endblock %}
+
-
-{% block base_content %}{{ article.content }}{% endblock %}
{% block base_neighbors -%}
- {%- if article.lang == 'ru' -%}
+
+ {%- if kira_object.lang == 'ru' -%}
{% include 'includes/neighbors-ru.html' %}
{% else %}
{% include 'includes/neighbors-en.html' %}
{% endif %}
+
{%- endblock %}
-{# {% block base_addtoany -%}
- {% include 'includes/addtoany-articles.html' %}
-{%- endblock %} #}
-
-
-{% block base_new_russian %}
- {%- if article.lang == 'ru' -%}
- {% include 'includes/footer-ru.html' %}
- {% else %}
- {% include 'includes/footer-en.html' %}
- {% endif %}
-{% endblock %}
-{% block base_noscript %}
- {% include 'includes/noscript-articles.html' %}
-{% endblock %}
diff --git a/themes/sashapelican/templates/base.html b/themes/sashapelican/templates/base.html
index be21f5b4..66b0a0e5 100644
--- a/themes/sashapelican/templates/base.html
+++ b/themes/sashapelican/templates/base.html
@@ -1,257 +1,191 @@
-
-{# [NOTE] DOCTYPE must be declared first:
+{# [INFO] Same template for articles, pages and another types without duplicates:
+http://bit.ly/pelican__articles_and_pages #}
+
+{% if article %}
+ {% set kira_object = article %}
+{% elif page %}
+ {% set kira_object = page %}
+{% endif %}
+
+
+
+{# [INFO] Internet Explorer may not support сomments before DOCTYPE:
https://stackoverflow.com/a/4897850/5951529
-[WARNING] Needs same language, that text in article/page:
-https://webref.ru/css/lang
-https://travis-ci.org/Kristinita/KristinitaPelican/jobs/381246941#L1202
+But I don’t want support IE.
#}
-
+
+
+
+
+
+
+
+
-
-
-
-
-
- {% block base_pagetitle %}{% endblock %}
-
-
-
-
-
- {# Open Graph:
- http://ruogp.me
- [NOTE] All basic metadata required;
- Yandex Structured data validator gives errors, if no all:
- https://webmaster.yandex.com/tools/microtest/
- https://ruogp.me/#metadata
- [INFO] In Jinja2 you can use blocks multiple times:
- http://stackoverflow.com/a/1245030/5951529
- #}
- {# [INFO] See full types list for 2018:
- https://stackoverflow.com/a/50273929/5951529 #}
- {# [LEARN][JINJA] “|e” filter remove HTML chars “>”, “<”, “&”, “"”, from Pelican tags:
- http://jinja.pocoo.org/docs/latest/templates/#working-with-manual-escaping
- https://stackoverflow.com/a/1556570/5951529
- #}
- {% if article %}
- {% for tag in article.ogtags %}
-
- {% endfor %}
- {% endif %}
-
- {% if page %}
- {% for tag in page.ogtags %}
-
- {% endfor %}
- {% endif %}
- {% block base_json_ld %}{% endblock %}
-
-
-
-
- {# [INFO] Icons formats:
- https://stackoverflow.com/a/53795508/5951529 #}
-
-
- {% block base_atom_feed %}{% endblock %}
+
+
+ {% include "includes/meta.html" %}
+
+
+
+ {% include "includes/structured-data.html" %}
+
+
+
+ {% include "includes/css-critical.html" %}
+
+
+
+ {% include "includes/fonts.html" %}
-
- {# No browser-update, because some issues:
- https://github.com/browser-update/browser-update/issues #}
- {# [NOTE] Don't use protocol-relative URLs:
- https://stackoverflow.com/a/54386928/5951529 #}
-
- {# target-blank
- Add “target="_blank"” for all external links:
- https://bogdandragomir.com/blog/2016/12/add-target-_blank-attribute-external-anchors-page-javascript-jquery-one-single-line/ #}
-
-
-
-
-
-
-
-
- {# jquery-responsive-tables #}
- {% block base_responsive_tables %}{% endblock %}
- {# Browser-Update #}
-
-
- {% block base_typoreporter %}{% endblock %}
-
-
-
-
- {% block base_tooltipster %}{% endblock %}
-
- {% block base_clipboardjs %}{% endblock %}
-
- {% block base_visualize %}{% endblock %}
- {# [INFO] Runkit, see https://runkit.com/docs/embed #}
- {% block base_runkit %}{% endblock %}
- {# [INFO] AddToAny, see https://www.addtoany.com #}
-
- {# [INFO] async required #}
-
- {# [INFO] Wildfire:
- https://stackoverflow.com/a/63869810/5951529 #}
-
- {# [INFO] Ostr.io — ethical analythics:
- https://github.com/VeliovGroup/ostrio-analytics#why-ostrio-analytics #}
-
- {# [FIXME] MailerLite bugs for RSS and CoffeeScript:
- # https://github.com/Kristinita/SashaMiscellaneous/issues/18
- # https://github.com/Kristinita/SashaMiscellaneous/issues/19
- #}
-
- {% block base_customjs %}{% endblock %}
-
-
-
-
-
-
-
-
-
-
-
-
- {% block base_modernizr %}{% endblock %}
-
-
-
-
-
-
-
- {# Progressbar #}
- {% block base_progressbar %}{% endblock %}
-
- {% block base_customcss %}{% endblock %}
- {# [DEPRECATED]
- [NOTE] Script required, because Google Fonts doesn't support “font-display”:
- https://css-tricks.com/google-fonts-and-font-display/
- https://github.com/google/fonts/issues/358
-
- Fonts:
- [INFO] Material icons font for admonition:
- https://google.github.io/material-design-icons/
- [NOTE] “display: swap” required at May 2019, not default as in this article:
- https://www.zachleat.com/web/google-fonts-display/
- [NOTE] “|” character must be replace in fonts URL for validator:
- https://stackoverflow.com/a/22469221/5951529
- [NOTE] “&” → “&” replace required for HTML Tidy:
- https://stackoverflow.com/a/15606103/5951529
+ {% include "includes/js-critical.html" %}
+
+
+
+ {#
+ [INFO] These scripts and styles will run if some string will matched in HTMl files:
+ https://stackoverflow.com/a/19628156/5951529
+
+ [INFO] Pelican/Jinja2 is looking for matches in HTML, not in Markdown files
#}
-
+
+
+
+ {% include "includes/tables.html" %}
+
+
+
+ {% include "includes/code-blocks.html" %}
+
+
+
+ {# [INFO] Admonition, Visualize, RunKit, ProgressBar #}
+
+ {% include "includes/js-specific.html" %}
+
+
+
+ {# [INFO] Scripts for each page that can be removed #}
+
+ {% include "includes/js-low-priority.html" %}
+
+
+
+ {% include "includes/base-tag.html" %}
+
+
+
+ {% block base_atom_feed %}{% endblock %}
+
- {# Message, if JavaScript disabled
- ARIA roles:
- http://prgssr.ru/development/ispolzovanie-aria-v-html5.html#heading-aria
- [NOTE] “section” tag wrong in this case, I use “div” instead it:
- “Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections.”
- https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/alert/index.html
- #}
-
- {% block base_noscript %}{% endblock %}
-
- {# AddToAny buttons.
- aside — a tag for these buttons:
- https://stackoverflow.com/a/18974422/5951529
- Using multiple aside is possible:
- https://stackoverflow.com/a/27688129/5951529 #}
-
-
-
- {# [INFO] “Main” must include “article” and “aside”:
+
+
+
+ {% include "includes/noscript.html" %}
+
+
+
+ {% include "includes/side-icon.html" %}
+
+
+
+ {# [LEARN][HTML] “Main” must include “article” and “aside”:
https://webref.ru/html/main
http://disq.us/p/16r46ia #}
+
- {# Article must included header and footer:
+
+ {# [LEARN][HTML] Article must include header and footer:
https://webref.ru/html/article
https://html.spec.whatwg.org/multipage/sections.html#the-article-element #}
+
+
+
+
-
-
- Version {% block base_version %}{% endblock %}
-
- {# [LEARN][JINJA] Multiple blocks with same name —
- https://stackoverflow.com/a/1245030/5951529 #}
- Posted — {{ self.base_date() }}
-
-
- {# [WARNING] pubdate attribute is obsolete, use itemprop: datePublished
- https://stackoverflow.com/a/24455070/5951529 #}
- Last modified — {{ self.base_date_modified() }}
-
-
- {% block base_epigraph %}{% endblock %}
- {% block base_titleimage %}{% endblock %}
-
+
+ {% include "includes/header.html" %}
+
+
+
+
- {% block base_content %}{% endblock %}
+
+ {% include "includes/content.html" %}
+
+
+
+
+
+
+
+
+ {% include "includes/share-buttons.html" %}
+
diff --git a/themes/sashapelican/templates/includes/base-tag.html b/themes/sashapelican/templates/includes/base-tag.html
new file mode 100644
index 00000000..9db937e1
--- /dev/null
+++ b/themes/sashapelican/templates/includes/base-tag.html
@@ -0,0 +1,24 @@
+{# [DECLINED] It open all links in new tabs.
+I can’t do this behavior solely for external links:
+https://stackoverflow.com/a/28781184/5951529
+Therefore, I migrated to the “markdown-link-attr-modifier”,
+despite the fact that the HTML size is increasing:
+https://github.com/Phuker/markdown_link_attr_modifier
+
+[ACTION] Open all links in pages in new tabs:
+https://forum.squarespace.com/topic/21952-force-all-external-links-into-a-new-tab/?do=findComment&comment=219538
+[PURPOSE] I regularly click to links on web pages.
+When I read new page, I may forget to read to the end the previous page I need.
+Therefore, I use middle-click for opening links in new tabs.
+The previous page is nearby, and I don’t forget about its existence.
+I want that this behavior will default.
+
+[INFO] “htmllint”, “html-nu” and “htmlhint” consider it valid
+
+[FIXME][ISSUE][POSTHTML] PostHTML plugins “link-noreferrer” and “noopener”
+doesn’t work for me both:
+https://github.com/webistomin/posthtml-link-noreferrer
+https://github.com/posthtml/posthtml-noopener
+
+
+#}
diff --git a/themes/sashapelican/templates/includes/code-blocks.html b/themes/sashapelican/templates/includes/code-blocks.html
new file mode 100644
index 00000000..2c38145a
--- /dev/null
+++ b/themes/sashapelican/templates/includes/code-blocks.html
@@ -0,0 +1,50 @@
+{#
+[INFO] Scripts and styles, if code blocks exists on the page
+#}
+{%- if "" in kira_object.content -%}
+
+ {# [DECLINED]
+ Tooltipster + JQuery = 40 kb; it’s too big for non-critical dependency:
+ https://atomiks.github.io/tippyjs/v6/motivation/#comparison-with-tooltipster
+
+ [INFO] Tooltipster — tooltips:
+ http://calebjacob.github.io/tooltipster/
+ [INFO] Usage:
+ http://ru.stackoverflow.com/a/584718/199934
+
+
+
+
+ #}
+
+
+ {# [INFO] Balloon.css — pure CSS tooltips:
+ https://kazzkiq.github.io/balloon.css/
+
+ [WARNING] Tooltips goes off a screen! Not use big text for tooltips!
+ https://github.com/kazzkiq/balloon.css/issues/153
+ #}
+
+
+ {#
+ [INFO] Clipboard.js — copy block to clipboard without Flash:
+ https://clipboardjs.com/
+ [INFO] Usage:
+ http://ru.stackoverflow.com/a/582520/199934
+ #}
+
+
+ {#
+ [LEARN][JAVASCRIPT] “clipboard-js” must be loaded before “clipboard-js-local”
+
+ [LEARN][CSS] “balloon” must be loaded before “code-block-css”.
+ Properties in the last uploaded CSS file has a higher priority
+ https://stackoverflow.com/a/16913205/5951529
+ #}
+
+{%- endif -%}
diff --git a/themes/sashapelican/templates/includes/content.html b/themes/sashapelican/templates/includes/content.html
new file mode 100644
index 00000000..58f0ef97
--- /dev/null
+++ b/themes/sashapelican/templates/includes/content.html
@@ -0,0 +1,15 @@
+{# [INFO] Site content #}
+{{ kira_object.content }}
+
+{# [NOTUSED] Therefore commented out
+
+[INFO] photos plugin:
+https://github.com/getpelican/pelican-plugins/tree/master/photos
+[NOTE] Declined, because now I don’t use this plugin at the time:
+
+{% block galleryblock -%}
+ {% if kira_object.photo_image %}
+
+ {% endif %}
+{%- endblock %}
+#}
diff --git a/themes/sashapelican/templates/includes/css-critical.html b/themes/sashapelican/templates/includes/css-critical.html
new file mode 100644
index 00000000..d168c493
--- /dev/null
+++ b/themes/sashapelican/templates/includes/css-critical.html
@@ -0,0 +1,44 @@
+{# [INFO] Styles to be loaded with page load:
+https://prgssr.ru/images/development/css/02-browser-opt-small.jpg
+
+
+[LEARN][CSS][JAVASCRIPT] In modern browsers doesn’t matter, will we put styles before scripts or vice versa:
+https://stackoverflow.com/a/9272730/5951529
+https://www.benmccann.com/css-or-js-first-for-performance/
+
+
+[INFO] I use critical for “ ”:
+https://www.npmjs.com/package/critical
+
+[NOTE] “link rel="preload"” instead of "stylesheet" doesn’t work in Firefox 58, wait Firefox 59.
+https://github.com/filamentgroup/loadCSS#how-to-use-loadcss-recommended-example
+https://github.com/filamentgroup/loadCSS/issues/246
+https://bugzilla.mozilla.org/show_bug.cgi?id=1222633
+[NOTE] In Firefox 59 also doesn’t work. Wait Firefox 60. #}
+
+
+{# [INFO] Gemini Scrollbar styles
+
+[NOTE] Gemini styles must load first, otherwise bugs on the page #}
+
+
+
+{# [INFO] Styles for all articles and pages #}
+
+
+{# [INFO] Styles for fonts #}
+
+
+{# [INFO] Styles for aside with icon #}
+
+
+{# [INFO] Different styles depending on whether the icon is on the left or right #}
+
+
+{# [INFO] Color scheme #}
+
+
+{# [INFO] Custom CSS #}
+{%- if kira_object.customcss -%}
+
+{%- endif -%}
diff --git a/themes/sashapelican/templates/includes/favicons.html b/themes/sashapelican/templates/includes/favicons.html
new file mode 100644
index 00000000..7f0a0d06
--- /dev/null
+++ b/themes/sashapelican/templates/includes/favicons.html
@@ -0,0 +1,23 @@
+
+
+{# [DECLINED]
+[INFO] Back in 2012—3 years, “link rel” was not required for modern browsers at that time
+according to user messages;
+placing “favicon.icon” to site root directory enough:
+https://stackoverflow.com/a/32909089/5951529
+https://stackoverflow.com/a/9943834/5951529
+https://stackoverflow.com/a/17042508/5951529
+https://stackoverflow.com/a/18300418/5951529
+
+[INFO] Argumentation, why we don’t need add “link rel”:
+https://realfavicongenerator.net/faq/#why_ico_not_declared
+https://mathiasbynens.be/notes/rel-shortcut-icon
+https://web.archive.org/web/20170715203800/http://www.jonathantneal.com/blog/understand-the-favicon
+
+[INFO] Icons formats:
+https://stackoverflow.com/a/53795508/5951529
+
+
+#}
diff --git a/themes/sashapelican/templates/includes/fonts.html b/themes/sashapelican/templates/includes/fonts.html
index 592c031e..1f693bda 100644
--- a/themes/sashapelican/templates/includes/fonts.html
+++ b/themes/sashapelican/templates/includes/fonts.html
@@ -1,9 +1,10 @@
-{# Google Fonts:
+{# [INFO] Google Fonts:
https://medium.freecodecamp.org/how-to-use-google-fonts-in-your-next-web-design-project-e1ad48f1adfa
Open Fonts License for fonts:
https://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&id=OFL_web
-[NOTE] I migrate from FontLibrary to Google Fonts:
+
+[INFO] I migrate from FontLibrary to Google Fonts:
1. FontLibrary haven't CDN and load to page more slow:
https://i.imgur.com/mH0qSvs.png
2. FontLibrary fonts no cached:
@@ -16,27 +17,31 @@
Tracker for Google Fonts:
https://github.com/google/fonts
-Play for h1 headers:
+
+Used fonts:
+
+[INFO] Play for h1 headers:
https://fonts.google.com/specimen/Play
https://github.com/google/fonts/tree/master/ofl/play
-El-Messiri for links:
+[INFO] El-Messiri for links:
https://fontlibrary.org/en/font/el-messiri
https://github.com/Gue3bara/El-Messiri
-Scada for h2 headers:
+[INFO] Scada for h2 headers:
https://www.fontsquirrel.com/fonts/scada
https://fonts.google.com/specimen/Scada
https://github.com/googlefonts/scada
-Fira Mono for code:
+[INFO] Fira Mono for code:
http://mozilla.github.io/Fira/
https://github.com/mozilla/Fira
-Marck Script for “Работайте над собой”:
+[INFO] Marck Script for “Работайте над собой”:
https://fonts.google.com/specimen/Marck+Script
https://github.com/google/fonts/tree/master/ofl/marckscript
+
[INFO] Needs combine fonts for leverage browser caching:
https://stackoverflow.com/a/34356311/5951529
@@ -46,33 +51,116 @@
[FIXME] Script instead of link required, because Google Fonts doesn't support “font-display”:
https://css-tricks.com/google-fonts-and-font-display/
https://github.com/google/fonts/issues/358
+
+
+
#}
-{#
+
+{#
+[INFO] Material icons font for admonition:
+https://google.github.io/material-design-icons/
+[NOTE] “display: swap” required at May 2019, not default as in this article:
+https://www.zachleat.com/web/google-fonts-display/
+[NOTE] “|” character must be replace in fonts URL for validator:
+https://stackoverflow.com/a/22469221/5951529
+[NOTE] “&” → “&” replace required for HTML Tidy:
+https://stackoverflow.com/a/15606103/5951529
+
+[INFO] Variable fonts:
+https://web.dev/variable-fonts/
+Fonts that I use isn’t variable
+
+[NOTREQUIRED] “&subset=cyrillic” for all modern browsers, that supports “unicode-range”:
+https://github.com/google/fonts/issues/113
+https://stackoverflow.com/a/56367174/5951529
+https://caniuse.com/font-unicode-range
+https://github.com/google/fonts/issues/2480
+https://github.com/google/fonts/issues/384
+
+[NOTE][FIXME] We can load “Marck Script” font
+that used solely for “Работайте над собой” in the bottom of the page
+lazy, but possibly it may not matter much on site performance:
+https://stackoverflow.com/a/14919928/5951529
+https://stackoverflow.com/a/63869810/5951529
+
+
+[INFO] “Some types of resources, such as fonts, are loaded in anonymous mode.
+For those you must set the crossorigin attribute with the preconnect hint”:
+https://web.dev/preconnect-and-dns-prefetch/#how-to-implement-relpreconnect
+
+
+[INFO] Fastest Google fonts downloading for May 2020:
+https://csswizardry.com/2020/05/the-fastest-google-fonts/
+
+1. Preemptively warm up the fonts’ origin.
+
+2. Initiate a high-priority, asynchronous fetch for the CSS file. Works in
+ most modern browsers.
+
+3. Initiate a low-priority, asynchronous fetch that gets applied to the page
+ only after it’s arrived. Works in all browsers with JavaScript enabled.
+
+4. In the unlikely event that a visitor has intentionally disabled
+ JavaScript, fall back to the original method. The good news is that,
+ although this is a render-blocking request, it can still make use of the
+ preconnect which makes it marginally faster than the default.
#}
-{# Open source fonts from Font Library:
+
+{# 1 #}
+
+
+{# 2 #}
+
+
+{# 3 #}
+
+
+{# 4 #}
+
+
+
+
+
+{# [DECLINED] I migrated from Font Library to Google Fonts
+
+[INFO] Open source fonts from Font Library:
https://fontlibrary.org/en
-Documentation:
+[INFO] Documentation:
https://fontlibrary.org/en/guidebook
-Licenses:
+[INFO] Licenses:
https://fontlibrary.org/en/guidebook/font_licensing
-[NOTE] Select fonts, that support Cyrillic symbols.
-Xolonium for h1 headers:
+[INFO] Select fonts, that support Cyrillic symbols.
+
+Used fonts:
+
+[INFO] Xolonium for h1 headers:
https://fontlibrary.org/en/font/xolonium
-Sansus-webissimo for h2 headers:
+
+[INFO] Sansus-webissimo for h2 headers:
https://fontlibrary.org/en/font/sansus-webissimo
-el-messiri for links:
+
+[INFO] el-messiri for links:
https://fontlibrary.org/en/font/el-messiri
https://github.com/Gue3bara/El-Messiri
-inconsolata-lgc for code:
+
+[INFO] inconsolata-lgc for code:
https://fontlibrary.org/en/font/inconsolata-lgc
https://github.com/DeLaGuardo/Inconsolata-LGC
-miama-nueva for “Работайте над собой”:
+
+[INFO] miama-nueva for “Работайте над собой”:
https://fontlibrary.org/en/font/miama-nueva
#}
diff --git a/themes/sashapelican/templates/includes/footer-en.html b/themes/sashapelican/templates/includes/footer-en.html
index 1ca41495..a35c22f0 100644
--- a/themes/sashapelican/templates/includes/footer-en.html
+++ b/themes/sashapelican/templates/includes/footer-en.html
@@ -15,10 +15,13 @@ Problems?
(PC only, not for mobile devices). If you find in this article typo or small error, please, report about it use typo-reporter . Select text with typo → press Ctrl+Enter (⌘Enter for Mac) → write comment → send typo report.
If you find more serious errors in this article and/or site, create GitHub issue .
- You can also edit this page yourself and send pull request .
+ You can also edit this page yourself and send pull request .
Or write comment here. Markdown GFM support in comments . You can use GhostText , that write issue in your preferred editor.
-
+ {# [LEARN][HTML] List must contains “div” elements solely:
+ https://web.dev/list/?utm_source=lighthouse&utm_medium=devtools
+ “wildfire_thread” shouldn’t be listed. #}
+
I hate private communication, solely open support.
If you write in the style of new disgruntled Russian I reserve the right to dispose of my own discretion.
All rights reserved ©.
diff --git a/themes/sashapelican/templates/includes/footer-pages.html b/themes/sashapelican/templates/includes/footer-pages.html
deleted file mode 100644
index 6750469c..00000000
--- a/themes/sashapelican/templates/includes/footer-pages.html
+++ /dev/null
@@ -1,20 +0,0 @@
-
-
-
Like?
-
- Share this page in your preferred social network, use share buttons on the side of web-page.
-
-
-
Problems?
-
- (PC only, not for mobile devices). If you find in this article typo or small error, please, report about it use typo-reporter . Select text with typo → press Ctrl+Enter (⌘Enter for Mac) → write comment → send typo report.
- If you find more serious errors in this page and/or site, create GitHub issue .
- You can also edit this page yourself and send pull request .
- Or write comment here. Markdown GFM support in comments . You can use GhostText , that write issue in your preferred editor.
-
-
-
I hate private communication, solely open support.
-
If you write in the style of new disgruntled Russian I reserve the right to dispose of my own discretion.
-
All rights reserved ©.
-
-
diff --git a/themes/sashapelican/templates/includes/footer-ru.html b/themes/sashapelican/templates/includes/footer-ru.html
index 89480ec5..3604e0db 100644
--- a/themes/sashapelican/templates/includes/footer-ru.html
+++ b/themes/sashapelican/templates/includes/footer-ru.html
@@ -15,10 +15,13 @@ Проблемы?
(Только для ПК, не мобильных устройств). Eсли Вы увидели на данной странице опечатку или мелкую ошибку, пожалуйста, сообщите об этом, используя typo-reporter . Выделите текст с опечаткой/ошибкой → нажмите Ctrl+Enter (⌘Enter для Mac) → напишите комментарий → Отправить .
Если Вы нашли более серьёзные недочёты для этой страницы или сайта в целом, создайте issue на GitHub .
- Также Вы можете самостоятельно отредактировать эту страницу и отправить pull request .
+ Также Вы можете самостоятельно отредактировать эту страницу и отправить pull request .
Или написать комментарий здесь. Для комментариев поддерживается синтаксис Markdown GFM . Через GhostText Вы можете набирать сообщение в своём любимом Markdown-редакторе.
-
+ {# [LEARN][HTML] List must contains “div” elements solely:
+ https://web.dev/list/?utm_source=lighthouse&utm_medium=devtools
+ “wildfire_thread” shouldn’t be listed. #}
+
я ненавижу приватное общение, поддержка только через открытые источники.
С сообщениями в стиле новых недовольных русских оставляю право распоряжаться по собственному усмотрению.
Все права защищены ©.
diff --git a/themes/sashapelican/templates/includes/footer.html b/themes/sashapelican/templates/includes/footer.html
new file mode 100644
index 00000000..ed23b89a
--- /dev/null
+++ b/themes/sashapelican/templates/includes/footer.html
@@ -0,0 +1,37 @@
+{#
+[FIXME] Horisontal AddToAny + Gemini Scrollbar is not compatible:
+https://github.com/noeldelgado/gemini-scrollbar/issues/64
+It not reproduced at September 2020
+
+[FIXME][BUG] New bug. Blank area after clicking to internal link:
+https://i.imgur.com/jTJiVt6.png
+
+{% include 'includes/rss-subscribe.html' %}
+#}
+
+
+
+
+
+{# [DECLINED] I want support solely open feedback
+
+[INFO] Footer: new disgruntled Russian and sign
+
+[INFO] E-Mail obfuscate:
+http://rot13.florianbersier.com/
+Get relative source path like
+https://github.com/kura/kura.io/blob/e8f2c6801a0013201d734aa1ac48d9ac92a40b96/ghastly/templates/article.html#L10
+
+[INFO] Paths must be relative to “base.html”, not “footer.html”:
+“{% include 'includes/footer-en.html' %}”, not “{% include 'footer-en.html' %}”
+#}
+{%- if kira_object.lang == 'ru' -%}
+ {% include 'includes/footer-ru.html' %}
+{% else %}
+ {% include 'includes/footer-en.html' %}
+{% endif %}
+
+
+{# [INFO] “Работайте над собой” legend #}
+Работайте над собой
+
diff --git a/themes/sashapelican/templates/includes/header.html b/themes/sashapelican/templates/includes/header.html
new file mode 100644
index 00000000..ae41f645
--- /dev/null
+++ b/themes/sashapelican/templates/includes/header.html
@@ -0,0 +1,64 @@
+{# [INFO] Title #}
+
+
+{# [INFO] Page loading progress bar #}
+
+
+{# [INFO] Page version #}
+Version {{ kira_object.version }}
+
+{# [INFO] Created date #}
+
+ {# [LEARN][JINJA] Multiple blocks with the same name:
+ https://stackoverflow.com/a/1245030/5951529
+
+ Example:
+ First usage — {% block base_date %}{{ kira_object.locale_date }}{% endblock %}
+ Second usage — “{{ self.base_date() }}”
+ #}
+ Posted — {{ kira_object.locale_date }}
+
+
+{# [INFO] Last modified date #}
+
+ {# [INFO] “pubdate” attribute is obsolete, use “itemprop: datePublished”:
+ https://stackoverflow.com/a/24455070/5951529 #}
+ Last modified — {{ kira_object.locale_modified }}
+
+
+
+
+
+ {# [INFO] Epigraph #}
+ {%- if kira_object.epigraph -%}
+
+ {{ kira_object.epigraphtext }}
+
+ {% endif %}
+
+ {# [INFO] Article/page image
+
+ [LEARN][JINJA] “if kira_object.titleimage” = “if kira_object.titleimage == 'true'”
+ #}
+ {%- if kira_object.titleimage -%}
+
+ {# [SOON] Safari 14 supports webp;
+ https://caniuse.com/?search=webp
+ Soon we can use webp solely without “jpg” callback.
+
+ [INFO] Picture tag for webp images:
+ https://ru.stackoverflow.com/a/915298/199934 #}
+
+
+
+
+
+
+ {% endif %}
+
diff --git a/themes/sashapelican/templates/includes/js-critical.html b/themes/sashapelican/templates/includes/js-critical.html
new file mode 100644
index 00000000..57814114
--- /dev/null
+++ b/themes/sashapelican/templates/includes/js-critical.html
@@ -0,0 +1,212 @@
+{# [LEARN][JAVASCRIPT] Put scripts to the “head” tag, not to the bottom of “body”:
+https://stackoverflow.com/a/24070373/5951529
+https://flaviocopes.com/javascript-async-defer/
+
+Location of scripts in the end of “body” is “antiquated recommendation”:
+“This approach has its own problem: the browser cannot
+start downloading the scripts until the entire document is parsed.
+For larger websites with large scripts & stylesheets,
+being able to download the script as soon as possible is very important for performance.
+If your website doesn’t load within 2 seconds, people will go to another website.”
+#}
+
+
+{# [INFO] Defer.js — deferred loading scripts, styles
+and another types of the content:
+https://appseeds.net/defer.js/demo.html
+
+[NOTE] If “async” or “defer”, defer.js will not work
+
+[INFO] We need to place scripts inside “head” tag:
+https://github.com/shinsenter/defer.js/#install-to-your-page
+
+[INFO]
+1. No defer.js — critical scripts and styles that must be run when page loaded;
+2. 400ms — scripts and styles which need if we open a page on the specifc anchor;
+3. 1000 — analytics;
+4. 7000 — low priority scripts, which aren’t needed in the first seconds of a page loading.
+#}
+
+
+
+{#
+[INFO] Gemini scrollbar — custom scrollbar:
+https://noeldelgado.github.io/gemini-scrollbar/
+
+[PATCH] https://github.com/noeldelgado/gemini-scrollbar/pull/67
+[REQUIRED] Production, not development link on the RawCDN:
+https://raw.githack.com/#what-happens-to-jerks
+
+[FIXME] Migrate to the native scrollbars:
+https://www.digitalocean.com/community/tutorials/css-scrollbars
+#}
+
+
+
+
+{#
+[DEPRECATED]
+Use modernizr; grunt-modernizr generate custom modernizr file automatically:
+https://www.npmjs.com/package/grunt-modernizr
+Solution from https://stackoverflow.com/a/54223755/5951529 doesn’t work for Safari in 2019:
+Safari support “-webkit-image-set”, but doesn’t support “webp” →
+Safari doesn’t show images.
+
+[LEARN][STYLUS] Using templates in URLs
+https//github.com/stylus/stylus/issues/2147#issuecomment-197338391
+[INFO] 1x — for normal display, 2x — for high-res
+https//www.hongkiat.com/blog/css-image-set/
+[INFO] Use “-webkit-image-set” below “url” last property have higher priority
+https//stackoverflow.com/a/1637380/5951529
+#}
+
+
+{# [SOON] Safari 14 supports webp:
+https://caniuse.com/?search=webp
+Soon we can use webp solely without Modernizr
+
+[INFO] Use webp for browsers, that support it and jpg for others:
+https://stackoverflow.com/a/54223755/5951529
+https://andywalpole.me/blog/142790/using-webp-image-format
+
+[INFO] Modernizr self-hosted, CDNs not supported:
+https://css-tricks.com/using-webp-images/
+https://modernizr.com/download/
+https://github.com/Modernizr/Modernizr/issues/2214
+
+[INFO] Modernizr automatically generate minified file.
+It would be nice use “.min.js”, not {{MIN}} template:
+https://stackoverflow.com/a/41319855/5951529
+#}
+
+
+
+
+
+{# [INFO] Cash — small alternative for JQuery and Zepto:
+https://github.com/fabiospampinato/cash
+https://kenwheeler.github.io/cash/
+https://news.ycombinator.com/item?id=19535940
+
+[INFO] Migration from JQuery to Cash:
+https://github.com/fabiospampinato/cash/blob/master/docs/migration_guide.md
+https://www.peterbe.com/plog/from-jquery-to-cash
+
+[INFO] CDN vs Locally, see:
+http://stackoverflow.com/a/3832498/5951529
+
+[INFO] defer preferred, than async, see:
+https://stackoverflow.com/a/39711009/5951529
+
+[INFO] Don’t use protocol-relative URLs:
+https://stackoverflow.com/a/54386928/5951529
+
+[INFO] Place Cash script before lazysizes, so that scripts dependent
+so that dependency scripts have time to load
+
+[FIXME][ISSUE][CASH] More help for porting third-party plugins:
+https://github.com/fabiospampinato/cash/issues/259
+https://github.com/fabiospampinato/cash/issues/75
+https://github.com/fabiospampinato/cash/issues/192
+
+[FIXME][ISSUE][CASH] Custom builds:
+https://github.com/fabiospampinato/cash/blob/master/docs/partial_builds.md
+https://github.com/fabiospampinato/cash/blob/master/docs/extending_cash.md
+#}
+
+
+
+{#
+[DECLINED] Confict with lazysizes.
+In general, I need to migrate to the native way.
+
+
+#}
+
+
+{# [DECLINED] I migrated to defer.js + lazysizes
+
+[INFO] No smooth scrolling, if JQuery Lazy:
+https://github.com/eisbehr-/jquery.lazy/issues/98#issuecomment-376064894
+
+[INFO] JQuery Lazy plugins:
+http://jquery.eisbehr.de/lazy/#plugins
+
+[INFO] I use lazy loading for iframes, so that I selected solely this plugin
+
+
+
+#}
+
+
+{# [FIXME] Migrate to the native lazy loading, when will I find a replacement for unveilhooks:
+https://web.dev/browser-level-image-lazy-loading/
+https://web.dev/iframe-lazy-loading/
+
+[INFO] lazysizes — lazy loading images and iframes:
+https://afarkas.github.io/lazysizes/index.html
+https://dev.to/carlesnunez/deep-dive-into-lazy-loading-images-211f
+#}
+
+
+
+{#
+[INFO] unveilhooks plugin — run script when user scroll to the specific element:
+https://afarkas.github.io/lazysizes/index.html
+https://stackoverflow.com/q/63753845/5951529
+
+[NOTE] I can’t found the solution without lazysizes/unveilhooks dependencies.
+Methods, described below, doesn’t worked for me:
+https://stackoverflow.com/a/40410131/5951529
+https://stackoverflow.com/q/21561480/5951529
+#}
+
+
+{# [INFO] Update scrollbar position after lazy load event #}
+
+
+
+{# [DECLINED] I migrated to Cash, because it much smaller:
+https://github.com/fabiospampinato/cash#comparison
+
+[INFO] JQuery not a good candidate for “async”, see:
+https://stackoverflow.com/a/10808243/5951529
+
+
+#}
+
+
+{# [DECLINED] Additional JavaScript — isn’t good for the web performance.
+I migrated to “markdown-link-attr-modifier”:
+https://github.com/Phuker/markdown_link_attr_modifier
+
+[INFO] Add “target="_blank"” for all external links via JQuery:
+https://bogdandragomir.com/blog/2016/12/add-target-_blank-attribute-external-anchors-page-javascript-jquery-one-single-line/
+ #}
+
+
+{# [NOTUSED] Commented, because for September 2020 I don’t use it,
+but i don’t rule out using this in the future
+
+[INFO] Custom scripts for specific articles/pages
+
+[REQUIRED] “Customjs: true” and “Customjs1: ” in article metadata
+
+{%- if kira_object.customjs -%}
+
+{%- endif -%} #}
diff --git a/themes/sashapelican/templates/includes/js-low-priority.html b/themes/sashapelican/templates/includes/js-low-priority.html
new file mode 100644
index 00000000..1a5f6a36
--- /dev/null
+++ b/themes/sashapelican/templates/includes/js-low-priority.html
@@ -0,0 +1,134 @@
+{# [INFO] Ostr.io — ethical analythics:
+https://github.com/VeliovGroup/ostrio-analytics#why-ostrio-analytics
+
+[NOTE] Development mode must be enabled for correct clean-console work:
+https://github.com/VeliovGroup/ostrio-analytics/issues/2#issuecomment-421593817
+#}
+
+
+{#
+[INFO] typo-reporter
+
+[NOTE] I migrated from npmcdn to JSDelivr; npmcdn hangs
+#}
+
+
+{# [INFO] AddToAny — social share buttons:
+https://www.addtoany.com
+
+[REQUIRED] “async” and “defer” as in example
+#}
+
+
+{# [INFO] Browser-Update — notification, if site visitor use old or bad browser:
+https://browser-update.org/ #}
+
+
+{# [INFO] Wildfire — comments for static sites:
+https://wildfire.js.org
+
+[WARNING] I can’t get Wildfire notifications:
+https://github.com/cheng-kang/wildfire/issues/47
+
+[INFO] Add Wildfire lazy, because it makes web pages load faster:
+https://stackoverflow.com/a/63869810/5951529 #}
+
+
+{%- if kira_object.lang == 'ru' -%}
+
+{% else %}
+
+{%- endif -%}
+
+
+{#
+[INFO] HesGallery — lightweight pure JavaScript lightbox library:
+https://demtario.github.io/hes-gallery/demo/
+[INFO] Options:
+https://github.com/demtario/hes-gallery#possible-options
+[NOTE] HesGallery haven’t thumbnails bar:
+https://github.com/demtario/hes-gallery/issues/10
+
+[FIXME][WARNING] hes-gallery doesn’t work for me with Defer.js
+
+[PATCH] https://github.com/demtario/hes-gallery/pull/12
+#}
+
+
+
+{#
+[DECLINED]
+
+1. Fancybox doesn’t work with gemini-scrollbar
++ Fancybox author quickly closes my detailed issue:
+https://github.com/fancyapps/fancybox/issues/2186
+2. JQuery required for Fancybox
+
+[INFO] Fancybox — lightbox library for presenting various types of media:
+https://fancyapps.com/fancybox/3/
+
+[NOTE] In CDNJS not possible latest version
+https://stackoverflow.com/q/14801334/5951529
+
+
+
+
+
+#}
+
+
+{#
+[DECLINED]
+
+1. Developer type — closer, see:
+https://github.com/nicolas-t/Chocolat/issues/121
+https://github.com/nicolas-t/Chocolat/issues/120
+2. hes-gallery is smaller
+[COMPARE] https://cdn.jsdelivr.net/npm/hes-gallery/dist/hes-gallery.min.js
+https://cdn.jsdelivr.net/npm/hes-gallery/dist/hes-gallery.min.js
+
+[INFO] Chocolat — vanilla js library for images zoom:
+http://chocolat.insipi.de/
+[INFO] Documentation:
+https://chocolat.gitbook.io/chocolat/
+
+
+
+
+#}
+
+
+{# [DECLINED] In 2020 modern browsers supports “details/summary”:
+https://caniuse.com/#search=details
+
+[INFO] Add support for “details” and “summary” tags for old browsers:
+http://ru.stackoverflow.com/a/498984/199934
+{% block base_detailspolyfill -%}
+ {%- if kira_object.detailspolyfill == 'true' -%}
+
+
+ {%- endif -%}
+{%- endblock %} #}
+
+
+{# [INFO] Mailerlite — subscribe to categories/tags by RSS:
+http://help.mailerlite.com/article/show/28992-how-do-rss-campaigns-work
+
+[FIXME][ISSUE] RSS displayed not correctly in subscriber’s e-mail:
+https://github.com/Kristinita/SashaMiscellaneous/issues/18
+
+[FIXME][ISSUE] CoffeeScript doesn’t supported:
+https://github.com/Kristinita/SashaMiscellaneous/issues/19
+ #}
diff --git a/themes/sashapelican/templates/includes/js-specific.html b/themes/sashapelican/templates/includes/js-specific.html
new file mode 100644
index 00000000..7aa6cf40
--- /dev/null
+++ b/themes/sashapelican/templates/includes/js-specific.html
@@ -0,0 +1,83 @@
+{#
+[INFO] Admonition — note, warning etc. blocks:
+https://python-markdown.github.io/extensions/admonition/
+
+[INFO] My design from MkDocs Material theme:
+https://squidfunk.github.io/mkdocs-material/reference/admonitions/#supported-types
+
+[INFO] Use big Material Icons font solely for icons in admonition:
+https://google.github.io/material-design-icons/
+https://google.github.io/material-design-icons/#setup-method-1-using-via-google-web-fonts
+
+[LINK] See “includes/fonts.html” file for description about font download:
+#}
+{% if "
+
+
+
+
+
+
+
+{% endif %}
+
+
+{# [INFO] Visualize — generate bar and pie charts via JavaScript:
+http://www.kellyking.me/projects/visualize/
+https://github.com/kellyk/visualize
+
+[FIXME] Replace to Mermaid on other tool, that generate charts in build process,
+not during page loading
+#}
+{%- if "
+ deferscript('{{SITEURL}}/{{ THEME_STATIC_DIR }}/js/Visualize/visualize{{MIN}}.js', 'visualize-local', 400);
+ deferscript('{{SITEURL}}/{{ THEME_STATIC_DIR }}/js/Visualize/visualize-bar-chart{{MIN}}.js', 'visualize-bar-chart', 700);
+ deferscript('{{SITEURL}}/{{ THEME_STATIC_DIR }}/js/Visualize/visualize-pie-chart{{MIN}}.js', 'visualize-pie-chart', 700);
+
+{%- endif -%}
+
+
+{# [INFO] RunKit — embed Node.js on any website:
+https://runkit.com/docs/embed
+
+[FIXME] Update RunKit to latest versions.
+#}
+{%- if "
" in kira_object.content -%}
+
+{%- endif -%}
+
+
+{#
+[INFO] ProgressBar — progress/status bar:
+https://facelessuser.github.io/pymdown-extensions/extensions/progressbar/
+
+[FIXME] Replace ProgressBar to bar chart extension
+
+[NOTE] Ansible and Saltstack solutions like below doesn’t work in Pelican:
+https://stackoverflow.com/a/42087938/5951529
+https://stackoverflow.com/a/54350773/5951529
+
+{%- if kira_object.content is match('^\\[=\\d+% .*\\]$') -%}
+
+{%- endif -%}
+#}
+{%- if "
+ deferstyle('{{SITEURL}}/{{THEME_STATIC_DIR}}/css/script-colors/ProgressBar/progressbar{{MIN}}.css', 'progressbar', 400);
+
+{%- endif -%}
diff --git a/themes/sashapelican/templates/includes/json-ld-articles.html b/themes/sashapelican/templates/includes/json-ld-articles.html
deleted file mode 100644
index bcb4c2a4..00000000
--- a/themes/sashapelican/templates/includes/json-ld-articles.html
+++ /dev/null
@@ -1,44 +0,0 @@
-{# JSON-LD
-https://developers.google.com/search/docs/guides/intro-structured-data
-[INFO] Use JSON-LD instead of schema.org:
-https://stackoverflow.com/a/29869449/5951529
-https://webmasters.stackexchange.com/a/102176/71131
-[INFO] Plase for JSON-LD paste:
-https://stackoverflow.com/a/30956615/5951529
-[INFO] Basic Metadata required, that validators doesn't show errors:
-http://ogp.me/#metadata
-[INFO] JSON-LD validators; Google haven't API:
-https://webmasters.stackexchange.com/a/56578/71131
-[BUG] Yandex Structured Data Validator have bugs, so I don't use it API in project:
-https://github.com/Kristinita/SashaMiscellaneous/issues/21
-https://github.com/Kristinita/SashaMiscellaneous/issues/22 #}
-
diff --git a/themes/sashapelican/templates/includes/lang-attribute.html b/themes/sashapelican/templates/includes/lang-attribute.html
new file mode 100644
index 00000000..7064f823
--- /dev/null
+++ b/themes/sashapelican/templates/includes/lang-attribute.html
@@ -0,0 +1,27 @@
+{# [BUG] In this case “en” value will be for all articles;
+“kira_object.lang” exists always.
+Use “” and manually add lang to
+articles/pages metadata.
+
+[REQUIRED] The same language, that text in article/page, for The Nu Html Checker:
+https://validator.github.io/validator/
+https://travis-ci.org/Kristinita/KristinitaPelican/jobs/381246941#L1202
+
+[INFO] Russian is default language for my site;
+if article is English this must be indicated in the article/page metadata.
+
+[LEARN][JINJA2] “-” sign for whitespace control:
+https://ttl255.com/jinja2-tutorial-part-3-whitespace-control/
+
+[WARNING] I couldn’t find any tool for automatically generate value of “lang” attribute:
+https://github.com/posthtml/posthtml-plugins-idea/issues/11
+
+[FIXME][ISSUE] Validator:
+https://github.com/validator/validator
+
+{%- if kira_object.lang -%}
+ en
+{%- else -%}
+ ru
+{%- endif -%}
+#}
diff --git a/themes/sashapelican/templates/includes/meta.html b/themes/sashapelican/templates/includes/meta.html
new file mode 100644
index 00000000..e6723ddb
--- /dev/null
+++ b/themes/sashapelican/templates/includes/meta.html
@@ -0,0 +1,72 @@
+{#
+[DECLINED]
+Plugins as Pelican Open Graph still use “kira_object.title” without Jinja2 filters,
+see 5.1 item:
+https://stackoverflow.com/q/64058029/5951529
+
+[LEARN][JINJA2] Set variable:
+https://stackoverflow.com/a/4181605/5951529
+
+{% set kira_title_variable = kira_object.title|replace('-', " ") %}
+#}
+
+
+{# [INFO] Title
+So far, manually add it to the articles/pages metadata:
+https://stackoverflow.com/q/64058029/5951529
+#}
+
{{ kira_object.title }}
+
+
+{# [INFO] Encoding #}
+
+
+
+{# [INFO] Content description:
+https://stackoverflow.com/a/11202372/5951529
+
+[INFO] In meta description content of “kira_object.summary” will without images in Markdown syntax;
+but preview of RSS feed will include them, if “summary” tag in “FORMATTED_FIELDS”.
+See, how it looks:
+“%PATH_KRISTINITA%\pelican-config\generation.yaml”
+https://docs.getpelican.com/en/latest/settings.html#basic-settings
+
+[LEARN][JINJA] Remove tags from HMTL/XML:
+https://jinja.palletsprojects.com/en/master/templates/#filters
+https://jinja.palletsprojects.com/en/master/templates/#striptags
+#}
+
+
+
+{# [INFO] Mobile-friendly:
+https://web.dev/viewport/#how-to-add-a-viewport-meta-tag #}
+
+
+
+{# [DECLINED]
+Since 2015, new IE and Edge versions doesn’t required it;
+I don’t support old versions:
+https://stackoverflow.com/a/6771584/5951529
+
+[INFO] Internet Explorer/Edge support
+
#}
+
+
+{# [INFO] Hide specific pages/articles from bots:
+https://www.link-assistant.com/blog/hiding-from-indexation-part-1/
+
+[INFO] I hide these types of articles/pages:
+1. Drafts
+2. Pages with controversial content
+
+[NOTE] I use “meta” tag, no “robots.txt”:
+1. “law-abiding” bots as Google, Yahoo! and Bing bots use “robots.txt”,
+but malicious bots — no.
+“meta” tag guarantees the blocking of all robots:
+https://www.woorank.com/en/blog/robots-txt-a-beginners-guide
+2. “meta” tag solution is more automated
+#}
+{%- if kira_object.status == 'draft' or kira_object.noindex -%}
+ {# [INFO] No index page, but index third-party links #}
+
+{% endif %}
diff --git a/themes/sashapelican/templates/includes/neighbors-en.html b/themes/sashapelican/templates/includes/neighbors-en.html
index 1d948309..faa70f25 100644
--- a/themes/sashapelican/templates/includes/neighbors-en.html
+++ b/themes/sashapelican/templates/includes/neighbors-en.html
@@ -1,10 +1,14 @@
-{% if article.prev_article_in_category %}
-
← Previous article
+{# [INFO] Neighbors — a Pelican plugin that adds Next/Previous links to articles:
+https://github.com/pelican-plugins/neighbors
+#}
+{% if kira_object.prev_article_in_category %}
+
← Previous article
{% else %}
-
Kristinita's Search
+
Kristinita’s Search
{% endif %}
-{% if article.next_article_in_category %}
-
Next article →
+
+{% if kira_object.next_article_in_category %}
+
Next article →
{% else %}
-
+
{% endif %}
diff --git a/themes/sashapelican/templates/includes/neighbors-ru.html b/themes/sashapelican/templates/includes/neighbors-ru.html
index 031eea37..60d7cd77 100644
--- a/themes/sashapelican/templates/includes/neighbors-ru.html
+++ b/themes/sashapelican/templates/includes/neighbors-ru.html
@@ -1,10 +1,14 @@
-{% if article.prev_article_in_category %}
-
← Предыдущая статья
+{# [INFO] Neighbors — a Pelican plugin that adds Next/Previous links to articles:
+https://github.com/pelican-plugins/neighbors
+#}
+{% if kira_object.prev_article_in_category %}
+
← Предыдущая статья
{% else %}
-
Поиск Кристиниты
+
Поиск Кристиниты
{% endif %}
-{% if article.next_article_in_category %}
-
Следующая статья →
+
+{% if kira_object.next_article_in_category %}
+
Следующая статья →
{% else %}
-
+
{% endif %}
diff --git a/themes/sashapelican/templates/includes/noscript-articles.html b/themes/sashapelican/templates/includes/noscript-articles.html
deleted file mode 100644
index 4c1c2ea7..00000000
--- a/themes/sashapelican/templates/includes/noscript-articles.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
- Sorry, this site doesn't work, if JavaScript disabled. Please, enable JavaScript for your browser .
- {# Split “.md” extension — remove 3 last symbols:
- https://www.pythoncentral.io/cutting-and-slicing-strings-in-python/ #}
- This site is open source; you can view source of this page , to make sure that it's not dangerous for your computer.
- Owner of this site think that JavaScript disabling — is obsolete action in {{ CURRENTYEAR }} and will not support users who did this . Probably, you don't need turn off JavaScript .
-
diff --git a/themes/sashapelican/templates/includes/noscript-pages.html b/themes/sashapelican/templates/includes/noscript-pages.html
deleted file mode 100644
index 74fb6042..00000000
--- a/themes/sashapelican/templates/includes/noscript-pages.html
+++ /dev/null
@@ -1,7 +0,0 @@
-
- Sorry, this site doesn't work, if JavaScript disabled. Please, enable JavaScript for your browser .
- {# Split “.md” extension — remove 3 last symbols:
- https://www.pythoncentral.io/cutting-and-slicing-strings-in-python/ #}
- This site is open source; you can view source of this page , to make sure that it's not dangerous for your computer.
- Owner of this site think that JavaScript disabling — is obsolete action in {{ CURRENTYEAR }} and will not support users who did this . Probably, you don't need turn off JavaScript .
-
diff --git a/themes/sashapelican/templates/includes/noscript.html b/themes/sashapelican/templates/includes/noscript.html
new file mode 100644
index 00000000..9daebb15
--- /dev/null
+++ b/themes/sashapelican/templates/includes/noscript.html
@@ -0,0 +1,18 @@
+{# [INFO] Message, if JavaScript disabled
+
+[LEARN][HTML] ARIA roles:
+http://prgssr.ru/development/ispolzovanie-aria-v-html5.html#heading-aria
+
+[INFO] “section” tag wrong in this case, I use “div” instead it:
+“Section lacks heading. Consider using “h2”-“h6” elements to add identifying headings to all sections.”
+https://www.w3.org/TR/2017/NOTE-wai-aria-practices-1.1-20171214/examples/alert/index.html
+#}
+
diff --git a/themes/sashapelican/templates/includes/preconnecting.html b/themes/sashapelican/templates/includes/preconnecting.html
new file mode 100644
index 00000000..7f2e5ee6
--- /dev/null
+++ b/themes/sashapelican/templates/includes/preconnecting.html
@@ -0,0 +1,40 @@
+{# [DECLINED] Currently, I haven’t use cases.
+
+[INFO] Use cases:
+“These two resource hints are helpful for improving page speed
+when you know you’ll download something from a third-party domain soon,
+but you don’t know the exact URL for the resource.”:
+https://web.dev/preconnect-and-dns-prefetch/#conclusion
+https://web.dev/preconnect-and-dns-prefetch/#use-cases-for-relpreconnect
+
+
+[OVERVIEW] Preconnecting domains.
+
+
+[INFO] “preconnect”
+“You can speed up the load time by 100–500 ms by establishing
+early connections to important third-party origins.”:
+https://web.dev/preconnect-and-dns-prefetch/
+https://webdev.imgix.net/preconnect-and-dns-prefetch/preconnect.png
+
+[INFO] “Preconnecting is only effective for domains other than the origin domain,
+so you shouldn’t use it for your site.”.
+
+[INFO] “Only preconnect to critical domains you will use soon”.
+“Unnecessary preconnecting can delay other important resources,
+so limit the number of preconnected domain”:
+https://web.dev/preconnect-and-dns-prefetch/#how-to-implement-relpreconnect
+
+
+[INFO] “dns-prefetch”.
+
+[INFO] “If a page needs to make connections to many third-party domains,
+preconnecting all of them is counterproductive.
+The "preconnect" hint is best used for only the most critical connections.
+For all the rest, use "
"”:
+https://web.dev/preconnect-and-dns-prefetch/#resolve-domain-name-early-with-reldns-prefetch
+
+[INFO] Use “preconnect” and “dns-prefetch” in different tags:
+https://web.dev/preconnect-and-dns-prefetch/#resolve-domain-name-early-with-reldns-prefetch
+#}
+
diff --git a/themes/sashapelican/templates/includes/addtoany-rss.html b/themes/sashapelican/templates/includes/rss-subscribe.html
similarity index 70%
rename from themes/sashapelican/templates/includes/addtoany-rss.html
rename to themes/sashapelican/templates/includes/rss-subscribe.html
index 21ef9a26..93f9870f 100644
--- a/themes/sashapelican/templates/includes/addtoany-rss.html
+++ b/themes/sashapelican/templates/includes/rss-subscribe.html
@@ -1,13 +1,14 @@
-
-
-
-{# [INFO] RSS feed subscribe buttons:
+{#
+[BUG] Critical page display bug on some browsers:
+https://github.com/noeldelgado/gemini-scrollbar/issues/64
+
+[INFO] RSS feed subscribe buttons:
https://www.addtoany.com/buttons/customize/follow_buttons
[INFO] Horizontal scrollbar; hide and show on scroll:
https://www.addtoany.com/buttons/customize/floating_share_buttons
#}
-
+
diff --git a/themes/sashapelican/templates/includes/share-buttons.html b/themes/sashapelican/templates/includes/share-buttons.html
new file mode 100644
index 00000000..d6a5c105
--- /dev/null
+++ b/themes/sashapelican/templates/includes/share-buttons.html
@@ -0,0 +1,21 @@
+{#
+[INFO] AddToAny buttons.
+
+[INFO] “aside” — a tag for these buttons:
+https://stackoverflow.com/a/18974422/5951529
+
+[INFO] Using multiple aside is possible:
+https://stackoverflow.com/a/27688129/5951529
+
+[FIXME][ISSUE] WAVE accessibility problems
+#}
+
diff --git a/themes/sashapelican/templates/includes/side-icon.html b/themes/sashapelican/templates/includes/side-icon.html
new file mode 100644
index 00000000..1e38bbbb
--- /dev/null
+++ b/themes/sashapelican/templates/includes/side-icon.html
@@ -0,0 +1,20 @@
+{# [INFO] Part of the screen area where are icons placed #}
+
+{# [INFO] Icon on the part of the screen #}
+
+
+
+ {# [INFO] Text at the bottom of the icon #}
+
+
+ {# [FIXME][JINJA2]
+ Correct syntax for “if {{template}} exists print {{template}}”
+ #}
+ {% if kira_object.pagetitle %}
+ {{ kira_object.pagetitle }}
+ {% else %}
+ {{ kira_object.title }}
+ {% endif %}
+
+
+
diff --git a/themes/sashapelican/templates/includes/structured-data.html b/themes/sashapelican/templates/includes/structured-data.html
new file mode 100644
index 00000000..3922ad26
--- /dev/null
+++ b/themes/sashapelican/templates/includes/structured-data.html
@@ -0,0 +1,86 @@
+{# [INFO] Open Graph:
+http://ruogp.me
+
+[NIFO] All basic metadata required in articles and pages;
+Yandex Structured data validator gives errors, if no all:
+https://webmaster.yandex.com/tools/microtest/
+https://ruogp.me/#metadata
+
+[INFO] See full types list for 2018:
+https://stackoverflow.com/a/50273929/5951529
+
+
+[LEARN][JINJA] “|e” (“escape”) filter remove HTML chars “>”, “<”, “&”, “"”, from Pelican tags:
+http://jinja.pocoo.org/docs/latest/templates/#working-with-manual-escaping
+https://jinja.palletsprojects.com/en/master/templates/#escape
+https://stackoverflow.com/a/1556570/5951529
+#}
+{% for tag in kira_object.ogtags %}
+
+{% endfor %}
+
+
+{# [DECLINED]
+[LINK] Read “title” section for details
+
+[LEARN][JINJA2] Pass variable to “include”:
+https://github.com/pallets/jinja/issues/241
+https://stackoverflow.com/a/32657364/5951529
+
+[FIXME][JINJA2] Duplicate “kira_title_variable=kira_title_variable”:
+
+{% with kira_title_variable=kira_title_variable %}
+ {% include 'includes/json-ld.html' %}
+{% endwith %}
+#}
+
+
+{# [OVERVIEW] JSON-LD:
+https://developers.google.com/search/docs/guides/intro-structured-data
+
+[INFO] Use JSON-LD instead of schema.org:
+https://stackoverflow.com/a/29869449/5951529
+https://webmasters.stackexchange.com/a/102176/71131
+
+[INFO] Place for JSON-LD paste:
+https://stackoverflow.com/a/30956615/5951529
+
+[INFO] Basic Metadata required, that validators doesn’t show errors:
+http://ogp.me/#metadata
+
+[INFO] JSON-LD validators; Google haven’t API:
+https://webmasters.stackexchange.com/a/56578/71131
+
+[BUG] Yandex Structured Data Validator have bugs, so I don’t use it API in project:
+https://github.com/Kristinita/SashaMiscellaneous/issues/21
+https://github.com/Kristinita/SashaMiscellaneous/issues/22 #}
+
diff --git a/themes/sashapelican/templates/includes/tables.html b/themes/sashapelican/templates/includes/tables.html
new file mode 100644
index 00000000..72093896
--- /dev/null
+++ b/themes/sashapelican/templates/includes/tables.html
@@ -0,0 +1,26 @@
+{#
+[INFO] jquery-responsive-tables — responsive tables:
+https://www.npmjs.com/package/jquery-responsive-tables
+
+[INFO] Cash-compatible, JQuery not required
+
+[NOTE] I can’t find another method make tables responsive:
+https://stackoverflow.com/q/50274179/5951529
+
+[NOTE] Collapse by orientation change (“landscape/portrait”) isn’t available:
+https://github.com/ryanwellsdotcom/jquery-responsive-tables/issues/2
+
+[FIXME] Bad tables quality:
+https://i.imgur.com/WLyEBkb.png
+
+[NOTE] Delay time is “700” and “1000”, not “400”/“700”,
+because sometimes “responsive-tables” can’t boot after cash
+and I get error in the console.
+#}
+{%- if "
" in kira_object.content -%}
+
+{%- endif -%}
diff --git a/themes/sashapelican/templates/index.html b/themes/sashapelican/templates/index.html
index 269a9e62..47b8a297 100644
--- a/themes/sashapelican/templates/index.html
+++ b/themes/sashapelican/templates/index.html
@@ -50,7 +50,7 @@
{# [NOTE] Don't use protocol-relative URLs:
https://stackoverflow.com/a/54386928/5951529 #}
-
+
@@ -93,7 +93,7 @@
Примеры
Описание
-
+
{# Status role:
diff --git a/themes/sashapelican/templates/page.html b/themes/sashapelican/templates/page.html
index 6b3e5516..10900384 100644
--- a/themes/sashapelican/templates/page.html
+++ b/themes/sashapelican/templates/page.html
@@ -1,172 +1,11 @@
-{# [LEARN][PELICAN] Differences pages and articles:
-1. In pages disable categories.
-2. Replace any files with “articles”. #}
-{% extends 'base.html' %}
-
-
-
-{% block base_language %}{{ page.lang }}{% endblock %}
-
-{% block base_pagetitle %}{{ page.pagetitle }}{% endblock %}
-
-{% block base_summary_striptags %}{{ page.summary|striptags}}{% endblock %}
-
-{% block base_opengraphimage %}{{ page.opengraphimage }}{% endblock %}
-
-
-
-{# jquery-responsive-tables #}
-{% block base_responsive_tables -%}
- {%- if page.table == 'standard' -%}
-
-
-
- {%- elif page.table == 'onecolumn' -%}
-
- {%- endif -%}
-{%- endblock %}
-
-
-{% block base_typoreporter -%}
-
- {%- if page.lang == 'ru' -%}
-
- {% else %}
-
- {%- endif -%}
-{%- endblock %}
-
-
-{% block base_tooltipster -%}
- {%- if page.tooltipster -%}
-
-
-
-
- {%- endif -%}
-{%- endblock %}
-
-
-{% block base_clipboardjs -%}
- {%- if page.clipboardjs -%}
-
-
- {%- endif -%}
-{%- endblock %}
-
-
-{# JavaScript pie and bar charts:
-http://www.kellyking.me/projects/visualize/
-https://github.com/kellyk/visualize #}
-{% block base_visualize -%}
- {%- if page.visualize -%}
-
-
-
- {%- endif -%}
-{%- endblock %}
-
-
-
-{#
-
-{% block base_detailspolyfill -%}
- {%- if page.detailspolyfill == 'true' -%}
-
-
- {%- endif -%}
-{%- endblock %} #}
-
-
-{% block base_customjs -%}
- {%- if page.customjs -%}
-
- {%- endif -%}
-{%- endblock %}
+{# [LEARN][PELICAN] Differences between pages and articles:
+> The idea behind “pages” is that they are usually not temporal in nature and
+are used for content that does not change very often (e.g., “About” or “Contact” pages).
-
+https://docs.getpelican.com/en/latest/content.html
-
-{% block base_iconleftorright %}{{ page.iconleftorright }}{% endblock %}
-
-{% block base_pagecolors %}{{ page.pagecolors }}{% endblock %}
-
-{% block base_modernizr %}
-{# [NOTE] Modernizr automatically generate minified file.
-It would be nice use “.min.js”, not {{MIN}} template:
-https://stackoverflow.com/a/41319855/5951529
+[NOTE] Categories disable in pages.
#}
-
-
-{% endblock %}
-
-
-{% block base_customcss -%}
- {%- if page.customcss -%}
-
- {%- endif -%}
-{%- endblock %}
-
-{% block galleryblock -%}
-{% if page.photo_image %} {% endif %}
-{%- endblock %}
-
-
-
-
-{% block base_asidetitle %}{{ page.pagetitle }}{% endblock %}
-
-
-{% block base_h1 %}{{ page.pagetitle }}{% endblock %}
-{% block base_noco %}{{ page.noco }}{% endblock %}
-{% block base_version %}{{ page.version }}{% endblock %}
-{% block base_date %}{{ page.locale_date }}{% endblock %}
-{% block base_date_modified %}{{ page.locale_modified }}{% endblock %}
-
-
-{% block base_epigraph -%}
- {%- if page.epigraph -%}
-
- {{ page.epigraphtext }}
-
- {% endif %}
-{%- endblock %}
-
-
-{% block base_titleimage -%}
- {%- if page.titleimage -%}
-
- {% endif %}
-{%- endblock %}
-
-
-{% block base_content %}{{ page.content }}{% endblock %}
-
-
-{% block base_new_russian %}
- {% include 'includes/footer-pages.html' %}
-{% endblock %}
-
-{% block base_noscript %}
- {% include 'includes/noscript-pages.html' %}
-{% endblock %}
+{% extends 'base.html' %}
diff --git a/themes/sashapelican/templates/sasha-black.html b/themes/sashapelican/templates/sasha-black.html
index 83e2e912..a811d325 100644
--- a/themes/sashapelican/templates/sasha-black.html
+++ b/themes/sashapelican/templates/sasha-black.html
@@ -17,6 +17,7 @@
+
{# [INFO] JSON-LD for Web Applications:
https://www.darrenlester.com/blog/json-ld-structured-data-for-web-applications
[WARNING] Google required “aggregateRating” and “offers” keys:
@@ -137,14 +138,7 @@
1. Введите URL заглавной страницы. Неважно, в каком виде: kristinita.netlify.app , https://kristinita.netlify.app , kristinita.netlify.app/ или www.kristinita.netlify.app .
2. Нажимайте на кнопки, и по ссылкам всё должно быть понятно. Если нет, читайте
- {# [LEARN][HTML] Use “rel="noopener"” for “target="_blank"”:
- https://mathiasbynens.github.io/rel-noopener/
- Htmllint require it:
- https://github.com/htmllint/htmllint/issues/232
- [WARNING] Edge not support it:
- https://caniuse.com/#search=noopener
- https://github.com/MicrosoftEdge/Status/issues/450 #}
-
+
справку .
diff --git a/third-party-plugins/just_table/.gitignore b/third-party-plugins/just_table/.gitignore
deleted file mode 100644
index d2c59194..00000000
--- a/third-party-plugins/just_table/.gitignore
+++ /dev/null
@@ -1,57 +0,0 @@
-# Byte-compiled / optimized / DLL files
-__pycache__/
-*.py[cod]
-
-# C extensions
-*.so
-
-# Distribution / packaging
-.Python
-env/
-build/
-develop-eggs/
-dist/
-downloads/
-eggs/
-.eggs/
-lib/
-lib64/
-parts/
-sdist/
-var/
-*.egg-info/
-.installed.cfg
-*.egg
-
-# PyInstaller
-# Usually these files are written by a python script from a template
-# before PyInstaller builds the exe, so as to inject date/other infos into it.
-*.manifest
-*.spec
-
-# Installer logs
-pip-log.txt
-pip-delete-this-directory.txt
-
-# Unit test / coverage reports
-htmlcov/
-.tox/
-.coverage
-.coverage.*
-.cache
-nosetests.xml
-coverage.xml
-*,cover
-
-# Translations
-*.mo
-*.pot
-
-# Django stuff:
-*.log
-
-# Sphinx documentation
-docs/_build/
-
-# PyBuilder
-target/
\ No newline at end of file
diff --git a/third-party-plugins/just_table/LICENSE b/third-party-plugins/just_table/LICENSE
deleted file mode 100644
index 148616ff..00000000
--- a/third-party-plugins/just_table/LICENSE
+++ /dev/null
@@ -1,339 +0,0 @@
- GNU GENERAL PUBLIC LICENSE
- Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The licenses for most software are designed to take away your
-freedom to share and change it. By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users. This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it. (Some other Free Software Foundation software is covered by
-the GNU Lesser General Public License instead.) You can apply it to
-your programs, too.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
- To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
- For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have. You must make sure that they, too, receive or can get the
-source code. And you must show them these terms so they know their
-rights.
-
- We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
- Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software. If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
- Finally, any free program is threatened constantly by software
-patents. We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary. To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- GNU GENERAL PUBLIC LICENSE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
- 0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License. The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language. (Hereinafter, translation is included without limitation in
-the term "modification".) Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope. The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
- 1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
- 2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
- a) You must cause the modified files to carry prominent notices
- stating that you changed the files and the date of any change.
-
- b) You must cause any work that you distribute or publish, that in
- whole or in part contains or is derived from the Program or any
- part thereof, to be licensed as a whole at no charge to all third
- parties under the terms of this License.
-
- c) If the modified program normally reads commands interactively
- when run, you must cause it, when started running for such
- interactive use in the most ordinary way, to print or display an
- announcement including an appropriate copyright notice and a
- notice that there is no warranty (or else, saying that you provide
- a warranty) and that users may redistribute the program under
- these conditions, and telling the user how to view a copy of this
- License. (Exception: if the Program itself is interactive but
- does not normally print such an announcement, your work based on
- the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole. If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works. But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
- 3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
- a) Accompany it with the complete corresponding machine-readable
- source code, which must be distributed under the terms of Sections
- 1 and 2 above on a medium customarily used for software interchange; or,
-
- b) Accompany it with a written offer, valid for at least three
- years, to give any third party, for a charge no more than your
- cost of physically performing source distribution, a complete
- machine-readable copy of the corresponding source code, to be
- distributed under the terms of Sections 1 and 2 above on a medium
- customarily used for software interchange; or,
-
- c) Accompany it with the information you received as to the offer
- to distribute corresponding source code. (This alternative is
- allowed only for noncommercial distribution and only if you
- received the program in object code or executable form with such
- an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it. For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable. However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
- 4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License. Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
- 5. You are not required to accept this License, since you have not
-signed it. However, nothing else grants you permission to modify or
-distribute the Program or its derivative works. These actions are
-prohibited by law if you do not accept this License. Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
- 6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions. You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
- 7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all. For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices. Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
- 8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded. In such case, this License incorporates
-the limitation as if written in the body of this License.
-
- 9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time. Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number. If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation. If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
- 10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission. For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this. Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
- NO WARRANTY
-
- 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
- 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
- {description}
- Copyright (C) {year} {fullname}
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License along
- with this program; if not, write to the Free Software Foundation, Inc.,
- 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
- Gnomovision version 69, Copyright (C) year name of author
- Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
- This is free software, and you are welcome to redistribute it
- under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License. Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary. Here is a sample; alter the names:
-
- Yoyodyne, Inc., hereby disclaims all copyright interest in the program
- `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
- {signature of Ty Coon}, 1 April 1989
- Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs. If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library. If this is what you want to do, use the GNU Lesser General
-Public License instead of this License.
\ No newline at end of file
diff --git a/third-party-plugins/just_table/README.md b/third-party-plugins/just_table/README.md
deleted file mode 100644
index a02c9e20..00000000
--- a/third-party-plugins/just_table/README.md
+++ /dev/null
@@ -1,210 +0,0 @@
-# Just Table
-
-Just table is a plugin for Pelican to create an easily table. Before this plugin, you can create tables like below way or maybe another way that I don't know :).
-```
-| | | | | |
-|---|---|---|---|---|
-| | | | | |
-| | | | | |
-| | | | | |
-```
-It looks easy, but sometimes you want to create a basic table quickly by the different way. Actually, I hate above way. Now, time to the just table's way.
-## Usage
-
-
-
-* Basic table
-
-
-
-```
-[jtable]
-Year,Make,Model,Length
-1994,Ford,E350,2.34
-2000,Mercury,Cougar,2.38
-[/jtable]
-```
-
-
-
-| Year | Make | Model | Length |
-|:----:|:-------:|:------:|:------:|
-| 1994 | Ford | E350 | 2.34 |
-| 2000 | Mercury | Cougar | 2.38 |
-
-
-
-
-* More complicated
-
-
-```
-[jtable]
-Year,Make,Model,Description,Price
-1997,Ford,E350,ac,3000.00
-1999,Chevy,Venture Extended Edition,,4900.00
-1999,Chevy,Venture Extended Edition and Very Large,,5000.00
-1996,Jeep,Grand Cherokee,MUST SELL!,4799.00
-[/jtable]
-```
-
-
-
-| Year | Make | Model | Description | Price |
-|------|-------|---------------------------------------------|---------------|---------|
-| 1997 | Ford | E350 | ac | 3000.00 |
-| 1999 | Chevy | Venture Extended Edition | | 4900.00 |
-| 1999 | Chevy | Venture Extended Edition and Very Large | | 5000.00 |
-| 1996 | Jeep | Grand Cherokee | MUST SELL! | 4799.00 |
-
-
-* Table with no heading
-
-
-
-```
-[jtable th="0"]
-row1col1,row1col2,row1col3
-row2col1,row2col2,row2col3
-row3col1,row3col2,row3col3
-[/jtable]
-```
-
-
-
-| | | |
-|----------|----------|----------|
-| row1col1 | row1col2 | row1col3 |
-| row2col1 | row2col2 | row2col3 |
-| row3col1 | row3col2 | row3col3 |
-
-
-
-
-* Table with caption without heading
-
-
-
-```
-[jtable caption="This is caption" th="0"]
-row1col1,row1col2,row1col3
-row2col1,row2col2,row2col3
-row3col1,row3col2,row3col3
-[/jtable]
-```
-
-
-||This is caption ||
-|----------|----------|----------|
-| row1col1 | row1col2 | row1col3 |
-| row2col1 | row2col2 | row2col3 |
-| row3col1 | row3col2 | row3col3 |
-
-
-or if you want to head and caption both, you can delete ```th="0"```
-
-
-* Table with auto index and It'll start from 1
-
-
-
-```
-[jtable ai="1"]
-head1,head2,head3
-row1col1,row1col2,row1col3
-row2col1,row2col2,row2col3
-row3col1,row3col2,row3col3
-row4col1,row4col2,row4col3
-[/jtable]
-```
-
-
-| No. | head1 | head2 | head3 |
-|:----:|:-------:|:------:|:------:|
-| 1 | row1col1 | row1col2 | row1col3 |
-| 2 | row2col1 | row2col2 | row2col3 |
-| 3 | row3col1 | row3col2 | row3col3 |
-| 4 | row4col1 | row4col2 | row4col3 |
-
-
-* Custom separator for specific table
-
-
-```
-[jtable separator="|"]
-head1|head2|head3
-row1col1|row1col2|row1col3
-row2col1|row2col2|row2col3
-row3col1|row3col2|row3col3
-row4col1|row4col2|row4col3
-[/jtable]
-```
-
-
-### Installation
-
-Add the plugin path to your PLUGINS setting in the pelicanconf.py file.
-
-
-
-```PLUGINS = [... , 'just_table' , ... ]```
-
-
-### Configuration
-
-**Custom template**
-
-You can customize table look by specifying `JTABLE_TEMPLATE` in your
-`pelicanconf.py`. For example to match your bootstrap theme:
-
-````
-JTABLE_TEMPLATE = """
-
- {% if caption %}
- {{ caption }}
- {% endif %}
- {% if th != 0 %}
-
-
- {% if ai == 1 %}
- No.
- {% endif %}
- {% for head in heads %}
- {{ head }}
- {% endfor %}
-
-
- {% endif %}
-
- {% for body in bodies %}
-
- {% if ai == 1 %}
- {{ loop.index }}
- {% endif %}
- {% for entry in body %}
- {{ entry }}
- {% endfor %}
-
- {% endfor %}
-
-
-"""
-````
-
-**Custom separator**
-
-Custom separator for all tables also can be specified:
-
-````
-JTABLE_SEPARATOR = '|'
-````
-
-
-### Todo's
-
- - Read from CSV
-
-
-
-### License
-GPL
\ No newline at end of file
diff --git a/third-party-plugins/just_table/__init__.py b/third-party-plugins/just_table/__init__.py
deleted file mode 100644
index 8ecf34d0..00000000
--- a/third-party-plugins/just_table/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""Initialize plugin."""
-from .just_table import * # noqa
diff --git a/third-party-plugins/just_table/just_table.py b/third-party-plugins/just_table/just_table.py
deleted file mode 100644
index f95366cf..00000000
--- a/third-party-plugins/just_table/just_table.py
+++ /dev/null
@@ -1,164 +0,0 @@
-"""just_table.
-
-Table embedding plugin for Pelican
-=================================
-
-This plugin allows you to create easily table.
-
-"""
-import re
-
-from jinja2 import Template
-from pelican import signals
-
-JTABLE_SEPARATOR = "JTABLE_SEPARATOR"
-JTABLE_TEMPLATE = "JTABLE_TEMPLATE"
-DEFAULT_SEPARATOR = ","
-
-AUTO_INCREMENT_REGEX = re.compile(r"ai ?\= ?\" ?(1) ?\"")
-CAPTION_REGEX = re.compile('caption ?= ?"(.+?)"')
-SEPARATOR_REGEX = re.compile('separator ?= ?"(.+?)"')
-TABLE_HEADER_REGEX = re.compile(r"th ?\= ?\" ?(0) ?\"")
-MAIN_REGEX = re.compile(r"(\[jtable(.*?)\]([\s\S]*?)\[\/jtable\])")
-
-DEFAULT_TEMPATE = """
-
-
- {%- if caption %}
- {{ caption }}
- {%- endif %}
- {%- if th != 0 %}
-
-
- {%- if ai == 1 %}
- No.
- {%- endif %}
- {%- for head in heads %}
- {{ head }}
- {%- endfor %}
-
-
- {%- endif %}
-
- {%- for body in bodies %}
-
- {%- if ai == 1 %}
- {{ loop.index }}
- {%- endif %}
- {%- for entry in body %}
- {{ entry }}
- {%- endfor %}
-
- {%- endfor %}
-
-
-
-"""
-
-
-def generate_table(generator): # pylint: disable=too-many-branches
- """Generate table."""
- if JTABLE_SEPARATOR in generator.settings:
- separator = generator.settings[JTABLE_SEPARATOR]
- else:
- separator = DEFAULT_SEPARATOR
-
- if JTABLE_TEMPLATE in generator.settings:
- table_template = generator.settings[JTABLE_TEMPLATE]
- else:
- table_template = DEFAULT_TEMPATE
-
- template = Template(table_template)
-
- for article in generator.articles + generator.drafts:
- for match in MAIN_REGEX.findall(article._content):
- all_match_str, props, table_data = match
- param = {"ai": 0, "th": 1, "caption": "", "sep": separator}
-
- if AUTO_INCREMENT_REGEX.search(props):
- param["ai"] = 1
- if CAPTION_REGEX.search(props):
- param["caption"] = CAPTION_REGEX.findall(props)[0]
- if TABLE_HEADER_REGEX.search(props):
- param["th"] = 0
- if SEPARATOR_REGEX.search(props):
- param["sep"] = SEPARATOR_REGEX.findall(props)[0]
-
- table_data_list = table_data.strip().split("\n")
-
- if len(table_data_list) >= 1:
- heads = table_data_list[0].split(
- param["sep"]) if param["th"] else None
- if heads:
- bodies = [
- n.split(param["sep"], len(heads) - 1)
- for n in table_data_list[1:]
- ]
- else:
- bodies = [n.split(param["sep"]) for n in table_data_list]
-
- context = generator.context.copy()
- context.update({"heads": heads, "bodies": bodies})
- context.update(param)
-
- replacement = template.render(context)
- article._content = article._content.replace(
- "".join(all_match_str), replacement
- )
-
-
-def generate_table_pages(generator): # pylint: disable=too-many-branches
- """Generate tables for pages."""
- if JTABLE_SEPARATOR in generator.settings:
- separator = generator.settings[JTABLE_SEPARATOR]
- else:
- separator = DEFAULT_SEPARATOR
-
- if JTABLE_TEMPLATE in generator.settings:
- table_template = generator.settings[JTABLE_TEMPLATE]
- else:
- table_template = DEFAULT_TEMPATE
-
- template = Template(table_template)
-
- for page in generator.pages:
- for match in MAIN_REGEX.findall(page._content):
- all_match_str, props, table_data = match
- param = {"ai": 0, "th": 1, "caption": "", "sep": separator}
-
- if AUTO_INCREMENT_REGEX.search(props):
- param["ai"] = 1
- if CAPTION_REGEX.search(props):
- param["caption"] = CAPTION_REGEX.findall(props)[0]
- if TABLE_HEADER_REGEX.search(props):
- param["th"] = 0
- if SEPARATOR_REGEX.search(props):
- param["sep"] = SEPARATOR_REGEX.findall(props)[0]
-
- table_data_list = table_data.strip().split("\n")
-
- if len(table_data_list) >= 1:
- heads = table_data_list[0].split(
- param["sep"]) if param["th"] else None
- if heads:
- bodies = [
- n.split(param["sep"], len(heads) - 1)
- for n in table_data_list[1:]
- ]
- else:
- bodies = [n.split(param["sep"]) for n in table_data_list]
-
- context = generator.context.copy()
- context.update({"heads": heads, "bodies": bodies})
- context.update(param)
-
- replacement = template.render(context)
- page._content = page._content.replace(
- "".join(all_match_str), replacement
- )
-
-
-def register():
- """Plugin registration."""
- signals.article_generator_finalized.connect(generate_table)
- signals.page_generator_finalized.connect(generate_table_pages)
diff --git a/third-party-plugins/open_graph/.gitignore b/third-party-plugins/open_graph/.gitignore
deleted file mode 100644
index d00bd8cb..00000000
--- a/third-party-plugins/open_graph/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-*.pyc
-.ropeproject
\ No newline at end of file
diff --git a/third-party-plugins/open_graph/.travis.yml b/third-party-plugins/open_graph/.travis.yml
deleted file mode 100644
index 5daec5d3..00000000
--- a/third-party-plugins/open_graph/.travis.yml
+++ /dev/null
@@ -1,22 +0,0 @@
-# Needs Xenial, not Trusty for Python 3.7 works:
-# https://travis-ci.community/t/unable-to-download-python-3-7-archive-on-travis-ci/639/2
-# https://github.com/travis-ci/travis-ci/issues/9815#issuecomment-425867404
-dist: xenial
-
-# [INFO] Don't download all repository history, that save a time:
-# https://docs.travis-ci.com/user/customizing-the-build/#git-clone-depth
-git:
- depth: 1
-
-language: python
-
-python: 3.7
-
-install:
-- pip install --upgrade pip
-- pip install flake8 pydocstyle pylint
-
-script:
-- flake8 .
-- pydocstyle
-- pylint .
\ No newline at end of file
diff --git a/third-party-plugins/open_graph/LICENSE b/third-party-plugins/open_graph/LICENSE
deleted file mode 100644
index dba13ed2..00000000
--- a/third-party-plugins/open_graph/LICENSE
+++ /dev/null
@@ -1,661 +0,0 @@
- GNU AFFERO GENERAL PUBLIC LICENSE
- Version 3, 19 November 2007
-
- Copyright (C) 2007 Free Software Foundation, Inc.
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
- Preamble
-
- The GNU Affero General Public License is a free, copyleft license for
-software and other kinds of works, specifically designed to ensure
-cooperation with the community in the case of network server software.
-
- The licenses for most software and other practical works are designed
-to take away your freedom to share and change the works. By contrast,
-our General Public Licenses are intended to guarantee your freedom to
-share and change all versions of a program--to make sure it remains free
-software for all its users.
-
- When we speak of free software, we are referring to freedom, not
-price. Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-them if you wish), that you receive source code or can get it if you
-want it, that you can change the software or use pieces of it in new
-free programs, and that you know you can do these things.
-
- Developers that use our General Public Licenses protect your rights
-with two steps: (1) assert copyright on the software, and (2) offer
-you this License which gives you legal permission to copy, distribute
-and/or modify the software.
-
- A secondary benefit of defending all users' freedom is that
-improvements made in alternate versions of the program, if they
-receive widespread use, become available for other developers to
-incorporate. Many developers of free software are heartened and
-encouraged by the resulting cooperation. However, in the case of
-software used on network servers, this result may fail to come about.
-The GNU General Public License permits making a modified version and
-letting the public access it on a server without ever releasing its
-source code to the public.
-
- The GNU Affero General Public License is designed specifically to
-ensure that, in such cases, the modified source code becomes available
-to the community. It requires the operator of a network server to
-provide the source code of the modified version running there to the
-users of that server. Therefore, public use of a modified version, on
-a publicly accessible server, gives the public access to the source
-code of the modified version.
-
- An older license, called the Affero General Public License and
-published by Affero, was designed to accomplish similar goals. This is
-a different license, not a version of the Affero GPL, but Affero has
-released a new version of the Affero GPL which permits relicensing under
-this license.
-
- The precise terms and conditions for copying, distribution and
-modification follow.
-
- TERMS AND CONDITIONS
-
- 0. Definitions.
-
- "This License" refers to version 3 of the GNU Affero General Public License.
-
- "Copyright" also means copyright-like laws that apply to other kinds of
-works, such as semiconductor masks.
-
- "The Program" refers to any copyrightable work licensed under this
-License. Each licensee is addressed as "you". "Licensees" and
-"recipients" may be individuals or organizations.
-
- To "modify" a work means to copy from or adapt all or part of the work
-in a fashion requiring copyright permission, other than the making of an
-exact copy. The resulting work is called a "modified version" of the
-earlier work or a work "based on" the earlier work.
-
- A "covered work" means either the unmodified Program or a work based
-on the Program.
-
- To "propagate" a work means to do anything with it that, without
-permission, would make you directly or secondarily liable for
-infringement under applicable copyright law, except executing it on a
-computer or modifying a private copy. Propagation includes copying,
-distribution (with or without modification), making available to the
-public, and in some countries other activities as well.
-
- To "convey" a work means any kind of propagation that enables other
-parties to make or receive copies. Mere interaction with a user through
-a computer network, with no transfer of a copy, is not conveying.
-
- An interactive user interface displays "Appropriate Legal Notices"
-to the extent that it includes a convenient and prominently visible
-feature that (1) displays an appropriate copyright notice, and (2)
-tells the user that there is no warranty for the work (except to the
-extent that warranties are provided), that licensees may convey the
-work under this License, and how to view a copy of this License. If
-the interface presents a list of user commands or options, such as a
-menu, a prominent item in the list meets this criterion.
-
- 1. Source Code.
-
- The "source code" for a work means the preferred form of the work
-for making modifications to it. "Object code" means any non-source
-form of a work.
-
- A "Standard Interface" means an interface that either is an official
-standard defined by a recognized standards body, or, in the case of
-interfaces specified for a particular programming language, one that
-is widely used among developers working in that language.
-
- The "System Libraries" of an executable work include anything, other
-than the work as a whole, that (a) is included in the normal form of
-packaging a Major Component, but which is not part of that Major
-Component, and (b) serves only to enable use of the work with that
-Major Component, or to implement a Standard Interface for which an
-implementation is available to the public in source code form. A
-"Major Component", in this context, means a major essential component
-(kernel, window system, and so on) of the specific operating system
-(if any) on which the executable work runs, or a compiler used to
-produce the work, or an object code interpreter used to run it.
-
- The "Corresponding Source" for a work in object code form means all
-the source code needed to generate, install, and (for an executable
-work) run the object code and to modify the work, including scripts to
-control those activities. However, it does not include the work's
-System Libraries, or general-purpose tools or generally available free
-programs which are used unmodified in performing those activities but
-which are not part of the work. For example, Corresponding Source
-includes interface definition files associated with source files for
-the work, and the source code for shared libraries and dynamically
-linked subprograms that the work is specifically designed to require,
-such as by intimate data communication or control flow between those
-subprograms and other parts of the work.
-
- The Corresponding Source need not include anything that users
-can regenerate automatically from other parts of the Corresponding
-Source.
-
- The Corresponding Source for a work in source code form is that
-same work.
-
- 2. Basic Permissions.
-
- All rights granted under this License are granted for the term of
-copyright on the Program, and are irrevocable provided the stated
-conditions are met. This License explicitly affirms your unlimited
-permission to run the unmodified Program. The output from running a
-covered work is covered by this License only if the output, given its
-content, constitutes a covered work. This License acknowledges your
-rights of fair use or other equivalent, as provided by copyright law.
-
- You may make, run and propagate covered works that you do not
-convey, without conditions so long as your license otherwise remains
-in force. You may convey covered works to others for the sole purpose
-of having them make modifications exclusively for you, or provide you
-with facilities for running those works, provided that you comply with
-the terms of this License in conveying all material for which you do
-not control copyright. Those thus making or running the covered works
-for you must do so exclusively on your behalf, under your direction
-and control, on terms that prohibit them from making any copies of
-your copyrighted material outside their relationship with you.
-
- Conveying under any other circumstances is permitted solely under
-the conditions stated below. Sublicensing is not allowed; section 10
-makes it unnecessary.
-
- 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
-
- No covered work shall be deemed part of an effective technological
-measure under any applicable law fulfilling obligations under article
-11 of the WIPO copyright treaty adopted on 20 December 1996, or
-similar laws prohibiting or restricting circumvention of such
-measures.
-
- When you convey a covered work, you waive any legal power to forbid
-circumvention of technological measures to the extent such circumvention
-is effected by exercising rights under this License with respect to
-the covered work, and you disclaim any intention to limit operation or
-modification of the work as a means of enforcing, against the work's
-users, your or third parties' legal rights to forbid circumvention of
-technological measures.
-
- 4. Conveying Verbatim Copies.
-
- You may convey verbatim copies of the Program's source code as you
-receive it, in any medium, provided that you conspicuously and
-appropriately publish on each copy an appropriate copyright notice;
-keep intact all notices stating that this License and any
-non-permissive terms added in accord with section 7 apply to the code;
-keep intact all notices of the absence of any warranty; and give all
-recipients a copy of this License along with the Program.
-
- You may charge any price or no price for each copy that you convey,
-and you may offer support or warranty protection for a fee.
-
- 5. Conveying Modified Source Versions.
-
- You may convey a work based on the Program, or the modifications to
-produce it from the Program, in the form of source code under the
-terms of section 4, provided that you also meet all of these conditions:
-
- a) The work must carry prominent notices stating that you modified
- it, and giving a relevant date.
-
- b) The work must carry prominent notices stating that it is
- released under this License and any conditions added under section
- 7. This requirement modifies the requirement in section 4 to
- "keep intact all notices".
-
- c) You must license the entire work, as a whole, under this
- License to anyone who comes into possession of a copy. This
- License will therefore apply, along with any applicable section 7
- additional terms, to the whole of the work, and all its parts,
- regardless of how they are packaged. This License gives no
- permission to license the work in any other way, but it does not
- invalidate such permission if you have separately received it.
-
- d) If the work has interactive user interfaces, each must display
- Appropriate Legal Notices; however, if the Program has interactive
- interfaces that do not display Appropriate Legal Notices, your
- work need not make them do so.
-
- A compilation of a covered work with other separate and independent
-works, which are not by their nature extensions of the covered work,
-and which are not combined with it such as to form a larger program,
-in or on a volume of a storage or distribution medium, is called an
-"aggregate" if the compilation and its resulting copyright are not
-used to limit the access or legal rights of the compilation's users
-beyond what the individual works permit. Inclusion of a covered work
-in an aggregate does not cause this License to apply to the other
-parts of the aggregate.
-
- 6. Conveying Non-Source Forms.
-
- You may convey a covered work in object code form under the terms
-of sections 4 and 5, provided that you also convey the
-machine-readable Corresponding Source under the terms of this License,
-in one of these ways:
-
- a) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by the
- Corresponding Source fixed on a durable physical medium
- customarily used for software interchange.
-
- b) Convey the object code in, or embodied in, a physical product
- (including a physical distribution medium), accompanied by a
- written offer, valid for at least three years and valid for as
- long as you offer spare parts or customer support for that product
- model, to give anyone who possesses the object code either (1) a
- copy of the Corresponding Source for all the software in the
- product that is covered by this License, on a durable physical
- medium customarily used for software interchange, for a price no
- more than your reasonable cost of physically performing this
- conveying of source, or (2) access to copy the
- Corresponding Source from a network server at no charge.
-
- c) Convey individual copies of the object code with a copy of the
- written offer to provide the Corresponding Source. This
- alternative is allowed only occasionally and noncommercially, and
- only if you received the object code with such an offer, in accord
- with subsection 6b.
-
- d) Convey the object code by offering access from a designated
- place (gratis or for a charge), and offer equivalent access to the
- Corresponding Source in the same way through the same place at no
- further charge. You need not require recipients to copy the
- Corresponding Source along with the object code. If the place to
- copy the object code is a network server, the Corresponding Source
- may be on a different server (operated by you or a third party)
- that supports equivalent copying facilities, provided you maintain
- clear directions next to the object code saying where to find the
- Corresponding Source. Regardless of what server hosts the
- Corresponding Source, you remain obligated to ensure that it is
- available for as long as needed to satisfy these requirements.
-
- e) Convey the object code using peer-to-peer transmission, provided
- you inform other peers where the object code and Corresponding
- Source of the work are being offered to the general public at no
- charge under subsection 6d.
-
- A separable portion of the object code, whose source code is excluded
-from the Corresponding Source as a System Library, need not be
-included in conveying the object code work.
-
- A "User Product" is either (1) a "consumer product", which means any
-tangible personal property which is normally used for personal, family,
-or household purposes, or (2) anything designed or sold for incorporation
-into a dwelling. In determining whether a product is a consumer product,
-doubtful cases shall be resolved in favor of coverage. For a particular
-product received by a particular user, "normally used" refers to a
-typical or common use of that class of product, regardless of the status
-of the particular user or of the way in which the particular user
-actually uses, or expects or is expected to use, the product. A product
-is a consumer product regardless of whether the product has substantial
-commercial, industrial or non-consumer uses, unless such uses represent
-the only significant mode of use of the product.
-
- "Installation Information" for a User Product means any methods,
-procedures, authorization keys, or other information required to install
-and execute modified versions of a covered work in that User Product from
-a modified version of its Corresponding Source. The information must
-suffice to ensure that the continued functioning of the modified object
-code is in no case prevented or interfered with solely because
-modification has been made.
-
- If you convey an object code work under this section in, or with, or
-specifically for use in, a User Product, and the conveying occurs as
-part of a transaction in which the right of possession and use of the
-User Product is transferred to the recipient in perpetuity or for a
-fixed term (regardless of how the transaction is characterized), the
-Corresponding Source conveyed under this section must be accompanied
-by the Installation Information. But this requirement does not apply
-if neither you nor any third party retains the ability to install
-modified object code on the User Product (for example, the work has
-been installed in ROM).
-
- The requirement to provide Installation Information does not include a
-requirement to continue to provide support service, warranty, or updates
-for a work that has been modified or installed by the recipient, or for
-the User Product in which it has been modified or installed. Access to a
-network may be denied when the modification itself materially and
-adversely affects the operation of the network or violates the rules and
-protocols for communication across the network.
-
- Corresponding Source conveyed, and Installation Information provided,
-in accord with this section must be in a format that is publicly
-documented (and with an implementation available to the public in
-source code form), and must require no special password or key for
-unpacking, reading or copying.
-
- 7. Additional Terms.
-
- "Additional permissions" are terms that supplement the terms of this
-License by making exceptions from one or more of its conditions.
-Additional permissions that are applicable to the entire Program shall
-be treated as though they were included in this License, to the extent
-that they are valid under applicable law. If additional permissions
-apply only to part of the Program, that part may be used separately
-under those permissions, but the entire Program remains governed by
-this License without regard to the additional permissions.
-
- When you convey a copy of a covered work, you may at your option
-remove any additional permissions from that copy, or from any part of
-it. (Additional permissions may be written to require their own
-removal in certain cases when you modify the work.) You may place
-additional permissions on material, added by you to a covered work,
-for which you have or can give appropriate copyright permission.
-
- Notwithstanding any other provision of this License, for material you
-add to a covered work, you may (if authorized by the copyright holders of
-that material) supplement the terms of this License with terms:
-
- a) Disclaiming warranty or limiting liability differently from the
- terms of sections 15 and 16 of this License; or
-
- b) Requiring preservation of specified reasonable legal notices or
- author attributions in that material or in the Appropriate Legal
- Notices displayed by works containing it; or
-
- c) Prohibiting misrepresentation of the origin of that material, or
- requiring that modified versions of such material be marked in
- reasonable ways as different from the original version; or
-
- d) Limiting the use for publicity purposes of names of licensors or
- authors of the material; or
-
- e) Declining to grant rights under trademark law for use of some
- trade names, trademarks, or service marks; or
-
- f) Requiring indemnification of licensors and authors of that
- material by anyone who conveys the material (or modified versions of
- it) with contractual assumptions of liability to the recipient, for
- any liability that these contractual assumptions directly impose on
- those licensors and authors.
-
- All other non-permissive additional terms are considered "further
-restrictions" within the meaning of section 10. If the Program as you
-received it, or any part of it, contains a notice stating that it is
-governed by this License along with a term that is a further
-restriction, you may remove that term. If a license document contains
-a further restriction but permits relicensing or conveying under this
-License, you may add to a covered work material governed by the terms
-of that license document, provided that the further restriction does
-not survive such relicensing or conveying.
-
- If you add terms to a covered work in accord with this section, you
-must place, in the relevant source files, a statement of the
-additional terms that apply to those files, or a notice indicating
-where to find the applicable terms.
-
- Additional terms, permissive or non-permissive, may be stated in the
-form of a separately written license, or stated as exceptions;
-the above requirements apply either way.
-
- 8. Termination.
-
- You may not propagate or modify a covered work except as expressly
-provided under this License. Any attempt otherwise to propagate or
-modify it is void, and will automatically terminate your rights under
-this License (including any patent licenses granted under the third
-paragraph of section 11).
-
- However, if you cease all violation of this License, then your
-license from a particular copyright holder is reinstated (a)
-provisionally, unless and until the copyright holder explicitly and
-finally terminates your license, and (b) permanently, if the copyright
-holder fails to notify you of the violation by some reasonable means
-prior to 60 days after the cessation.
-
- Moreover, your license from a particular copyright holder is
-reinstated permanently if the copyright holder notifies you of the
-violation by some reasonable means, this is the first time you have
-received notice of violation of this License (for any work) from that
-copyright holder, and you cure the violation prior to 30 days after
-your receipt of the notice.
-
- Termination of your rights under this section does not terminate the
-licenses of parties who have received copies or rights from you under
-this License. If your rights have been terminated and not permanently
-reinstated, you do not qualify to receive new licenses for the same
-material under section 10.
-
- 9. Acceptance Not Required for Having Copies.
-
- You are not required to accept this License in order to receive or
-run a copy of the Program. Ancillary propagation of a covered work
-occurring solely as a consequence of using peer-to-peer transmission
-to receive a copy likewise does not require acceptance. However,
-nothing other than this License grants you permission to propagate or
-modify any covered work. These actions infringe copyright if you do
-not accept this License. Therefore, by modifying or propagating a
-covered work, you indicate your acceptance of this License to do so.
-
- 10. Automatic Licensing of Downstream Recipients.
-
- Each time you convey a covered work, the recipient automatically
-receives a license from the original licensors, to run, modify and
-propagate that work, subject to this License. You are not responsible
-for enforcing compliance by third parties with this License.
-
- An "entity transaction" is a transaction transferring control of an
-organization, or substantially all assets of one, or subdividing an
-organization, or merging organizations. If propagation of a covered
-work results from an entity transaction, each party to that
-transaction who receives a copy of the work also receives whatever
-licenses to the work the party's predecessor in interest had or could
-give under the previous paragraph, plus a right to possession of the
-Corresponding Source of the work from the predecessor in interest, if
-the predecessor has it or can get it with reasonable efforts.
-
- You may not impose any further restrictions on the exercise of the
-rights granted or affirmed under this License. For example, you may
-not impose a license fee, royalty, or other charge for exercise of
-rights granted under this License, and you may not initiate litigation
-(including a cross-claim or counterclaim in a lawsuit) alleging that
-any patent claim is infringed by making, using, selling, offering for
-sale, or importing the Program or any portion of it.
-
- 11. Patents.
-
- A "contributor" is a copyright holder who authorizes use under this
-License of the Program or a work on which the Program is based. The
-work thus licensed is called the contributor's "contributor version".
-
- A contributor's "essential patent claims" are all patent claims
-owned or controlled by the contributor, whether already acquired or
-hereafter acquired, that would be infringed by some manner, permitted
-by this License, of making, using, or selling its contributor version,
-but do not include claims that would be infringed only as a
-consequence of further modification of the contributor version. For
-purposes of this definition, "control" includes the right to grant
-patent sublicenses in a manner consistent with the requirements of
-this License.
-
- Each contributor grants you a non-exclusive, worldwide, royalty-free
-patent license under the contributor's essential patent claims, to
-make, use, sell, offer for sale, import and otherwise run, modify and
-propagate the contents of its contributor version.
-
- In the following three paragraphs, a "patent license" is any express
-agreement or commitment, however denominated, not to enforce a patent
-(such as an express permission to practice a patent or covenant not to
-sue for patent infringement). To "grant" such a patent license to a
-party means to make such an agreement or commitment not to enforce a
-patent against the party.
-
- If you convey a covered work, knowingly relying on a patent license,
-and the Corresponding Source of the work is not available for anyone
-to copy, free of charge and under the terms of this License, through a
-publicly available network server or other readily accessible means,
-then you must either (1) cause the Corresponding Source to be so
-available, or (2) arrange to deprive yourself of the benefit of the
-patent license for this particular work, or (3) arrange, in a manner
-consistent with the requirements of this License, to extend the patent
-license to downstream recipients. "Knowingly relying" means you have
-actual knowledge that, but for the patent license, your conveying the
-covered work in a country, or your recipient's use of the covered work
-in a country, would infringe one or more identifiable patents in that
-country that you have reason to believe are valid.
-
- If, pursuant to or in connection with a single transaction or
-arrangement, you convey, or propagate by procuring conveyance of, a
-covered work, and grant a patent license to some of the parties
-receiving the covered work authorizing them to use, propagate, modify
-or convey a specific copy of the covered work, then the patent license
-you grant is automatically extended to all recipients of the covered
-work and works based on it.
-
- A patent license is "discriminatory" if it does not include within
-the scope of its coverage, prohibits the exercise of, or is
-conditioned on the non-exercise of one or more of the rights that are
-specifically granted under this License. You may not convey a covered
-work if you are a party to an arrangement with a third party that is
-in the business of distributing software, under which you make payment
-to the third party based on the extent of your activity of conveying
-the work, and under which the third party grants, to any of the
-parties who would receive the covered work from you, a discriminatory
-patent license (a) in connection with copies of the covered work
-conveyed by you (or copies made from those copies), or (b) primarily
-for and in connection with specific products or compilations that
-contain the covered work, unless you entered into that arrangement,
-or that patent license was granted, prior to 28 March 2007.
-
- Nothing in this License shall be construed as excluding or limiting
-any implied license or other defenses to infringement that may
-otherwise be available to you under applicable patent law.
-
- 12. No Surrender of Others' Freedom.
-
- If conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License. If you cannot convey a
-covered work so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you may
-not convey it at all. For example, if you agree to terms that obligate you
-to collect a royalty for further conveying from those to whom you convey
-the Program, the only way you could satisfy both those terms and this
-License would be to refrain entirely from conveying the Program.
-
- 13. Remote Network Interaction; Use with the GNU General Public License.
-
- Notwithstanding any other provision of this License, if you modify the
-Program, your modified version must prominently offer all users
-interacting with it remotely through a computer network (if your version
-supports such interaction) an opportunity to receive the Corresponding
-Source of your version by providing access to the Corresponding Source
-from a network server at no charge, through some standard or customary
-means of facilitating copying of software. This Corresponding Source
-shall include the Corresponding Source for any work covered by version 3
-of the GNU General Public License that is incorporated pursuant to the
-following paragraph.
-
- Notwithstanding any other provision of this License, you have
-permission to link or combine any covered work with a work licensed
-under version 3 of the GNU General Public License into a single
-combined work, and to convey the resulting work. The terms of this
-License will continue to apply to the part which is the covered work,
-but the work with which it is combined will remain governed by version
-3 of the GNU General Public License.
-
- 14. Revised Versions of this License.
-
- The Free Software Foundation may publish revised and/or new versions of
-the GNU Affero General Public License from time to time. Such new versions
-will be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
- Each version is given a distinguishing version number. If the
-Program specifies that a certain numbered version of the GNU Affero General
-Public License "or any later version" applies to it, you have the
-option of following the terms and conditions either of that numbered
-version or of any later version published by the Free Software
-Foundation. If the Program does not specify a version number of the
-GNU Affero General Public License, you may choose any version ever published
-by the Free Software Foundation.
-
- If the Program specifies that a proxy can decide which future
-versions of the GNU Affero General Public License can be used, that proxy's
-public statement of acceptance of a version permanently authorizes you
-to choose that version for the Program.
-
- Later license versions may give you additional or different
-permissions. However, no additional obligations are imposed on any
-author or copyright holder as a result of your choosing to follow a
-later version.
-
- 15. Disclaimer of Warranty.
-
- THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
-APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
-HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
-OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
-THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
-PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
-IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
-ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
-
- 16. Limitation of Liability.
-
- IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
-THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
-GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
-USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
-DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
-PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
-EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
-SUCH DAMAGES.
-
- 17. Interpretation of Sections 15 and 16.
-
- If the disclaimer of warranty and limitation of liability provided
-above cannot be given local legal effect according to their terms,
-reviewing courts shall apply local law that most closely approximates
-an absolute waiver of all civil liability in connection with the
-Program, unless a warranty or assumption of liability accompanies a
-copy of the Program in return for a fee.
-
- END OF TERMS AND CONDITIONS
-
- How to Apply These Terms to Your New Programs
-
- If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
- To do so, attach the following notices to the program. It is safest
-to attach them to the start of each source file to most effectively
-state the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-
- Copyright (C)
-
- This program is free software: you can redistribute it and/or modify
- it under the terms of the GNU Affero General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU Affero General Public License for more details.
-
- You should have received a copy of the GNU Affero General Public License
- along with this program. If not, see .
-
-Also add information on how to contact you by electronic and paper mail.
-
- If your software can interact with users remotely through a computer
-network, you should also make sure that it provides a way for users to
-get its source. For example, if your program is a web application, its
-interface could display a "Source" link that leads users to an archive
-of the code. There are many ways you could offer source, and different
-solutions will be better for different programs; see section 13 for the
-specific requirements.
-
- You should also get your employer (if you work as a programmer) or school,
-if any, to sign a "copyright disclaimer" for the program, if necessary.
-For more information on this, and how to apply and follow the GNU AGPL, see
- .
diff --git a/third-party-plugins/open_graph/Readme.rst b/third-party-plugins/open_graph/Readme.rst
deleted file mode 100644
index 9fcea66a..00000000
--- a/third-party-plugins/open_graph/Readme.rst
+++ /dev/null
@@ -1,46 +0,0 @@
-============
- Open Graph
-============
-
-This plugin adds Open Graph Protocol tags to your articles.
-
-
-Usage
-=====
-
-To output the tags generated by this plugin, simply add this code in
-your base.html template:
-
-.. code-block:: jinja2
-
-
- {% if article %}
- {% for tag in article.ogtags %}
-
- {% endfor %}
- {% endif %}
-
- {% if page %}
- {% for tag in page.ogtags %}
-
- {% endfor %}
- {% endif %}
-
-Metadata values are constructed from the SITENAME and SITEURL
-settings, from the article title, from the article slug, from the
-article category and from these standard metadata tags:
-
-- ``date``
-- ``modified``
-- ``tags``
-
-The plugin also reads these metadata tags:
-
-- ``og_image``, an URL to an image that will represent your article;
-- ``og_description``, a short description of your article. If not
- provided, the description will be set to ``summary``, which is often
- too long;
-- ``og_locale``, the locale of your article (e.g. 'fr_CA'). If not provided,
- the locale will be set to your Pelican settings ``LOCALE``.
-
-Additionally, the plugin reads article.related_posts to set ``og:see_also``.
diff --git a/third-party-plugins/open_graph/__init__.py b/third-party-plugins/open_graph/__init__.py
deleted file mode 100644
index 818c63b6..00000000
--- a/third-party-plugins/open_graph/__init__.py
+++ /dev/null
@@ -1,2 +0,0 @@
-"""open_graph initialize."""
-from .open_graph import * # noqa
diff --git a/third-party-plugins/open_graph/open_graph.py b/third-party-plugins/open_graph/open_graph.py
deleted file mode 100644
index 2d11c381..00000000
--- a/third-party-plugins/open_graph/open_graph.py
+++ /dev/null
@@ -1,125 +0,0 @@
-# -*- coding: utf-8 -*- #
-"""Open Graph.
-
-This plugin adds Open Graph Protocol tags to articles.
-
-Use like this in your base.html template:
-
-.. code-block:: jinja2
-
- {% if article %}
- {% for tag in article.ogtags %}
-
- {% endfor %}
- {% endif %}
-
- {% if page %}
- {% for tag in page.ogtags %}
-
- {% endfor %}
- {% endif %}
-
-"""
-from __future__ import unicode_literals
-
-import os.path
-
-from bs4 import BeautifulSoup
-from pelican import generators
-from pelican import signals
-from pelican.utils import strftime
-
-
-def open_graph_tag_articles(content_generators):
- """Get different Pelican objects."""
- for generator in content_generators:
- if isinstance(generator, generators.ArticlesGenerator):
- for article in (
- generator.articles +
- generator.translations +
- generator.drafts):
- open_graph_tag(article)
- elif isinstance(generator, generators.PagesGenerator):
- for page in generator.pages:
- open_graph_tag(page)
-
- return True
-
-
-def open_graph_tag(item): # pylint: disable=too-many-branches
- """Open Graph items."""
- ogtags = [('og:title', item.title),
- ('og:type', 'article')]
-
- image = item.metadata.get('og_image', '')
- if image:
- ogtags.append(('og:image', image))
- else:
- soup = BeautifulSoup(
- item.content,
- 'html.parser')
- img_links = soup.find_all('img')
- if img_links:
- img_src = img_links[0].get('src')
- if "http" not in img_src:
- if item.settings.get('SITEURL', ''):
- img_src = item.settings.get('SITEURL', '') + "/" + img_src
- ogtags.append(('og:image', img_src))
-
- url = os.path.join(
- item.settings.get(
- 'SITEURL',
- ''),
- item.url)
- ogtags.append(('og:url', url))
-
- default_summary = item.summary
- description = item.metadata.get('og_description', default_summary)
- ogtags.append(('og:description', description))
-
- default_locale = item.settings.get('LOCALE', [])
- if len(default_locale[0]) > 3:
- default_locale = default_locale[0]
- ogtags.append(
- ('og:locale', item.metadata.get('og_locale', default_locale)))
-
- ogtags.append(('og:site_name', item.settings.get('SITENAME', '')))
-
- if hasattr(item, 'date'):
- ogtags.append(('article:published_time',
- strftime(item.date, "%Y-%m-%d")))
-
- if hasattr(item, 'modified'):
- ogtags.append(('article:modified_time', strftime(
- item.modified, "%Y-%m-%d")))
-
- if hasattr(item, 'related_posts'):
- for related_post in item.related_posts:
- url = os.path.join(
- item.settings.get(
- 'SITEURL',
- ''),
- related_post.url)
- ogtags.append(('og:see_also', url))
-
- author_fb_profiles = item.settings.get('AUTHOR_FB_ID', {})
- if author_fb_profiles:
- for author in item.authors:
- if author.name in author_fb_profiles:
- ogtags.append(
- ('article:author', author_fb_profiles[author.name]))
-
- ogtags.append(('article:section', item.category.name))
-
- try:
- for tag in item.tags:
- ogtags.append(('article:tag', tag.name))
- except AttributeError:
- pass
-
- item.ogtags = ogtags
-
-
-def register():
- """Register pelican plugin."""
- signals.all_generators_finalized.connect(open_graph_tag_articles)
diff --git a/tidy.conf b/tidy.conf
index 1cb779ce..76d84c1e 100644
--- a/tidy.conf
+++ b/tidy.conf
@@ -1,42 +1,55 @@
#############
# HTML Tidy #
#############
-# Validate and fix HTML files:
+# [OVERVIEW] Validate and fix HTML files:
# http://www.html-tidy.org/
-# Description:
+# [INFO] Description:
# http://api.html-tidy.org/tidy/tidylib_api_next/index.html
-# Options:
+# [INFO] Binaries:
+# https://binaries.html-tidy.org/
+# [INFO] Options:
# http://api.html-tidy.org/tidy/quickref_next.html
-# Configuration file format:
+# [INFO] Configuration file format:
# http://api.html-tidy.org/tidy/tidylib_api_next/tidy_config.html
-# No official configuration filename, I use common:
+# [NOTE] No official configuration filename, I use common:
# https://github.com/search?utf8=%E2%9C%93&q=filename%3Atidy.conf&type=Code
-# [BUG] ASCII symbols must be in HTML Tidy configuration file:
+# [BUG] Solely ASCII symbols must be in HTML Tidy configuration file:
# https://github.com/htacg/tidy-html5/issues/737
-#
-# Doesn't print content of HTML files to console:
+
+
+# [INFO] Not convert tabs to spaces and not add additional spaces:
+# https://api.html-tidy.org/tidy/quickref_next.html#keep-tabs
+keep-tabs: yes
+
+# [WARNING] I disable it, because if "-modify" command line argument,
+# + "markup: no", files doesn't modified.
+# [INFO] Doesn't print content of HTML files to console:
# http://api.html-tidy.org/tidy/quickref_next.html#markup
-# [WARNING] Disable, because if "-modify" command line argument, files doesn't modified.
# For validating use "--markup no" command line argument.
# markup: no
-# Preserve &, that valid, but no default:
+
+# [INFO] Preserve &, that valid, but no default:
# http://api.html-tidy.org/tidy/quickref_next.html#preserve-entities
# https://github.com/htacg/tidy-html5/issues/732
preserve-entities: yes
-# Disable information about HTML Tidy in console:
+
+# [INFO] Disable information about HTML Tidy in console:
# http://api.html-tidy.org/tidy/quickref_next.html#quiet
quiet: yes
-# Remove meta name="generator":
+
+# [INFO] Remove extra meta name="generator", that adds to each HTML file by HTML Tidy:
# http://api.html-tidy.org/tidy/quickref_next.html#tidy-mark
-# Arguments:
+# [INFO] Argumentation:
# https://github.com/htacg/tidy-html5/issues/558#issuecomment-388899700
tidy-mark: no
-# Disable warnings, if proprietary attributes:
+
+# [INFO] Disable warnings, if proprietary attributes:
# http://api.html-tidy.org/tidy/quickref_next.html#warn-proprietary-attributes
-# I need delete this option in 5.8.0 HTML Tidy version:
+# [SOON] The problem fixed, I need delete this option in 5.8.0 HTML Tidy version:
# https://github.com/htacg/tidy-html5/issues/686
warn-proprietary-attributes: no
-# Disable line breaks:
+
+# [INFO] Disable line breaks:
# http://api.html-tidy.org/tidy/quickref_next.html#wrap
# https://github.com/gavinballard/grunt-htmltidy/issues/6
wrap: 0