spyder-ide / lektor-icon Goto Github PK
View Code? Open in Web Editor NEWA modern, single-page-focused theme for the Lektor static CMS
Home Page: https://spyder-ide.github.io/lektor-icon/
License: Other
A modern, single-page-focused theme for the Lektor static CMS
Home Page: https://spyder-ide.github.io/lektor-icon/
License: Other
Hello,
trying to use the theme on an Ubuntu 22.04 with lektor 3.3.7 installed via pipx.
Images not in the static
folder cannot be rendered correctly. Seems like the Responsive Image Handling
section of your documentation is not working correctly: lektor seems to scale images but can't route them accordingly.
For example, taking the image blog-index.png
, lektor tries to access [email protected]
but can't find it:
$ lektor build
Started build
U index.html
/home/mylinuxuser/.local/pipx/venvs/lektor/lib/python3.10/site-packages/lektor/imagetools.py:598: UserWarning: Your image is being scaled up since the requested thumbnail size is larger than the source. This default will change in the future. If you want to preserve the current behaviour, use `upscale=True`.
warnings.warn(
U [email protected]
E [email protected] (RuntimeError: Could not locate imagemagick.)
U 404.html
U code-of-conduct/index.html
U past-editions/index.html
Error: Build failed with 1 failure.
Finished build in 0.53 sec
Started prune
Finished prune in 0.01 sec
This happens same with lektor server
and also within your example-site
.
Suggestions?
The new rewrite of lektor-icon
done by @CAM-Gerlach in PR #8 is fantastic! The only thing I'd like to see improved on small screens is to not display the "Open Chat" button directly because it takes too much space:
Instead, we could show it on a toolbar at the bottom, like we're doing in the docs website:
@CAM-Gerlach, could you take a look at this one? It's not critical, so whenever you have some free time is fine.
When opening the Lektor admin panel on a page with the singlepage layout, @conradolandia found that an error message is displayed in the GUI:
And in the terminal, a long, repetitive traceback is displayed...
Traceback (most recent call last):
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\flask\app.py", line 2095, in __call__
return self.wsgi_app(environ, start_response)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\flask\app.py", line 2080, in wsgi_app
response = self.handle_exception(e)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\flask\app.py", line 2077, in wsgi_app
response = self.full_dispatch_request()
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\flask\app.py", line 1525, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\flask\app.py", line 1523, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\flask\app.py", line 1509, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\admin\modules\api.py", line 148, in get_raw_record
return jsonify(ts.to_json())
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\editor.py", line 197, in to_json
"datamodel": self.datamodel.to_json(self.pad, self.record, self.alt),
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 314, in to_json
"fields": [x.to_json(pad, record, alt) for x in _iter_all_fields(self)],
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 314, in <listcomp>
"fields": [x.to_json(pad, record, alt) for x in _iter_all_fields(self)],
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 204, in to_json
"type": self.type.to_json(pad, record, alt),
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\flow.py", line 228, in to_json
rv["flowblocks"] = discover_relevant_flowblock_models(self, pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\flow.py", line 49, in discover_relevant_flowblock_models
rv[block_name] = all_blocks[block_name].to_json(pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 437, in to_json
"fields": [
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 438, in <listcomp>
x.to_json(pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 204, in to_json
"type": self.type.to_json(pad, record, alt),
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\flow.py", line 228, in to_json
rv["flowblocks"] = discover_relevant_flowblock_models(self, pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\flow.py", line 49, in discover_relevant_flowblock_models
rv[block_name] = all_blocks[block_name].to_json(pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 437, in to_json
"fields": [
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 438, in <listcomp>
x.to_json(pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 204, in to_json
[Repeated many times]
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 204, in to_json
"type": self.type.to_json(pad, record, alt),
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\flow.py", line 228, in to_json
rv["flowblocks"] = discover_relevant_flowblock_models(self, pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\flow.py", line 49, in discover_relevant_flowblock_models
rv[block_name] = all_blocks[block_name].to_json(pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 437, in to_json
"fields": [
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 438, in <listcomp>
x.to_json(pad, record, alt)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\datamodel.py", line 204, in to_json
"type": self.type.to_json(pad, record, alt),
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\multi.py", line 125, in to_json
rv["choices"] = list(self.source.iter_choices(pad, record, alt))
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\types\multi.py", line 88, in iter_choices
for item in iterable or ():
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 1192, in __bool__
return self.first() is not None
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 1135, in first
return next(iter(self), None)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 1211, in __iter__
for item in iterable:
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 1077, in _iterate
if self._matches(record):
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 1046, in _matches
if not self._include_undiscoverable and record.is_undiscoverable:
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\sourceobj.py", line 39, in is_undiscoverable
return not self.is_discoverable
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 377, in is_discoverable
return self._data["_discoverable"] and not self.is_hidden
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 362, in is_hidden
return self._is_considered_hidden()
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 742, in _is_considered_hidden
parent = self.parent
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 759, in parent
self._data["_attachment_for"], persist=self.pad.cache.is_persistent(self)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 2199, in is_persistent
cache_key = self._get_cache_key(record)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 2186, in _get_cache_key
path, virtual_path = split_virtual_path(record_or_path.path)
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 457, in path
return self["_path"]
File "C:\Miniconda3\envs\lektor-test\lib\site-packages\lektor\db.py", line 482, in __getitem__
rv = self._bound_data.get(name, Ellipsis)
RecursionError: maximum recursion depth exceeded while calling a Python object
I confirmed this could be reproduced on the latest master
for v2.0, but on in v1.0. and on the latest Lektor 3.3.10, with both the example site and the Spyder website.
A git bisect
finds that the culprit is commit 4bf326b added as part of PR #8 , which introduced the new multisection flowblocks. Specifically, it supports nesting further mutlisection
flowblocks inside itself, which evidently triggers infinite recursion inside the admin interface which was not designed to handle that situation. Indeed, removing support for nesting multisections inside other multisections (at least via the admin UI) fixes this issue, and should have relatively minimal real-world impact as it is only actually potentially useful in a handful of mostly theoretical corner cases.
I'll submit a PR to fix.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.