Giter VIP home page Giter VIP logo

Comments (6)

yuang01 avatar yuang01 commented on August 16, 2024

Just write it like this in the article

{% progress 70 danger content %}

Check the version of my theme from the 'package. json' file in my theme folder. The progress tag should be above version 1.8.1

from hexo-theme-bamboo.

lorezyra avatar lorezyra commented on August 16, 2024

That's exactly how I wrote it in the markdown file.

Markup-manual-2.md:

---
title: Markup Manual
date: 2021-05-28 16:45:12
description: ''
tags: [hexo-blog]
categories: fun
category: true
toc: true
tocOpen: true
sticky: 999
comments: true
lang: en_US
indexing: true
home_posts_tag: false
swiper: false
swiperImg: 
top: false
donate: false
geolocation: Japan
mathjax: true
---

## Testing out the documented features of HEXO & JS in the bamboo theme
 All originally from: https://yuang01.gitee.io
 The purpose of this post is to see if everything documented actually works...

## Progess bars 进度条

### 进度条示例
{% progress 70 danger 进度条测试 %}
{% progress 60 info 进度条测试 %}
{% progress 60 success 进度条测试 %}
{% progress 60 warning 进度条测试 %}
{% progress 60 primary 进度条测试 %}

However, when I run hexo generate I see the error:

 $ hexo generate
INFO  Validating config
INFO  Start processing
FATAL {
  err: Error [Nunjucks Error]: _posts/Markup-manual-2.md [Line 2, Column 206] unknown block tag: progress
      =====               Context Dump               =====
      === (line number probably different from source) ===
    1 | <h2 id="Testing-out-the-documented-features-of-HEXO-amp-JS-in-the-bamboo-theme"><a href="#Testing-out-the-documented-features-of-HEXO-amp-JS-in-the-bamboo-theme" class="headerlink" title="Testing out the documented features of HEXO &amp; JS in the bamboo theme"></a>Testing out the documented features of HEXO &amp; JS in the bamboo theme</h2><p> All originally from: <a href="https://yuang01.gitee.io/">https://yuang01.gitee.io</a><br> The purpose of this post is to see if everything documented actually works…</p>
    2 | <h2 id="Progess-bars-进度条"><a href="#Progess-bars-进度条" class="headerlink" title="Progess bars 进度条"></a>Progess bars 进度条</h2><h3 id="进度条示例"><a href="#进度条示例" class="headerlink" title="进度条示例"></a>进度条示例</h3>{% progress 70 danger 进度条测试 %}
    3 | <!--code0-->
    4 | 
      =====             Context Dump Ends            =====
      at formatNunjucksError (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/hexo/lib/extend/tag.js:171:13)
      at /Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/hexo/lib/extend/tag.js:246:36
      at tryCatcher (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/util.js:16:23)
      at Promise._settlePromiseFromHandler (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/promise.js:547:31)
      at Promise._settlePromise (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/promise.js:604:18)
      at Promise._settlePromise0 (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/promise.js:649:10)
      at Promise._settlePromises (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/promise.js:725:18)
      at _drainQueueStep (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/async.js:93:12)
      at _drainQueue (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/async.js:86:9)
      at Async._drainQueues (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/async.js:102:5)
      at Immediate.Async.drainQueues [as _onImmediate] (/Users/lorezyra/Documents/blog.RichieBartlett.com/node_modules/bluebird/js/release/async.js:15:14)
      at processImmediate (node:internal/timers:464:21) {
    line: 2,
    location: '\x1B[35m_posts/Markup-manual-2.md\x1B[39m [Line 2, Column 206]',
    type: 'unknown block tag: progress'
  }
} Something's wrong. Maybe you can find the solution here: %s https://hexo.io/docs/troubleshooting.html

Hexo is saying it doesn't recognize the progress tag.

When I run hexo version I see this:

$ hexo version 
INFO  Validating config
hexo: 5.4.0
hexo-cli: 4.2.0
os: Darwin 20.5.0 darwin x64
node: 15.14.0
v8: 8.6.395.17-node.28
uv: 1.41.0
zlib: 1.2.11
brotli: 1.0.9
ares: 1.17.1
modules: 88
nghttp2: 1.43.0
napi: 8
llhttp: 2.1.3
openssl: 1.1.1k
cldr: 38.1
icu: 68.2
tz: 2020d
unicode: 13.0

All this is running on my MacBookPro with MacOS 11.4.

When I remove that line {% progress 70 danger 进度条测试 %} hexo generates without error. What version of HEXO are you running?

from hexo-theme-bamboo.

lorezyra avatar lorezyra commented on August 16, 2024

Check the version of my theme from the 'package. json' file in my theme folder. The progress tag should be above version 1.8.1

I don't find that file in your master branch. Should I be using your dev branch??

from hexo-theme-bamboo.

yuang01 avatar yuang01 commented on August 16, 2024

Yes,use dev

from hexo-theme-bamboo.

lorezyra avatar lorezyra commented on August 16, 2024

Ah!!! I see now... these tags are defined in: hexo-theme-bamboo-2.0.0\scripts\tag

hexo-theme-bamboo-2.0.0
├── README.md
├── _config.yml
├── package.json
├── scripts
│   ├── tag
│   │   ├── btn.js
│   │   ├── btns.js
│   │   ├── checkbox.js
│   │   ├── folding.js
│   │   ├── gallery.js
│   │   ├── ghcard.js
│   │   ├── image.js
│   │   ├── inline-labels.js
│   │   ├── link.js
│   │   ├── media.js
│   │   ├── note.js
│   │   ├── progress.js
│   │   ├── site.js
│   │   ├── span.js
│   │   ├── tabs.js
│   │   ├── timeline.js
│   │   ├── title.js
│   │   └── titleB.js
│   └── z-lazyload
│       ├── index.js
│       └── lib
│           └── process.js

THANKS!

from hexo-theme-bamboo.

yuang01 avatar yuang01 commented on August 16, 2024

you 're right

from hexo-theme-bamboo.

Related Issues (20)

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.