github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
github-actions[bot] on gh-pages
Synchronized build (compare)
dairiki on 3.3-maintenance
Flesh out the set of project UR… (compare)
dairiki on v3.4.0b1
dairiki on master
Make a 3.4 pre-release (compare)
mistune
source code ...
Hi there! I checked all themes here https://github.com/lektor/lektor-themes but no one contins some flowblocks example.
Could someone to share good flowblocks usage example? I am looking for create text and image blocks at least. Text is creating well with documentation. But i dont understand how to create imge flowblock for add images to page body content. Thank you for any advices!
I added templates/blocks/image.html with example from documentation:
{% set img = record.attachments.images.get ( this.image ) %}
{% if img %}
< div class = "thumbnail-block" >
< img src = " {{ img.thumbnail ( 480 ) | url }} " alt = " " >
</ div >
{% endif %}
And I added flyblocks/image.html with
[block]
name = Image Block
button_label = Image
[field.image]
label = Add image
type = image
But inside admin I can add Image block but can not attach or choose attached file in this block.
I am trying to make post body flowblock for creating posts with structure like this:
If I use text type in the flowblock item type model all works well:
[block]
name = Image Block
button_label = Image
[fields.image]
type = text
label = Choose image
But If so than I need to input filename in text-field. Is it any solution that I can choose file from attached (or make attach dialog inside Image flow block)
Hi, I'm starting to use lektor to create a multi-language static site.
I'm using alternatives successfully, but now I'm stuck in how to translate the messages on templates.
I tried to use something like {% if locale == 'pt_BR' %}, but I found out that it doesn't work.
Where can I find any documentation about this? And also the variables that I can use to improve the templates?
Hi @F0liveira, thank you for input. But suppose a way to do what I want is to know what language the user selected. As I could see, Lektor insert the language string (pt_BR, for instance) in the URL, like that: http://localhost:5000/pt_BR/blog/, so if is possible get this "pt_BR" could be a solution.
BTW, where can I find a list of keys, system variables that I can read and process on templates.
Hello there, I'm willing to start using Lekort.
There are some areas that doesn't totally fit what I need, and I'd love to contribute to the overall project if I can find the solution. But at present, I'm struggling into understand what's the best approach even to debug the project. I can see self referenced project that doesn't let the project being run in debug mode from IDE like Visual Studio Code.
Do you have any idea on how to progress with that?
@w0n:matrix.org if I attempt to run on the main.py file, I get an attempted relative import with no known parent package error. If I do setup as "Run as module" specifying lektor as module, with the following configuration file, I can make it start, but then any breakpoint is ignored:
{
"name": "Python: Lektor",
"type": "python",
"request": "launch",
"cwd": "${workspaceFolder}/website",
"module": "lektor",
"args": [
"server"
]
}
So to add for instance a new functionality, or even a key into the configuration file (which is what I'm after now), it's not that straight forward as I can't test.
Debugging middleware caught exception in streamed response at a point where response headers were already sent.
Traceback (most recent call last):
File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\admin\utils.py", line 19, in generate
for event in chain(f(*args, **kwargs), (None,)):
File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\admin\modules\api.py", line 337, in generator
for event in event_iter:
File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\publisher.py", line 213, in publish
client = self.get_command(target_url, tempdir, credentials)
File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\publisher.py", line 209, in get_command
return Command(argline, env=env)
File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\publisher.py", line 126, in __init__
self._cmd = portable_popen(argline, **kwargs)
File "C:\Users\spiv1\AppData\Local\lektor-cli\lib\Lib\site-packages\lektor\utils.py", line 495, in portable_popen
raise RuntimeError('Could not locate executable "%s"' % cmd[0])
RuntimeError: Could not locate executable "rsync"
Traceback (most recent call last):
File "/home/torcato/.local/lib/lektor/lib/python3.9/site-packages/lektor/devserver.py", line 36, in build
builder = Builder(
File "/home/torcato/.local/lib/lektor/lib/python3.9/site-packages/lektor/builder.py", line 1073, in __init__
con = self.connect_to_database()
File "/home/torcato/.local/lib/lektor/lib/python3.9/site-packages/lektor/builder.py", line 1090, in connect_to_database
con = sqlite3.connect(
sqlite3.OperationalError: unable to open database file
Maybe s.o. here has an idea what's going wrong here on my website I administer with lektor:
https://praxis-muensterland.de/news/
In the main section you can see a list of news, on the right there's a shorter list of the five newest news.
Everything worked fine until now. I could add a news which appeared (both localy and remotely) in both columns.
But as you can see today when I added one it only appears in the main section, the Aktuelles section doesn't show it. I cleaned the build and rebuild again. I checked and altered the layout.html which contains
<aside id="newsandads">
<h1>Aktuelles</h1>
{% set newsfeed = site.query('/news').limit(5) %}
{% for news in newsfeed|sort(attribute="article_id",reverse=True) %}
<article>
<header>
<h1>{{ news.title }}</h1>
<time datetime="{{ news.pub_date|datetimeformat('%Y-%m-%dT%H:%M:%S-00:00', lo\
cale="de_DE") }}" class="date" pubdate="pubdate">{{ news.pub_date|datetimeforma\
t('E, dd. MMMM yyyy - HH:mm', locale="de_DE") }}</time>
</header>
<p>{{ news.body|string()|striptags()|truncate(150) }}
<span>(<a href="{{ '/news/'|url }}#{{ news.article_id }}" title="Den ganzen Art\
ikel lesen" class="full">weiter</a>)</span>
</p>
</article>
{% endfor %}
</aside>
What am I missing out? I didn't change anything since the last time in March ....
:point_up: Edit: Maybe s.o. here has an idea what's going wrong here on my website I administer with lektor:
redacted
In the main section you can see a list of news, on the right there's a shorter list of the five newest news.
Everything worked fine until now. I could add a news which appeared (both localy and remotely) in both columns.
But as you can see today when I added one it only appears in the main section, the Aktuelles section doesn't show it. I cleaned the build and rebuild again. I checked and altered the layout.html which contains
<aside id="newsandads">
<h1>Aktuelles</h1>
{% set newsfeed = site.query('/news').limit(5) %}
{% for news in newsfeed|sort(attribute="article_id",reverse=True) %}
<article>
<header>
<h1>{{ news.title }}</h1>
<time datetime="{{ news.pub_date|datetimeformat('%Y-%m-%dT%H:%M:%S-00:00', lo\
cale="de_DE") }}" class="date" pubdate="pubdate">{{ news.pub_date|datetimeforma\
t('E, dd. MMMM yyyy - HH:mm', locale="de_DE") }}</time>
</header>
<p>{{ news.body|string()|striptags()|truncate(150) }}
<span>(<a href="{{ '/news/'|url }}#{{ news.article_id }}" title="Den ganzen Art\
ikel lesen" class="full">weiter</a>)</span>
</p>
</article>
{% endfor %}
</aside>
What am I missing out? I didn't change anything since the last time in March ....
@nixjdm @rlaverde I will like to help out with the themes. However, I am finding it hard to set it up on my system. Coming from wordpress cms, lektor is the closest to the ease of use
Did you get it to work, amachefe (Ama M) ?