Al-folio Theme

2 views
Skip to first unread message

Violette Taps

unread,
Aug 5, 2024, 12:41:52 AM8/5/24
to tricparcogi
Writeyour biography here. Tell the world about yourself. Link to your favorite subreddit. You can put a picture in, too. The code is already in, just name your picture prof_pic.jpg and put it in the img/ folder.

Put your address / P.O. box / other info right below your picture. You can also disable any of these elements by editing profile property of the YAML header of your _pages/about.md. Edit _bibliography/papers.bib and Jekyll will render your publications page automatically.


Link to your social media connections, too. This theme is set up to use Font Awesome icons and Academicons, like the ones below. Add your Facebook, Twitter, LinkedIn, Google Scholar, or just disable all of them.


In a complete theory there is an element corresponding to each element of reality. A sufficient condition for the reality of a physical quantity is the possibility of predicting it with certainty, without disturbing the system. In quantum mechanics in the case of two physical quantities described by non-commuting operators, the knowledge of one precludes the knowledge of the other. Then either (1) the description of reality given by the wave function in quantum mechanics is not complete or (2) these two quantities cannot have simultaneous reality. Consideration of the problem of making predictions concerning a system on the basis of measurements made on another system that had previously interacted with it leads to the result that if (1) is false then (2) is also false. One is thus led to conclude that the description of reality as given by a wave function is not complete.


Here I want to guide you toward setting a Jekyll website with al-folio template. This is the template I am using for my website and I love it. I have also made some contributions to make it more usable (specially on docker side).


Why 10 minutes?After performing all the required actions, the github-pages bot comes into play. Its primary function is to fetch the newly generated website and publish it to the web. However, in some cases, there might be a delay before your changes become visible to others.


You can check status of github-pages using Environments Section of your github repository. For example, here it says that 9ebc1c9 commit was deployed successfully by github pages. You can check this commit to the latest commit in gh-pages branch.You can also see from gh-pages branch that 9ebc1c9 is the last commit. It says that this was generated from 5d3f650 commit from master branch. This can become handy if you have problem and you do not know where is the source of the problem.


If you have problems, make sure that both of your Github Actions are successful. Make sure branch is set to gh-pages and also check your website url and baseurl. These are some most common problems people have in Jekyll websites.


Now, you have your website up and running. It is configured so that whenever you commit to a specific branch, your server (Github or Netlify or whatever) will go and build a fresh website for your use.


On the other hand, al-folio already implements all of these features well. Switching over to al-folio took a day of work and just involved messing with the config file and copying over the Markdown content, with some minor tweaks. I hardly tweaked the theme itself at all, and I have found only one minor bug so far.


As mentioned earlier, I also created PaperMod diff 6 to show modifications I made to the theme in a readable way. In short, to modify a file from the theme, you create a copy of the file and make edits in the copy, but this makes it hard to see what was modified. So, PaperMod diff shows diffs between the files.


The files in these directories override the files in themes/PaperMod/layouts/ and themes/PaperMod/assets/, respectively. If the path of a file in layouts/ exactly matches that of a file in themes/PaperMod/layouts/, then your site will use the file in layouts/ instead of the one in themes/PaperMod/layouts/. Same for assets/.


Note on line 5 that a partial head.html is inserted. A partial is an HTML snippet that can be inserted into a page. As we can see here, the partial head.html (which can be found under layouts/partials/head.html) is the code of all pages.


Notice this code goes in the "main" block from line 17 of baseof.html. You could inspect element a single page on my old PaperMod site to confirm. The code is quite intuitive, so you should be able to see how this code (in addition to front matter and site variables) causes certain elements to appear at the top of the page.


My build process involves slightly more than just hugo since I also have to build PaperMod_diff 6. So, I use scripts/netlify. My build command in Site settings > Build & deploy > Build command is chmod +x scripts/netlify;./scripts/netlify.


al-folio deployment is easier because it already includes a GH action for deploying to GH pages. You just need to name your repo your GH username.github.io and follow some other steps in the README.


I created PaperMod diff 6 using the scripts in scripts/. diff.py runs diff between corresponding files, helpers/generate_directory_index_caddystyle.py creates index.html files recursively, and build wraps diff.py to deploy its output to Netlify (see Deploy). helpers/cd.py is also used.


I modified the condition for loading the KaTeX script. The site param math must be true. Then KaTeX will be loaded by default in all pages. Setting the local param math to false in front matter will cause that page to not load KaTeX.


As you can see, there are comments at the bottom of almost every page. PaperMod automatically disables comments in the index profile, search, and archives layouts. I manually disabled comments in my Privacy policy page in the front matter with comments: false.


al-folio implements giscus (and Disqus, deprecated) by default. The only change needed is some configuration in config.yml. In addition, the comment box automatically toggles color when the theme is toggled.


In short, I modified CSS in 4 files. layouts/partials/footer.html, layouts/partials/social_icons.html, assets/css/core/theme-vars.css, and assets/css/common/profile-mode.css. The comments in each file describe the changes I made. Most comments in social_icons.html are for htmltest, described below, so ignore those for now.


I did check what happens with the Bootstrap ToC when there are enough headings to fill the screen by resizing my window. There is no scrollbar, and the ToC just overflows the screen and is cut off. However, realistically speaking, this should never occur, and even if it does, the top-level headings will still be shown.


See .github/workflows/ci.yml and its configuration file .github/.htmltest.yml. This follows resource 5, with some modifications. In particular, I want to note that I run my scripts/build in ci.yml instead of just hugo, as in the original file.


And the #center thing is how you can center an image in Markdown syntax in PaperMod. #center also gets appended to an image URL if you use align="center" in figure shortcode. But since this causes htmltest to freak out, I added this to .htmltest.yml:


if: always() will cause logging to occur even if Test HTML fails. continue-on-error: true does the same. However, continue-on-error: true would cause GH Actions to display a green checkmark when Test HTML fails, which is misleading.


I use obsidian for my own PKMS but for a school assignment I have to build my own website from a jekyll theme called al-folio. There are some pre-configured block quotes but they look terrible compared to the Obsidian Callouts.


While I have built my personal websites with Jekyll for years, I recently decided it was time for a visual overhaul. I was fortunate to stumble upon al-folio, a simple yet powerful theme designed for academics. The theme includes GitHub Actions workflows which enable automated building and deployment to GitHub Pages, but I was interested in deploying the site to Cloudflare Pages.


Cloudflare Pages includes a Git integration which allows for automated builds and deployments based upon specified branch triggers. Unfortunately, the Jekyll build environment available within the integration is not able to build the site. Why? It turns out that Jupyter is the culprit. al-folio uses Jupyter to convert ipynb snippits and notebooks into HTML, but the default Jekyll build environment does not include a Jupyter installation.


Instead of building the site on the Cloudflare platform, we can utilize, with a few modifications, the GitHub Actions workflows included with the al-folio template to build and deploy the site assets to Cloudflare.1


I want an open source solution or at least a solution were I have easy access to my data, if I ever decide to move to a different platform. In particular, I like to write my posts in either markdown, reSTor orgmode.


[ Hugo ][ ] is written in golang and while still relatively young, has a huge community build around it. One great thing about the project is that there is essentially a single static file that you can download, no dependencytracking, no building from source. It is also blazingly fast, in the couple of tests I ran it was reallyimpressive how fast it was. Because there is such a large community, there are a lot of great looking themes. However, I did not quite understand the ability to use plugins. It seems more that hugo uses pre or post processorswritten in other languages. If you suddenly have install e.g. node it somewhat removes the advantage of the single static binary. Also looking at themes and integration with publications and jupyter notebooks, it seemsone should choose Hugo Academic , which has all that functionality build in.However when I was reading some more, on how to adjust the academic theme to my liking, I stumbled acrossquite a few posts, discussing how difficult this is.


I initially wanted to use hugo, but because I was not a big fan of the default look of the academic theme and reading about the difficulties to adjust the theme I decided to look at some of the other alternatives. If you want a quick solution that comes withmost things out of the box, I think hugo is probably the best choice.

3a8082e126
Reply all
Reply to author
Forward
0 new messages