Giter VIP home page Giter VIP logo

Comments (4)

Lruihao avatar Lruihao commented on June 24, 2024

Why is my page Scratch or Store missing a value?

The Scratch and Store methods on a Page object allow you to create a scratch pad on the given page to store and manipulate data. Values are often set within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are not determinate until Hugo renders the page content.

from fixit.

Lruihao avatar Lruihao commented on June 24, 2024

Why is my page Scratch or Store missing a value?

The Scratch and Store methods on a Page object allow you to create a scratch pad on the given page to store and manipulate data. Values are often set within a shortcode, a partial template called by a shortcode, or by a Markdown render hook. In all three cases, the scratch pad values are not determinate until Hugo renders the page content.

可以肯定的是造成 typeit 和 mapbox shortcode 失效的主要原因正是因为 Page Scratch 在 shortcode 的阶段是不确定的值。经过各种尝试后依旧没有找到好的解决方式。

放弃!

之后或改用 typed.js,并独立出 FixIt 主题,成为主题组件生态的一部分

from fixit.

Lruihao avatar Lruihao commented on June 24, 2024

同时考虑到 目前仍处于 0.3.x 版本的阶段,为减少升级主题造成的影响,page 这层参数仍然保留,先加入待办事项

Scratch 相关的 bug,通过其他方式解决,例如数据储存不放在 scratch 中暂存再给 js 处理了,尝试直接放在 html 中,通过原生 template 标签存储。

from fixit.

Lruihao avatar Lruihao commented on June 24, 2024

typeit、echarts、mapbox shortcodes 都已重构为不依赖 .Scratch 实现。

from fixit.

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.