Skip to content

Commit

Permalink
feat: added vscode settings + edited layout to include date + small t…
Browse files Browse the repository at this point in the history
…ext tweaks
  • Loading branch information
danieltomasz committed Aug 5, 2023
1 parent b1abffa commit 1388274
Show file tree
Hide file tree
Showing 11 changed files with 151 additions and 52 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@ name: Deploy Hugo site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- main
branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
.DS_Store

/.quarto/
.vscode/
*.DS_Store/
.luarc.json
.hugo_build.lock
hugo_build.lock
3 changes: 3 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"defaultTheme": "lines"
}
3 changes: 3 additions & 0 deletions .vscode/ltex.dictionary.en-GB.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
MISMaP
metascience
Borek
3 changes: 3 additions & 0 deletions .vscode/ltex.hiddenFalsePositives.en-GB.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{"rule":"PASSIVE_VOICE","sentence":"^\\Qbut I the line numbers section were two lines short than the code section (the code section was customized by the theme \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q).\\E$"}
{"rule":"PASSIVE_VOICE","sentence":"^\\Qbut the line numbers section were two lines short than the code section (the code section was customized by the theme \\E(?:Dummy|Ina|Jimmy-)[0-9]+\\Q).\\E$"}
{"rule":"OXFORD_SPELLING_Z_NOT_S","sentence":"^\\QBefore starting PhD, I worked as a data analyst in the area of health policy, doing data analysis, data visualisation and report automation in R. I am passionate about health data and using data visualisation to provide new insights.\\E$"}
12 changes: 12 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"files.exclude": {
"**/.git": true,
"**/.svn": true,
"**/.hg": true,
"**/CVS": true,
"**/.DS_Store": true,
"**/Thumbs.db": true,
".git": true
},
"explorerExclude.backup": {}
}
53 changes: 29 additions & 24 deletions config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,36 @@ languageCode = "en-us"
title = "Daniel Borek personal blog"
theme = 'lines'

[Author]
name = "Daniel Borek"

[params]
description = "A personal musings and learning by Daniel Borek"
author = "Daniel Borek"
copyright = ""
logo = ""
orgName = "Daniel Borek"
orgLocal = ""

[frontmatter]
date = [":filename", ":default", "lastmod"]
author = "Daniel Borek"
github = "danieltomasz"
facebook = ""
og_image = ""
sitename = ""
twitter = "danieltomasz"
lastmod = ["lastmod", ":git", "date", "publishDate"]



#disableKinds = ["section", "categories"]
disqusShortname = ""
pygmentsStyle = "pygments"
pygmentsCodefences = true
pygmentsuseclasses = false

enableGitInfo = true


#pygmentsUseClasses = true
Expand Down Expand Up @@ -47,25 +70,7 @@ ignoreFiles = [ "\\.qmd$", "\\.ipynb$", "\\.py$" ]
[privacy.youtube]
disable = true

[Author]
name = ""

[params]
description = "A personal musings and learning by Daniel Borek"
author = "Daniel Borek"
copyright = ""
logo = ""
orgName = "Daniel Borek"
orgLocal = ""

[frontmatter]
date = [":filename", ":default"]
author = "Daniel Borek"
github = "danieltomasz"
facebook = ""
og_image = ""
sitename = ""
twitter = "danieltomasz"

[permalinks]
posts = "/:year/:month/:day/:filename"
Expand Down Expand Up @@ -99,13 +104,13 @@ ignoreFiles = [ "\\.qmd$", "\\.ipynb$", "\\.py$" ]
identifier = "about"
name = "About"
url = "/about/"
weight = -20
weight = -200

# [[menu.main]]
# identifier = "rss"
# name = "RSS"
# url = "/atom.xml"
# weight = -10
[[menu.main]]
identifier = "rss"
name = "RSS"
url = "/atom.xml"
weight = -10


[[params.social]]
Expand Down
20 changes: 15 additions & 5 deletions content/pages/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,24 @@ title: About
---
## Daniel Borek

I’m a PhD candidate at Ghent University learning more about the nature of neural oscillations.

I studied physics within a MISMaP interdisciplinary programme and philosophy at University of Warsaw.
I came to Belgium to work at Ghent University in a project about spectral parametrization of neural oscillations.

Currently, I am based in Brussels, Belgium.

You can find me on [Twitter](https://twitter.com/danielborek), [GitHub](https://github.com/danieltomasz), and [Mastodon](https://scholar.social/@dborek)

### An academic and data scientist

#### An academic and data scientist
In my projects, I'm constantly switching between Python and R.
I interested in neurophysiology, computational cognitive science, metascience (research on research, especially reproducibility and open science) and philosophy of science.

Before starting PhD, I worked as a data analyst in the area of health policy, doing data analysis, data visualisation and report automation in R.

I did traineeship at the European Commission, DG Research and Innovation, where I contributed to monitoring of digital and data-sharing aspects of some EU-funded projects on health research.

I am passionate about health data and using data visualisation to provide new insights.

Currently, I am based in Brussels, Belgium.
I ❤️ cinema.
### Hobbies

I ❤️ cinema.
54 changes: 42 additions & 12 deletions content/posts/back to hugo.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,24 +9,13 @@ tags:
- Hugo
---

I am using the Hugo lines theme, you can find it [here](https://github.com/ronv/lines).

## Hugo and Github pages

There is nice tutorial here: https://gohugo.io/hosting-and-deployment/hosting-on-github/.
But my workflow was failing.
I add the theme as submodule, but I noticed that somehow `.gitmodules` file was not added to the repository.
Because of that, I had to add it manually:

```toml
[submodule "themes/lines"]
path = themes/lines
url = https://github.com/ronv/lines.git
```

## Hugo, Quarto and my history of using static site generators.

Long ago I was experimenting with Jekyll (you can see one of the pages I created [here](https://brainhackwarsaw2017.github.io/)), then Hugo and a year ago I switched to Quarto.
Long ago I was experimenting with Jekyll (you can see one of the pages I created [here](https://brainhackwarsaw2017.github.io/)), then I was trying Hugo and a year ago I switched to Quarto.
Quarto is great for scientific publications, but I find it too limiting for a blog.

The structure of the blog require you to put every of your posts into its own folder with `index.qmd` file.
Expand Down Expand Up @@ -86,3 +75,44 @@ As per wikipedia entry[^1]:
I am stillclose to original meaning, even when I misspell it (_quatro_ means _four_ in Portuguese and Italian).

[^1]: [Quarto - Wikipedia](https://en.wikipedia.org/wiki/Quarto)

## Customizing the theme

I am using the Hugo lines theme, you can find it [here](https://github.com/ronv/lines).
I however needed to do some customization to make it work for me.

### Hugo and GitHub pages

There is nice tutorial here: https://gohugo.io/hosting-and-deployment/hosting-on-github/.
But my workflow was failing.
I added the theme as submodule, but I noticed that somehow `.gitmodules` file isn't in the repository.
Because of that, I had to add it manually to my `.gitmodules` file.
Then I noticed that because of the theme is shipping with example content, it is adding a lot of _lorem ipsum_ posts to published version.
I forked the theme and removed the example content. The finale version of my `.gitmodules` file looks like this:

```toml
[submodule "themes/lines"]
path = "themes/lines"
url = "https://github.com/danieltomasz/lines.git"
```

### Hugo and code highlighting

To get code highlighting in backticks markdown fences I enabled:

```toml
pygmentsStyle = "pygments"
pygmentsCodefences = true
```

I was trying to get code numbering and a separate code that is easy to copy.
I try this setting within the markup section,

```toml
[markup.highlight]
linenos = true
lineNumbersInTable = true
```

but the line numbers section were two lines short than the code section (the code section was customized by the theme `scss`).
I will try to fix it later.
18 changes: 11 additions & 7 deletions content/posts/pdf-quarto-tips.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,20 @@ title: "PDF tweaks and tips with Quarto"
description: "Some tips and tricks for writing thesis with Quarto"
date: "2023-08-04"
draft: false
format: hugo-md
lastmod: "2023-08-04"
tags:
- Quatro
- Latex
---

## Nicer fonts and better handling of figures
_Disclaimer: This is work in progress, I will be updating this post as I standardize and create a separate template/extension repository._

I am sharing with you a fragment of my `_quarto.yml` file, with some tweaks I am using to make my pdf output nicer.
I wrote my master thesis in LaTeX, but given that markdown is a bit nicer to write, so I decided to switch with my PhD thesis to Markdown.
I was trying with Pandoc but last year I switched to Quarto, as it is more flexible, and it is easier to customize.

## Nicer fonts and better handling of figures

I am sharing with you a fragment of my `_quarto.yml` file, with some tweaks I am using to make my PDF output nicer.

```yaml
format:
Expand Down Expand Up @@ -52,14 +57,13 @@ I put number as comments, so you can better understand specific lines.
3. Forcing figures to be placed where they are in the text
4. Allowing to use figures from different folders, and allowing to use relative paths to figures.
Those are setting I am using to render a working preview of a chapter.
<!-- The final version will be using a font provided by my university: -->
<!--Those are setting I am using to render a working preview of a chapter.
The final version will be using a font provided by my university: -->
## Roman numbering for front matter and arabic for main matter
I am inserting roman numbering for front matter and arabic for main matter.
I am inserting roman numbering for front matter and arabic for main matter.
```
```yaml
format:
pdf:
Expand Down
32 changes: 32 additions & 0 deletions layouts/_default/single.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<!doctype html>
<html lang="en">
{{ partial "head.html" . }}
<body>
<main>
{{ partial "header.html" . }}
<section>

{{ if eq .Type "posts" }}
<h2 itemprop="name headline">{{ .Title }}</h2>
{{ $lastmod := .Lastmod.Format "02.01.2006" }}

<p class="meta">

<time itemprop="datePublished" datetime="{{ dateFormat "2006-01-02" .Date }}">{{ dateFormat " January 02, 2006" .Date }}</time> &bull;
{{ partial "tags.html" .}}
<br> Edited on: {{ $lastmod }}
</p>


{{ end }}

<span itemprop="articleBody">
{{ .Content }}
</span>


</section>
{{ partial "footer.html" . }}
</main>
</body>
</html>

0 comments on commit 1388274

Please sign in to comment.