Coder Social home page Coder Social logo

ratanshreshtha / deepthought Goto Github PK

View Code? Open in Web Editor NEW
171.0 11.0 91.0 3.89 MB

A simple blog theme focused on writing powered by Bulma and Zola.

Home Page: https://deepthought-theme.netlify.app/

License: MIT License

JavaScript 5.13% HTML 18.49% Sass 76.38%
zola bulma theme netlify blog-theme hacktoberfest hactoberfest2022

deepthought's Introduction

Hi there ๐Ÿ‘‹

deepthought's People

Contributors

arichtman avatar bobankh avatar chrischinchilla avatar d2weber avatar dlecan avatar eopb avatar guileas avatar hadilq avatar hatappo avatar ian-fox avatar joesan avatar kenohassler avatar madhank93 avatar matejp0 avatar ratanshreshtha avatar rkinmobi avatar skyplabs avatar snystrom avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deepthought's Issues

Feature Request: Custom CSS to fix footnotes

Footnotes within Zola will render like the following:
image

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.

Tweet Plugin for Posts

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.

enable back page author (optional)

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:

  • enables back the support to add author to the RSS or Atom feed generator (which is supported on zola)
  • enables hyperlink on each author listed to its own presentation page
  • keeps current default behavior of using the config extra author name if no author list in page defined

Will provide the PR soon.

I hope you like it so we make it default for everyone too!

Best,

Footer block is gone

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?

Dark theme inverts YouTube and Vimeo player colors.

Steps to reproduce:

Expected results:

  • The embedded videos shouldn't be affected by the dark theme. They shouldn't have inverted colours.

Tested in:

  • Firefox Nightly 88 and Firefox Stable 86 (I could reproduce it)
  • Ungoogled Chromium 88 (I could reproduce it)

firefox_lgnQebFATc

Unable to use, further help needed.. :/

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 namespace macros was not found in template 404.html. Have you maybe forgotten to import it, or misspelled it?

Can you kindly help me out @RatanShreshtha ? :)

A lot of things don't work on me (new on Zola)

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...

Error: Expected newline.

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.

Feature Request : Automatically switch to light or dark theme

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
?

Can't use DeepThought as a theme - doesn't render anything in content/

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/ )
Screen Shot 2020-10-07 at 13 48 41

The second image is the /posts link. ( http://127.0.0.1:1111/posts )
Screen Shot 2020-10-07 at 13 46 57

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?

navbar is-fixed-top does not appear to work in dark mode

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.
image

Screenshot of it not staying fixed in dark mode:
image

Screenshot of it staying fixed in light mode:
image

More than 1 Galleria errors out

Steps to Reproduce:

  • Clone this repo
  • in content/docs/extended-shortcodes/index.md copy paste the galleria shortcode so that there are more than 1 instances of the galleria gallery

Expected Results:

  • Properly rendered galleria galleries

Actual Results:
Screen Shot 2021-04-07 at 1 46 43 AM

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.

Lang variable

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.

Multilingual navbar

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?

Feature request: Top n posts and docs on index

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?

Organize md files in sub folders

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?

Paginators Gone Wild

Paginators Gone Wild, also clicking on page 1 from another page causes a redirect:

2022-05-16_22-53-16

Was thinking Something like this might be better:

2022-05-16_22-57-05

Installation guide is incomplete

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'

Feature Proposal: optional JavaScript libraries

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:

  1. Make the instantiation code checking check for the presence of the library
  2. Or move the instantiation JavaScript into inline blocks in the base.html that can be conditionally included

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>

Missing RSS / Atom feed icon

The RSS / Atom feed icon is not showing up in the social links, but it's still present there and it's possible to click on it.

Screenshot from 2021-08-21 20-32-03

Can't really show what's wrong, but the right-most space is where the link is, but the icon isn't.

Allow posts without dates

Reason: Filter call 'date' failed
Reason: Filter `date` received an incorrect type for arg `value`: got `Null` but expected i64|u64|String

Avatar variable is required for 404 template, but not for index template

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?

Error Checking out Latest Codebase

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!

Dark mode flickers on load of new page

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:

$(document).ready(function () {
mermaid.initialize({ startOnLoad: true });
if (localStorage.getItem("theme") === "dark") {
$("body").attr("theme", "dark");
$("img, picture, video").attr("theme", "dark");

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.