davidmerfield / blot Goto Github PK
View Code? Open in Web Editor NEWTurns a folder into a blog
Home Page: https://blot.im
License: Creative Commons Zero v1.0 Universal
Turns a folder into a blog
Home Page: https://blot.im
License: Creative Commons Zero v1.0 Universal
Hi @davidmerfield. I'm really enjoying using Blot, thank you for all the hard work on it!
I have some files with a poorly formatted YAML front matter that seem to cause the syncing to hang on the backend. When one of these files was included in my git commit, the "syncing" message stays stuck on the first file it scans that has the bad YAML:
This appears to block the whole commit from being synced. It then takes a few minutes before the backend starts noticing new commits again, I'm assuming there's some timeout that stops the hung syncing process.
Below are contents of an example .md file that successfully reproduces the issue for me.
---
tags:
status: publish
- test
---
# test-post
state 4
This is a small issue that isn't a blocker for me as I've fixed my YAML formatting, but when it occurs it stops syncing for a few minutes and it's difficult to discover the reason. It may be good to fix this to avoid any confusion for others. Let me know if I can provide any other information!
What makes it so big? Thanks!
Hi - I'm aware this isn't a code related issue (probably) but any information on what's going on and when sites might be available again would be great.
Thanks.
Steps to reproduce the issue:
Scrapbook
)Diary
)Result: setting persists (e.g. dates are still hidden).
Expected result: settings should be isolated to the custom template.
Hey, I want to host the website that's generated by Blot on my own server. I wondered if it's possible to use Blot with Node.js on my local machine to "generate" the blog, whose files would be later uploaded to the hosting provider. I like the concept of layouts and markdown posts that Blot is using so I wanted to ask if it could be done like that. I think that noone has asked this question because it's a fairly easy process to do (or maybe it isn't).
// I used the Ghost importer for blot.im ; i'm not super used to NPM, took me a while somehow to manage to get all the dependencies even with 'npm install' ... many were always missing, i had to fiddle a bit but i can't tell you precisely more & it may be my own fault?
!! Anyway: in the end, the import worked except it had a hardcoded domain name i had to modify when trying to download all the images from my Ghost blog.
The layout tags are described here.
There's an example of them in use in the Layout & typography post here.
The source for that post is here.
There's a possible problem with the layout CSS.
Some examples:
I checked Chrome, Edge, Firefox and Safari, all on Mac.
When setting up a date via the "Date:" metadata at the beginning of a post, it sets the time too, and apparently at midnight in one of the US timezones. On the blog it doesn't matter, but the RSS entry can sometimes appear 10 hours "earlier" therefore being displayed with items long read before.
Right now to avoid this I don't set a date when I publish (so everything is at the right time), but then I lack this metadata for future proofing my files.
This is a feature suggestion without any urgency.
I think it would be great if Blot could be used with, say, Nextcloud as a client, for it can be self-hosted (to be independant of the corporate entities behind Dropbox and Github) and is still near as easy for non-technical users. Nextcloud supports the Webdav protocol, so implementing that in Blot would probably be the way to go.
(On this occasion: Blot is great, thank you! We are currently using it with the Dropbox client for a progress blog of an art project. It has saved us a lot of time, and it is a pleasure to use both for people with and without an IT background.)
I am not certain if this is the right place to report this, but I noticed an error in the developer docs:
My sure where/if the code for the blot website is located.
But the kissr competitor seems to have gone offline.
Docs may want to be updated.
Around the middle of last night I received reports of intermittent 502 gateway errors. This indicates that the node.js application responsible for Blot was down (as opposed to the NGINX reverse proxy which sits between Blot and the internet).
I checked the logs and determined that Monit, the service used to check if Blot is responsive, was restarting the node.js application because its requests to Blot's health endpoints were timing out. I streamed the log file for Blot's sync process and ran this command to watch the response time for the sign-up page (which is not cached by NGINX and generated by the node.js server for each request):
watch -n1 "curl -o /dev/null -s -w '%{time_total}' https://blot.im/sign-up"
It seemed Blot would sometimes take up to 30s to process a single request. Something was blocking the main process. I cross referenced the long response time with items in the sync queue and narrowed the suspects down to a particular HTML file, which I'll refer to as bug.html, containing a relatively large table (thousands of cells). Amusingly enough, the user was running a script which updated bug.html every 60 seconds. I emailed the customer to explain the issue and temporarily disabled the customer's blog.
I downloaded a copy of bug.html and messed around with it in my development environment. Here's the key output from the debug log:
...
blot:models:entry:build:prepare /bug.html Generating makeSlug +0ms
blot:models:entry:build:prepare /bug.html Generated makeSlug +0ms
blot:models:entry:build:prepare /bug.html Generating tags +0ms
blot:models:entry:build:prepare /bug.html Generated tags +1ms
blot:models:entry:build:prepare /bug.html Generating teasers +11s
blot:models:entry:build:prepare /bug.html Generated teasers +11s
blot:models:entry:build:prepare /bug.html Generating decoding +0ms
blot:models:entry:build:prepare /bug.html Generated decoding +0ms
...
The function which generates the 'teaser' or excerpt for each blog post was taking 11s and locking the entire server in the process, since it's synchronous code.
My planned solution is to set up a queue to build blog posts across multiple processes, distinct from the main web sever. Then I will attack the specific bug in makeTeaser.
![My image](_myimage.png)
2018-01-24 is tomorrow. Tomorrow, when the blog post becomes public _myimage.png will also be turned into a blog post.
The instructions for running the importer aren't right for squarespace and aren't clear in general. This is what worked for me:
npm install
node index.js dump.xml output
Hi, not sure this is your prefered place for this kind of errors/bugs or if you had prefered i'd send you an email.
After using the Ghost importer I initially tested to git push one of the posts to blot.im with the structure "Posts/YYYY/MM-DD-title" containing one 'post.md' + two JPGs, this worked without problem.
(I renamed all the .TXT files from the importer as .MD)
But when trying to git push all my posts (once i cleaned them up a bit) or only a random-ish selection of them i got this error:
Counting objects: 208, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (206/206), done.
error: RPC failed; HTTP 413 curl 22 The requested URL returned error: 413 Request >Entity Too Large
fatal: The remote end hung up unexpectedly 117.00 KiB/s
Writing objects: 100% (208/208), 36.21 MiB | 5.99 MiB/s, done.
Total 208 (delta 0), reused 0 (delta 0)
fatal: The remote end hung up unexpectedly
Everything up-to-date
Given that my archive/posts contains many images, i double-checked there weren't too many big ones (i remember seeing something about an error related to file sizes), i usually scale them down & better compress them to ~1024px etc to avoid full size ~5mb JPGs. So i double-checked and each image is way below <1mb generally. Most often they are ~100 to ~200kb
Same error in the end. I tried several times to git rm -r *, start again, etc
I tried the Dropbox client today and in this case there was no problem to upload everything.
I removed everything from Dropbox, gave it time for blot.im to sync. Disconnected the Dropbox client & set up the Git client/repo again in a new folder. Same error.
Could that be a similar NGINX file size limit error (given it's trying to push ~36mb at once) or something else?
(The git client for my use in this case may not be the best if the posts generally contain more images than text i guess.. ?)
simple as the title, it would be cool to have a plugin for enabling dark mode!
When parsing Blot's RSS feed, micro.blog is running into encoding issues that seem specific to Blot.
See https://micro.blog/manton/126420 for a brief discussion and this comment by the author, Manton...
Yes, this is a known issue because of the way Blot encodes URLs in RSS feeds. I've never seen an RSS feed that encodes URLs like this before, so it will need to be worked-around in Micro.blog. Hope to get to it soon.
It's not clear to me if it's a problem on the feed's end or the way Micro.blog is parsing things, but thought I'd mention it.
I wonder whether it'd be possible to link blot.im to the fediverse.
Like https://wordpress.org/plugins/activitypub/ or https://www.drupal.org/project/activitypub
Checked out my site today (www.tillmanjex.info) and the text was rendering with times (i think).
Checked the developer console and it looks like plex-sans is being blocked by same origin policy and not being loaded from Blots CDN.
GET
https://blotcdn.com/fonts/plex-sans/bold.woff2?version=1759ad&extension=.woff2
CORS Missing Allow Origin
GET
https://blotcdn.com/fonts/plex-sans/bold.woff2?version=1759ad&extension=.woff2
Status
404
Not Found
VersionHTTP/1.1
Transferred428 B (14 B size)
Referrer Policystrict-origin-when-cross-origin
Request PriorityHigh
Blot-Cache
proxied
Connection
keep-alive
Content-Length
14
Content-Type
text/html; charset=utf-8
Date
Sun, 07 May 2023 17:03:34 GMT
Server
openresty
Via
1.1 b61409af370dbf025ffc910b1252c65e.cloudfront.net (CloudFront)
X-Amz-Cf-Id
IeM2tggsZJdEbwihYOHj-_jhIjxrgIDwaUjyM7c6reIOy-iLHozw4g==
X-Amz-Cf-Pop
AMS54-C1
X-Cache
Error from cloudfront
X-Frame-Options
SAMEORIGIN
Accept
application/font-woff2;q=1.0,application/font-woff;q=0.9,*/*;q=0.8
Accept-Encoding
identity
Accept-Language
en-GB,en;q=0.5
Connection
keep-alive
Host
blotcdn.com
Origin
https://www.tillmanjex.info
Referer
https://www.tillmanjex.info/
Sec-Fetch-Dest
font
Sec-Fetch-Mode
cors
Sec-Fetch-Site
cross-site
Sec-GPC
1
User-Agent
Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:109.0) Gecko/20100101 Firefox/112.0
RSS on this page.
So I have a test post from which I only want to display the content.
In my entry.html file I have the following markup.
I have only injected the {{title}}
once within the h1
.
`
<h1 class="entry-title">
{{title}}
</h1>
{{#date}}
<p class="entry-date">
<small>{{date}}</small>
</p>
{{/date}}
{{{body}}}
</article>`
The issue: {{{body}}}
is outputting the post title, as well as the content.
I have already displayed my title in the h1
- I do not need it to be shown again.
Only 'The content...' should be output
Perhaps I'm missing something really simple here, and the issue is in my folder set up via Dropbox.
After moving my blog from git to Dropbox, the pre-existing files were not added to the Dropbox folder. I uploaded them manually to it and now the the archive contains two links to each post both pointing to the same page.
Removing / adding an underscore to the .md files in Dropbox removes the duplicate links, but the pages are also removed and the links point to nothing.
Post-deploy:
Content:
Code:
Hi,
Could you update your Readme file,
giving an example on how to setup blot inside dropbox and making a simple blog webpage?
There is nothing in Readme file, showing these steps...
:(
Hey @davidmerfield ,
below is a draft outline of the proposed HTML/CSS guide for Blot users. The goal is to quickly cover the basics and provide starting points for further self-exploration. By the end of the guide, the user should be able to make basic HTML pages with styling, and at the very least, be able to ask questions in order to learn about more advanced topics.
Let me know what you think. Thanks!
<style>
tagA 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.