From dbd160794d3f3402e58fb3d487a6301663fb6c26 Mon Sep 17 00:00:00 2001 From: Chris Hodapp Date: Fri, 10 Apr 2020 13:35:54 -0400 Subject: [PATCH] Tried to enable optional TOC --- hugo_blag/config.toml | 13 +++++++++ .../2018-04-08-recommender-systems-1/index.md | 27 +------------------ hugo_blag/layouts/_default/single.html | 16 +++++++++++ 3 files changed, 30 insertions(+), 26 deletions(-) create mode 100644 hugo_blag/layouts/_default/single.html diff --git a/hugo_blag/config.toml b/hugo_blag/config.toml index baa5444..2a9eddf 100644 --- a/hugo_blag/config.toml +++ b/hugo_blag/config.toml @@ -12,6 +12,15 @@ theme = "hugo-notepadium" #PygmentsCodeFences = true #PygmentsStyle = "monokai" +#staticDir = "static" + +# This won't work until I'm using Goldmark instead of Blackfriday. +# See https://gohugo.io/getting-started/configuration-markup/#table-of-contents +[markup] + [markup.tableOfContents] + startLevel = 1 + endLevel = 2 + [params.math] enable = true # optional: true, false. Enable globally, default: # false. You can always enable math on per page. @@ -53,6 +62,10 @@ url = "/posts" title = "About" url = "/about" +[[params.nav.custom]] +title = "Links" +url = "/links" + [[params.nav.custom]] title = "Old Crap" url = "/old_crap" diff --git a/hugo_blag/content/posts/2018-04-08-recommender-systems-1/index.md b/hugo_blag/content/posts/2018-04-08-recommender-systems-1/index.md index cf4c8c4..b5cb42a 100644 --- a/hugo_blag/content/posts/2018-04-08-recommender-systems-1/index.md +++ b/hugo_blag/content/posts/2018-04-08-recommender-systems-1/index.md @@ -7,37 +7,12 @@ tags: - technobabble - notebook - literate +toc: true --- This is an exported version of the Jupyter notebook available at my GitHub: -# Table of Contents - -- [1. Introduction](#introduction) - - [1.1. Motivation](#motivation) - - [1.2. Organization](#organization) -- [2. Dependencies & Setup](#dependencies-setup) -- [3. Loading data](#loading-data) - - [3.1. Aggregation](#aggregation) -- [4. Utility Matrix](#utility-matrix) -- [5. Slope One Predictors](#slope-one-predictors) - - [5.1. Weighted Slope One](#weighted-slope-one) - - [5.2. Linear Algebra Tricks](#linear-algebra-tricks) - - [5.3. Implementation](#implementation) -- [6. "SVD" algorithm](#svd-algorithm) - - [6.1. Model & Background](#model-background) - - [6.2. Motivation](#motivation) - - [6.3. Prediction & Error Function](#prediction-error-function) - - [6.4. Gradients & Gradient Descent Updates](#gradients-gradient-descent-updates) - - [6.5. Implementation](#implementation-1) - - [6.6. Running & Testing](#running-testing) - - [6.7. Visualization of Latent Space](#visualization-of-latent-space) - - [6.8. Bias](#bias) -- [7. Implementations in scikit-surprise](#implementations-in-scikit-surprise) -- [8. Overall results](#overall-results) -- [9. Further Work](#further-work) - # 1. Introduction The aim of this notebook is to briefly explain *recommender systems*, show some specific examples of them, and to demonstrate simple implementations of them in Python/NumPy/Pandas. diff --git a/hugo_blag/layouts/_default/single.html b/hugo_blag/layouts/_default/single.html new file mode 100644 index 0000000..44bee07 --- /dev/null +++ b/hugo_blag/layouts/_default/single.html @@ -0,0 +1,16 @@ +{{- define "main" -}} +{{- partial "article-header.html" . -}} +{{- $justify := false -}} +{{- if eq .Params.justify true -}} {{- $justify = true -}} {{- end -}} +
+ {{ if .Params.toc }} + {{ .TableOfContents }} + {{ end }} + {{- .Content -}} +
+{{- partial "article-labels.html" . -}} +{{- partial "article-license.html" . -}} +{{- partial "article-author.html" . -}} +{{- partial "article-bottom-navigation.html" . -}} +{{- partial "article-comments.html" . -}} +{{- end -}}