ratanshreshtha / deepthought Goto Github PK
View Code? Open in Web Editor NEWA simple blog theme focused on writing powered by Bulma and Zola.
Home Page: https://deepthought-theme.netlify.app/
License: MIT License
A simple blog theme focused on writing powered by Bulma and Zola.
Home Page: https://deepthought-theme.netlify.app/
License: MIT License
Hey @RatanShreshtha, thank you for your great work here. I really appreciate it and it's a while that I am using it in my blog! However, today I pulled the last changes of this theme, where I noticed the footer block is not where it was before! It removed in this commit.
Fix 404 page
@@ -173,7 +165,6 @@
{% block comment %}
{% endblock %}
- {% block footbar %}
<footer class="footer py-4">
<div class="content has-text-centered">
<p>
@@ -203,7 +194,6 @@
Is it intended or a mistake?
Hello! Like I'm saying, I'm new to Zola and I really liked this theme and wanted to make my blog with it. Thank you for your amazing work!!!
I'm trying to get started, I have read the zola overview till the point to get started with my new project and then the installing theme section to install the theme just like you said. I also added a variable to the config.toml
file to set the theme to DeepThought. Now I'm going to tell you exactly the steps I followed and the results I had so you can help me.
PROBLEM ONE
After installing the theme, I added the following variable in my config.toml
file: theme = "DeepThought"
just like you are saying in the README.md
. After that I'm getting the following error message:
Error: Failed to render section '/home/rempas/Projects/Programming/Web/myblog/content/_index.md'
Reason: Failed to render 'index.html' (error happened in a parent template)
Reason: Variable `config.extra.navbar_items` not found in context while rendering 'index.html'
To fix that, I tried to copy the config.toml
which is inside the theme to my project root directory. Additionally I added the variable to change the theme and now it works. The thing is. Is this suppose to be the case? Should I get the theme config? I'm asking because you don't said that in the README.md
neither it is mentioned in the zola docs
PROBLEM TWO
The content is not showing up. While the templates
and static
directories didn't had to get copied to my root project directory to make them work, the content does not show up. I suppose this how Zola treats that posts. So is it safe to delete the content
directory from the root directory of the DeepThought
theme and just add posts in mine?
PROBLEM THREE
The search doesn't work. Do you have any idea why this is happening? I suppose it's probably a js thing but I have no idea...
Hi!
First of all, thanks a lot for this great template @RatanShreshtha !
I am using your template and I am really happy with it!
I would like to contribute to your repo a modification I have done which:
Will provide the PR soon.
I hope you like it so we make it default for everyone too!
Best,
When I try to
zola serve
I get output as
Building site...
-> Creating 2 pages (0 orphan), 1 sections, and processing 0 images
Error: Failed to render '404.html'
Reason: Macro namespacemacros
was not found in template404.html
. Have you maybe forgotten to import it, or misspelled it?
Can you kindly help me out @RatanShreshtha ? :)
See:
DeepThought/templates/page.html
Lines 125 to 132 in 565b742
Does there miss a </div>
?
If so, I would like to submit a pr to fix this.
Following the instructions does not yield a working site.
mkdir zolatest
cd zolatest
zola init
# Complete init
cd themes
git clone [email protected]:RatanShreshtha/DeepThought.git
cd ..
vim config.toml
# Add theme = "DeepThought" near the top
zola serve
yields
Building site...
-> Creating 0 pages (0 orphan), 0 sections, and processing 0 images
Error: Failed to render section '/Users/$user/repos/zolatest/content/_index.md'
Reason: Failed to render 'index.html' (error happened in 'base.html').
Reason: Variable `config.extra.favicon.webmanifest` not found in context while rendering 'index.html'
Footnotes within Zola will render like the following:
This seems to be a flaw in the markdown engine that Zola uses and It's been addressed here, a workaround in CSS to fix the formatting at least would be nice.
Steps to Reproduce:
content/docs/extended-shortcodes/index.md
copy paste the galleria shortcode so that there are more than 1 instances of the galleria galleryExpected Results:
Returns: Fatal error: Could not extract a stage height from the CSS. Traced height: 0px.
Attempts to fix:
Copy pasted the issue into Google this seems to occur with Galleria, but I none of the solutions worked for me. Tried setting height of the galleria-stage
class, as well as the majority of the solutions proposed here: https://stackoverflow.com/questions/6610522/galleria-fatal-error-could-not-extract-a-stage-height-from-the-css-traced-heig.
After activating the dark mode and clicking on any link inside the website the light theme quickly flickers before the page is set to the dark theme again.
An example would be when clicking on the on the posts page from the home page.
Affected browsers:
Firefox 94.0 (64-bit) on Ubuntu 20.04.3 LTS
Chrome Version 95.0.4638.69 (Official Build) (64-bit) on Ubuntu 20.04.3 LTS
iOS 14.8.1
According to StackOverflow this solution is to have a blocking change of theme before the page loads: https://stackoverflow.com/a/63033934
But it seams the theme is changed after the page is ready, hence the flicker:
Lines 171 to 176 in 3596d4c
Hi, thanks for your work on this great looking zola theme!
When I was setting up my blog without an avatar, I noticed that in the index.html
template it is not required.
https://github.com/RatanShreshtha/DeepThought/blob/master/templates/index.html#L7-L11
But for the 404.html
template it is required, and this breaks the static site build.
https://github.com/RatanShreshtha/DeepThought/blob/master/templates/404.html#L8-L10
Should we surround the 404 avatar image with a
{% if config.extra.author.avatar %}
...
{% endif %}
block?
Is it possible to have a sublink under the navigation bar? For example., clicking on Posts, shows a sub link?
Could we add a "Edit this Page in GitHub" link automatically to all .md files so that when clicked, the user is routed to the GitHub master branch or main branch source?
Hey! my build failed because of the following error:
$ zola --version
zola 0.17.1
$ zola build
Building site...
Checking all internal links with anchors.
> Successfully checked 0 internal link(s) with anchors.
-> Creating 15 pages (0 orphan) and 1 sections
Error: Failed to build the site
Error: Error: Expected newline.
โท
4 โ @import url('[https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'](https://fonts.googleapis.com/css2?family=Jost:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap%27));
โ ^
โต
.//builds/hadilq/hadilq.gitlab.io/themes/DeepThought/sass/deep-thought.sass:4:192
where you can find it in https://gitlab.com/hadilq/hadilq.gitlab.io/-/jobs/3877170796
I switched back to zola 1.16.1
and avoid this problem for now. Also I tried to fix it but I have no experience with SASS format, but let me know if the fix is easy, so I'll test and create the PR.
First, I've looked and installed Zola themes and DeepThought looks great. Thank you for sharing it.
I've installed DeepThought into ~/zola/themes, then changed config.toml
theme = "DeepThought"
I added the extra configuration options needed.
The problem is, when I do "zola serve" I get a blank site.
The first image is the home page. ( http://127.0.0.1:1111/ )
The second image is the /posts link. ( http://127.0.0.1:1111/posts )
If I go into themes/DeepThought and then do "zola serve" I get your sample site.
As I understand it, I should leave your theme alone so I can check out updates from GitHub. I should not put my content in your directory. I've tried both ~/zola/content
zola serve
Building site...
-> Creating 6 pages (0 orphan), 0 sections, and processing 0 images
Done in 37ms.
and ~/zola/content/posts
zola serve
Building site...
-> Creating 6 pages (6 orphan), 0 sections, and processing 0 images
Done in 30ms.
So ~/zola/content seems better.
Am I doing something wrong?
Themes like even or pickles support KaTeX with shortcodes.
This would be helpful, until Zola #1073 is closed.
This is a wonderful template that I'm considering using for my blog. I did give it a try, but I need some help on an issue that I'm facing. Here it is:
In the docs folder I have created several sub folders in which I have added the respective .md files. I want to get the same effect as when I click on the posts in the website navigation, I have to get the .md files listed based on created date. When I tried this, I do not get to see the files listed and all I see is an empty page. Do I need to make any modifications to the _index.md such that the page lists all the .md files from inside the sub folders?
Due to dce42dc, the theme options displayed on https://www.getzola.org/themes/deepthought/ has become outdated. Could you please update it?
I see that Hyvor commenting is enabled, but Hyvor does not have a free tier. Can Disqus be integrated easily?
I would like to make a pull request to make JavaScript libraries included a set of configuration options.
Before I make the changes and submit a PR I would like to get your feedback on whether this is something that you will likely accept and which of these two implementation options I should choose.
Within the site.js file there is some instantiation code for each library, such as galleria. If galleria is not included this needs to be handled.
We could:
I would choose option 2.
option 1:
// site.js
if (Galleria) {
$(".galleria").each(function (index) {
$(this).attr("id", `galleria-${index}`);
var { images } = JSON.parse($(this).text());
for (let image of images) {
$(this).append(
`<a href="${image.src}"><img src="${image.src}" data-title="${image.title}" data-description="${image.description}"></a>`
);
}
Galleria.run(`.galleria`);
});
}
option 2:
// base.html
<script>
{% if config.extra.javascript.galleria %}
$(".galleria").each(function (index) {
$(this).attr("id", `galleria-${index}`);
var { images } = JSON.parse($(this).text());
for (let image of images) {
$(this).append(
`<a href="${image.src}"><img src="${image.src}" data-title="${image.title}" data-description="${image.description}"></a>`
);
}
Galleria.run(`.galleria`);
});
{% endif %}
// more conditional javascript initializers here...
</script>
I tried to display the top 3 docs or top 3 posts on the main page via _index.md or index.html template and current index.html don't have sections for pages from docs or blogs.
What's the right way to expose blog and docs articles via index?
Would it be possible to add Gitlab to the list of available social links?
Logos are available in their press kit: https://about.gitlab.com/press/press-kit/
The username format is the same as GitHub https://gitlab.com/$username
Is it possible to have a tweet plugin / button against each post so that I can generate a tweet link and post it to twitter when clicked? This tweet button should be shown against each post.
Reason: Filter call 'date' failed
Reason: Filter `date` received an incorrect type for arg `value`: got `Null` but expected i64|u64|String
Thank you for your great work on DeepThought, I really like your theme and want to use it.
I would like to create a multilingual navbar based on what already exists do you have any idea how I can do that?
The commit a7e99bf broke the theme, especially the linked change: a7e99bf#diff-690b81fad8df2a1f1ce37c846641d9247e3472d244f17039d2910a5ed0c98d5eR4
Removing {% set lang = lang | default(value=config.default_language) %}
from base.html
causes the following error:
Error: Failed to render '404.html' (error happened in 'base.html').
Reason: Variable `lang` not found in context while rendering '404.html'
Putting this line back into the template solves the problem.
Hey there,
I just tried the theme, and it works great, but I am not able to include comments via Disqus. I have set up a completely blank page with only content/posts/_index.md
and content/post-0.md
.
post-0.md
contains:
+++
title="Some Post"
date=2019-03-27
[taxonomies]
categories = ["Sample Post"]
tags = ["post", "lorem"]
[extra]
comments = true
+++
I have also configured Disqus in config.toml
.
When I load the post, the comment div is loaded (as well as the script
tag) but it does not contain any content and is invisible.
When I build a basic test-page on my local machine, the Disqus-Snippet works without any issues. Has anyone come across this?
I noticed that images in a Galleria container are inverted if the darkmode is activated and you maximize them. This is not the case for the preview though.
Reproduce:
Hi,
I'm trying to learn Zola and i'm inspired by this great theme,
I'm sorry to post this as a github issue but i can't find where is the lang variable defined, could anyone help me ?
Thanks for helping and for sharing this great theme.
Hey, Thank you for your great work here.
I recently try to start to move away from Twitter to a more federated solution, and found https://github.com/mastodon/mastodon an elegant solution. Would you add it to the extra.social links? However, this solution can be launched on many different domains, so for starter I would suggest to add the main one in https://mastodon.social, something like mine, https://mastodon.social/@hadilq, Thanks!
This is either an issue or I'm unaware of how to do it properly. There is a simple way to reproduce what I'm seeing.
According to the Bulma documentation, we can do the following to DeepThought's out-of-the-box example:
Edit the html tag to:
<html lang="{{lang}}" class="has-navbar-fixed-top">
and edit the navbar tag to:
<nav aria-label="section navigation" class="navbar is-light is-fixed-top" role="navigation">
When I do this, it works as expected in light mode, but not at all in dark mode. Not only that, but it adds a white bar above the navbar.
just checked out the latest codebase, but it fails when trying to serve.
joesan@joesan-InfinityBook-S-14-v5:~/Projects/Private/github-docs/DeepThought$ zola serve
Building site...
Error: invalid type: sequence, expected a map for key languages
at line 67 column 1
That line should be changed to
[languages.en]
Issued a PR!
Is it possible to implement switching to light or dark theme based on the system theme when something like
colorscheme = auto
is set in config.toml
and, always use dark mode when colorscheme = dark
is set
and, always use light mode when colorscheme = light
is set
?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.