Comments (4)
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.
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.
同时考虑到 目前仍处于 0.3.x 版本的阶段,为减少升级主题造成的影响,page 这层参数仍然保留,先加入待办事项。
Scratch 相关的 bug,通过其他方式解决,例如数据储存不放在 scratch 中暂存再给 js 处理了,尝试直接放在 html 中,通过原生 template 标签存储。
from fixit.
typeit、echarts、mapbox shortcodes 都已重构为不依赖 .Scratch 实现。
from fixit.
Related Issues (20)
- [FEATURE] change text color of links in "See Also" HOT 1
- [FEATURE] 代码tab栏
- [FEATURE] 在页面中增加菜单按钮
- [BUG] 使用artalk2.8.2 docker版本,调用出现404,已初步发现问题,求优化解决 HOT 3
- [BUG] Unencoded Content in Search Leads to JavaScript Execution Risk in autocomplete-js
- hugo 0.123.x 导致首页文章作者头像无法显示 HOT 1
- Please don't use symbolic links HOT 1
- use `strings.Title` for post title and other titles
- [FEATURE] 标签,分类,合集,列表中的文章可以按照文章名称来排序吗,主页不需要这样 HOT 1
- [BUG] gitalk ·评论区颜色模式无法跟随深色模式改变 HOT 1
- [BUG] Some problem ... HOT 1
- [BUG] 部分加密无法正常解密 HOT 1
- 集成 auto-changelog HOT 1
- [FEATURE] 全文加密和部分加密密码输入框后增加按钮 HOT 1
- [FEATURE] 希望在一定大小时,右侧保留菜单栏目
- [FEATURE] Refactor search with @algolia/autocomplete-js
- [FEATURE] 通过 git 读取日期 Reading the date via git HOT 2
- 文章滚动跳转过期时间调整 HOT 1
- [FEATURE] add spotify shortcode support HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fixit.