Closed shubhxms closed 3 years ago
What is your directory structure ?
The directory structure is as follows:
myblog ├── config.toml ├── content │ ├── blog │ │ ├── Empty File │ │ ├── first.md │ │ ├── _index.md │ │ └── second.md │ └── _index.md ├── public │ └── site.css ├── sass ├── static ├── templates │ ├── base.html │ ├── blog.html │ ├── blog-page.html │ └── index.html └── themes └── DeepThought ├── config.toml ├── content │ ├── docs │ │ ├── basic-markdown-syntax.md │ │ ├── config-options.md │ │ ├── extended-shortcodes │ │ │ ├── alexandre-dinaut-GHxr3O6yZ1c-unsplash.jpg │ │ │ ├── chandler-cruttenden-YYemke7BfuE-unsplash.jpg │ │ │ ├── index.md │ │ │ ├── jung-ho-park-7aZtpsyaWVM-unsplash.jpg │ │ │ ├── kitera-dent-BIj4LObC6es-unsplash.jpg │ │ │ ├── koes-nadi-XkUFF1nnbA8-unsplash.jpg │ │ │ ├── lazyartistgallery-HHaIRbgzcGw-unsplash.jpg │ │ │ ├── saira-nUxdL_19OQw-unsplash.jpg │ │ │ └── waldemar-brandt-2hAEHCt25eM-unsplash.jpg │ │ ├── _index.md │ │ └── welcome-to-deep-thought.md │ ├── _index.md │ └── posts │ ├── _index.md │ ├── post-0.md │ ├── post-1.md │ ├── post-2.md │ ├── post-3.md │ ├── post-4.md │ ├── post-5.md │ ├── post-6.md │ ├── post-7.md │ ├── post-8.md │ └── post-9.md ├── LICENSE ├── netlify.toml ├── README.md ├── sass │ └── site.scss ├── screenshot.png ├── static │ ├── icons │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-384x384.png │ │ ├── apple-touch-icon.png │ │ ├── browserconfig.xml │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ ├── mstile-150x150.png │ │ ├── safari-pinned-tab.svg │ │ └── site.webmanifest │ ├── images │ │ └── avatar.png │ └── js │ └── site.js ├── templates │ ├── 404.html │ ├── base.html │ ├── categories │ │ ├── list.html │ │ └── single.html │ ├── index.html │ ├── macros.html │ ├── page.html │ ├── robots.txt │ ├── section.html │ ├── shortcodes │ │ ├── chart.html │ │ ├── galleria.html │ │ ├── mapbox.html │ │ ├── mermaid.html │ │ ├── vimeo.html │ │ └── youtube.html │ └── tags │ ├── list.html │ └── single.html └── theme.toml
21 directories, 72 files
Your directory structure is overriding the base.html
template which has {% import 'macros.html' as macros %}
line to include macros thus you are getting the error. If you want you can either add the line in your base.html
along with copying the macro file as well or if you are happy with default templates then you can get rid of template folder in root of your repository.
I did that, but now I get this.
zola serve Building site... -> Creating 0 pages (0 orphan), 1 sections, and processing 0 images Error: Failed to render section '/home/savitr/Statics/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'
Add items for navbar like this https://github.com/RatanShreshtha/DeepThought/blob/6e24cdbfecc283c88474e597fcb0cec2d65b5abc/config.toml#L32
Thank you for your help, it has started working. :)
When I try to
zola serve
I get output as
Can you kindly help me out @RatanShreshtha ? :)