Compare commits
3 Commits
913c2f0e67
...
d02d329bbc
Author | SHA1 | Date |
---|---|---|
Collin J. Doering | d02d329bbc | |
Collin J. Doering | 6b1129aa1a | |
Collin J. Doering | 9171aa88ad |
73
TODO.org
73
TODO.org
|
@ -1,32 +1,71 @@
|
||||||
#+TITLE: blog-rekahsoft-ca TODO's
|
#+TITLE: blog-rekahsoft-ca TODO's
|
||||||
#+AUTHOR: Collin J. Doering
|
#+AUTHOR: Collin J. Doering
|
||||||
|
|
||||||
* DONE Remove the use of application cache now that most major browsers are pulling support
|
* Archive :ARCHIVE:
|
||||||
|
** DONE Remove the use of application cache now that most major browsers are pulling support
|
||||||
CLOSED: [2021-11-28 Sun 10:43]
|
CLOSED: [2021-11-28 Sun 10:43]
|
||||||
|
:PROPERTIES:
|
||||||
|
:ARCHIVE_TIME: 2021-12-18 Sat 20:36
|
||||||
|
:END:
|
||||||
- State "DONE" from "TODO" [2021-11-28 Sun 10:43]
|
- State "DONE" from "TODO" [2021-11-28 Sun 10:43]
|
||||||
|
** DONE Fix analytics (pywiki is no longer in use, find and use something else)
|
||||||
|
CLOSED: [2021-12-18 Sat 20:31]
|
||||||
|
:PROPERTIES:
|
||||||
|
:ARCHIVE_TIME: 2021-12-18 Sat 20:36
|
||||||
|
:END:
|
||||||
|
- Note taken on [2021-12-18 Sat 20:31] \\
|
||||||
|
Decided to use [[https://github.com/plausible/analytics][Plausible]], self hosted on my single use AWS ec2.
|
||||||
|
- State "DONE" from "TODO" [2021-12-18 Sat 20:31]
|
||||||
|
** DONE Fix rendering of mathjax
|
||||||
|
CLOSED: [2021-12-18 Sat 20:33]
|
||||||
|
:PROPERTIES:
|
||||||
|
:ARCHIVE_TIME: 2021-12-18 Sat 20:36
|
||||||
|
:END:
|
||||||
|
- State "DONE" from "TODO" [2021-12-18 Sat 20:33]
|
||||||
|
** DONE Setup automated deployment from ci
|
||||||
|
CLOSED: [2021-12-18 Sat 20:33]
|
||||||
|
:PROPERTIES:
|
||||||
|
:ARCHIVE_TIME: 2021-12-18 Sat 20:36
|
||||||
|
:END:
|
||||||
|
- State "DONE" from "TODO" [2021-12-18 Sat 20:33]
|
||||||
|
** CANCELED Use separate file for terraform backend
|
||||||
|
CLOSED: [2021-12-18 Sat 20:33]
|
||||||
|
:PROPERTIES:
|
||||||
|
:ARCHIVE_TIME: 2021-12-18 Sat 20:36
|
||||||
|
:END:
|
||||||
|
|
||||||
|
- State "CANCELED" from "TODO" [2021-12-18 Sat 20:33] \\
|
||||||
|
No need. Embedding the backend into main.tf is file for the time being
|
||||||
|
Used to be: +Add missing terraform backend files to repository+, however this was not true.
|
||||||
|
The backend is just embedded in [[./infra/main.tf][infra/main.tf]].
|
||||||
|
|
||||||
|
** DONE Build the site as a guix package output of ~blog-rekahsoft-ca~
|
||||||
|
CLOSED: [2021-12-18 Sat 20:34]
|
||||||
|
:PROPERTIES:
|
||||||
|
:ARCHIVE_TIME: 2021-12-18 Sat 20:36
|
||||||
|
:END:
|
||||||
|
- State "DONE" from "TODO" [2021-12-18 Sat 20:34]
|
||||||
|
|
||||||
|
* TODO [#A] Invalid page urls load as the home page
|
||||||
|
|
||||||
|
Eg. https://blog.rekahsoft.ca/this-is-not-a-valid-page.html will show the home page, and
|
||||||
|
retain this url. However, it should show a page not found page.
|
||||||
* TODO The image full screen features does not work on initial page loads and requires going to at least one other page :bug:
|
* TODO The image full screen features does not work on initial page loads and requires going to at least one other page :bug:
|
||||||
|
|
||||||
See:
|
See:
|
||||||
- [[file:js/default.js::// Add fullscreen functionality to inline-images and figures][Fullscreen image onclik functionality is added in the router upon content loading, which doesn't occur on the intial page load]]
|
- [[file:js/default.js::// Add fullscreen functionality to inline-images and figures][Fullscreen image onclik functionality is added in the router upon content loading, which doesn't occur on the intial page load]]
|
||||||
* TODO Completely replace all references to stack
|
* DOING Completely replace all references to stack
|
||||||
* TODO Fix analytics (pywiki is no longer in use, find and use something else)
|
- State "DOING" from "TODO" [2021-12-18 Sat 20:33]
|
||||||
* TODO Modernize javascript in [[file:js/default.js][js/default.js]]
|
* TODO Modernize javascript in [[file:js/default.js][js/default.js]]
|
||||||
* TODO Allow posts (and pages?) to be written in org-mode
|
* TODO Allow posts (and pages?) to be written in org-mode
|
||||||
|
|
||||||
See:
|
See:
|
||||||
- https://github.com/jaspervdj/hakyll/issues/700
|
- https://github.com/jaspervdj/hakyll/issues/700
|
||||||
- https://turbomack.github.io/posts/2016-12-21-org-mode-in-hakyll.html
|
- https://turbomack.github.io/posts/2016-12-21-org-mode-in-hakyll.html
|
||||||
* TODO Fix rendering of mathjax
|
|
||||||
* TODO Use javascript/css sources from guix packages instead of vendoring them or using them from the internet
|
* TODO Use javascript/css sources from guix packages instead of vendoring them or using them from the internet
|
||||||
- [ ] jQuery
|
- [ ] jQuery
|
||||||
- [ ] mathjax
|
- [ ] mathjax
|
||||||
- [ ] skeleton
|
- [ ] skeleton
|
||||||
* TODO Setup automated deployment from ci
|
|
||||||
* TODO Use separate file for terraform backend
|
|
||||||
|
|
||||||
Used to be: +Add missing terraform backend files to repository+, however this was not true.
|
|
||||||
The backend is just embedded in [[./infra/main.tf][infra/main.tf]].
|
|
||||||
|
|
||||||
* TODO Figure out fast workflow for modifying haskell sources without rebuilding guix package
|
* TODO Figure out fast workflow for modifying haskell sources without rebuilding guix package
|
||||||
*** TODO [[./clay][clay sources]]
|
*** TODO [[./clay][clay sources]]
|
||||||
*** TODO [[./src][hakell sources]]
|
*** TODO [[./src][hakell sources]]
|
||||||
|
@ -34,8 +73,14 @@ The backend is just embedded in [[./infra/main.tf][infra/main.tf]].
|
||||||
|
|
||||||
See: http://blog.tpleyer.de/posts/2019-04-21-external-code-inclusion-with-hakyll.html
|
See: http://blog.tpleyer.de/posts/2019-04-21-external-code-inclusion-with-hakyll.html
|
||||||
* TODO Ensure [[./blog-rekahsoft-ca.cabal][blog-rekahsoft-ca.cabal]] is usable with cabal and has the correct dependencies
|
* TODO Ensure [[./blog-rekahsoft-ca.cabal][blog-rekahsoft-ca.cabal]] is usable with cabal and has the correct dependencies
|
||||||
* TODO Build the site as a guix package output of ~blog-rekahsoft-ca~
|
* TODO Add a way to submit commits on articles
|
||||||
* TODO Invalid page urls load as the home page
|
|
||||||
|
|
||||||
Eg. https://blog.rekahsoft.ca/this-is-not-a-valid-page.html will show the home page, and
|
See:
|
||||||
retain this url. However, it should show a page not found page.
|
- https://posativ.org/isso/
|
||||||
|
- https://remark42.com/
|
||||||
|
- Another option is to use the fediverse as a source of comments:
|
||||||
|
https://news.ycombinator.com/item?id=25570268
|
||||||
|
|
||||||
|
* TODO Proxy analytics traffic through same domain to avoid adblockers
|
||||||
|
|
||||||
|
See: https://plausible.io/docs/proxy/introduction
|
||||||
|
|
|
@ -27,9 +27,6 @@
|
||||||
/*global jQuery, MathJax*/
|
/*global jQuery, MathJax*/
|
||||||
//------------------------
|
//------------------------
|
||||||
|
|
||||||
// Global array for processing piwik analytics commands
|
|
||||||
var _paq = _paq || [];
|
|
||||||
|
|
||||||
(function ($, mj) {
|
(function ($, mj) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
|
@ -196,49 +193,6 @@ var _paq = _paq || [];
|
||||||
return spec;
|
return spec;
|
||||||
}()),
|
}()),
|
||||||
|
|
||||||
analytics = (function () {
|
|
||||||
var inited = false,
|
|
||||||
spec = {
|
|
||||||
trackPageView: trackPageView,
|
|
||||||
debugEnable: function () {
|
|
||||||
init();
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function trackPageView (href) {
|
|
||||||
if (inited) {
|
|
||||||
_paq.push(["setDocumentTitle", document.domain + href]);
|
|
||||||
_paq.push(["trackPageView"]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function init() {
|
|
||||||
if (!inited) {
|
|
||||||
_paq.push(["setDoNotTrack", true]);
|
|
||||||
_paq.push(["enableLinkTracking"]);
|
|
||||||
_paq.push(["setTrackerUrl", "//analytics.rekahsoft.ca/piwik.php"]);
|
|
||||||
_paq.push(["setSiteId", 1]);
|
|
||||||
|
|
||||||
inited = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initialize piwik.js when site is initially loaded
|
|
||||||
router.onInit(function () {
|
|
||||||
if (document.domain != "localhost") {
|
|
||||||
init();
|
|
||||||
trackPageView('/');
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// Track page views with piwik each time the url changes
|
|
||||||
router.onChange(function (url, dta) {
|
|
||||||
trackPageView(url);
|
|
||||||
});
|
|
||||||
|
|
||||||
return spec
|
|
||||||
}()),
|
|
||||||
|
|
||||||
site = (function () {
|
site = (function () {
|
||||||
var status = (function () {
|
var status = (function () {
|
||||||
var messages = [],
|
var messages = [],
|
||||||
|
|
13
src/site.hs
13
src/site.hs
|
@ -151,9 +151,7 @@ main = hakyllWith myConfig $ do
|
||||||
paginateContext paginatedTaggedPosts pageNum <>
|
paginateContext paginatedTaggedPosts pageNum <>
|
||||||
constField "tag" tag <>
|
constField "tag" tag <>
|
||||||
listField "posts" (taggedPostCtx tags) (return posts)
|
listField "posts" (taggedPostCtx tags) (return posts)
|
||||||
indexCtx = if pageNum <= 2
|
indexCtx = navCtx
|
||||||
then appCacheCtx <> navCtx
|
|
||||||
else navCtx
|
|
||||||
|
|
||||||
makeItem ""
|
makeItem ""
|
||||||
>>= loadAndApplyTemplate "templates/tag-page.html" ctx
|
>>= loadAndApplyTemplate "templates/tag-page.html" ctx
|
||||||
|
@ -186,9 +184,7 @@ main = hakyllWith myConfig $ do
|
||||||
let ctx = taggedPostCtx tags <>
|
let ctx = taggedPostCtx tags <>
|
||||||
paginateContext paginatedPosts pageNum <>
|
paginateContext paginatedPosts pageNum <>
|
||||||
listField "posts" (taggedPostCtx tags) (return posts)
|
listField "posts" (taggedPostCtx tags) (return posts)
|
||||||
indexCtx = if pageNum <= 2
|
indexCtx = navCtx
|
||||||
then appCacheCtx <> navCtx
|
|
||||||
else navCtx
|
|
||||||
|
|
||||||
makeItem ""
|
makeItem ""
|
||||||
>>= loadAndApplyTemplate "templates/pages/blog.html" ctx
|
>>= loadAndApplyTemplate "templates/pages/blog.html" ctx
|
||||||
|
@ -215,7 +211,7 @@ main = hakyllWith myConfig $ do
|
||||||
listField "posts" (taggedPostCtx tags) (return posts) <>
|
listField "posts" (taggedPostCtx tags) (return posts) <>
|
||||||
tagCloudField "tagCloud" 65 135 tags <>
|
tagCloudField "tagCloud" 65 135 tags <>
|
||||||
defaultContext
|
defaultContext
|
||||||
indexCtx = navCtx <> appCacheCtx
|
indexCtx = navCtx
|
||||||
|
|
||||||
sectionCtx <- getResourceBody >>= genSectionContext
|
sectionCtx <- getResourceBody >>= genSectionContext
|
||||||
pg <- loadSnapshot (fromFilePath pageTemplate) "original"
|
pg <- loadSnapshot (fromFilePath pageTemplate) "original"
|
||||||
|
@ -286,9 +282,6 @@ postCtx = dateField "date" "%B %e, %Y" <>
|
||||||
taggedPostCtx :: Tags -> Context String
|
taggedPostCtx :: Tags -> Context String
|
||||||
taggedPostCtx tags = tagsField "tags" tags <> postCtx
|
taggedPostCtx tags = tagsField "tags" tags <> postCtx
|
||||||
|
|
||||||
appCacheCtx :: Context String
|
|
||||||
appCacheCtx = constField "appcache" "true"
|
|
||||||
|
|
||||||
pageWeight :: (Functor f, MonadMetadata f) => Item a -> f Int
|
pageWeight :: (Functor f, MonadMetadata f) => Item a -> f Int
|
||||||
pageWeight i = fmap (maybe 0 read) $ getMetadataField (itemIdentifier i) "weight"
|
pageWeight i = fmap (maybe 0 read) $ getMetadataField (itemIdentifier i) "weight"
|
||||||
|
|
||||||
|
|
|
@ -24,9 +24,7 @@
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<!-- Piwik -->
|
$partial("templates/partials/analytics.html")$
|
||||||
<script type="text/javascript" async defer src="//analytics.rekahsoft.ca/piwik.js"></script>
|
|
||||||
<noscript><img src="//analytics.rekahsoft.ca/piwik.php?idsite=1" style="border:0;display:none;" alt="" /></noscript>
|
|
||||||
|
|
||||||
$partial("templates/partials/logo-banner.html")$
|
$partial("templates/partials/logo-banner.html")$
|
||||||
$partial("templates/partials/nav.html")$
|
$partial("templates/partials/nav.html")$
|
||||||
|
|
|
@ -0,0 +1,21 @@
|
||||||
|
<script>
|
||||||
|
var ref = document.createElement("script");
|
||||||
|
ref.setAttribute("type", "text/javascript");
|
||||||
|
|
||||||
|
var script = "https://analytics.rekahsoft.ca/js/plausible.js";
|
||||||
|
|
||||||
|
switch (window.location.hostname) {
|
||||||
|
case "www.blog.rekahsoft.ca":
|
||||||
|
ref.setAttribute("data-domain", "blog.rekahsoft.ca");
|
||||||
|
break;
|
||||||
|
case "www.blog.staging.rekahsoft.ca":
|
||||||
|
ref.setAttribute("data-domain", "blog.staging.rekahsoft.ca");
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
script = "https://analytics.rekahsoft.ca/js/plausible.exclusions.local.js";
|
||||||
|
ref.setAttribute("data-domain", "localhost:3000");
|
||||||
|
ref.setAttribute("data-exclude", "localhost:3000");
|
||||||
|
}
|
||||||
|
ref.setAttribute("src", script);
|
||||||
|
document.getElementsByTagName("head")[0].appendChild(ref)
|
||||||
|
</script>
|
Loading…
Reference in New Issue