postleaf / postleaf Goto Github PK
View Code? Open in Web Editor NEWSimple, beautiful publishing with Node.js.
Home Page: https://www.postleaf.org/
License: MIT License
Simple, beautiful publishing with Node.js.
Home Page: https://www.postleaf.org/
License: MIT License
So I decided to try my first update with Postleaf....and things didn't go so well.
I was on version 1.0.0-alpha.4 and after updating to 1.0.0-alpha.5 I simply got this error:
I tried also updating the Empower theme to the latest but that didn't fix it.
Luckily, I had backed up my entire site beforehand and I was able to get back to where I was. But I'd certainly like to avail of Sitemaps and JSON feed etc.
A global npm package which could be used to install new Postleaf projects.
So running npm install -g postleaf-install
to install the package globally
Then you could run postleaf-install new some-project
or postleaf-install new /path/to/install/in
.
Running this would create a fully functioning Postleaf project without the needs for npm install
or gulp build
.
This seems more like a Safari bug than a Postleaf bug, but perhaps we can work around it.
When searching on iOS, the locater results don't appear. They're injected into the DOM and toggling random styles in the inspector makes them magically appear, so I suspect this is a display glitch due to the locater's fixed positioning.
I noticed that this seems to happen on desktop Safari as well, but it's more sporadic. Try searching a few times and it will eventually occur.
The env library doesn't provide any error if .env
doesn't exist. Need to add a check to make sure it exists on startup.
After installing according to readme, admin-theme does not work, since it can't load the assets/css/lib.css
because, it is referenced without the port (3000).
generated markup from http://localhost:3000/admin/posts
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="/assets/images/favicon.png">
<link rel="apple-touch-icon" href="/assets/images/app_icon.png">
<link rel="stylesheet" href="http://localhost/assets/css/lib.css">
i exactly followed the readme:
git clone https://github.com/Postleaf/postleaf.git && cd postleaf
git clone https://github.com/Postleaf/empower-theme.git themes/empower-theme
cp .env.example .env
vim .env
npm install
sudo npm install -g gulp-cli
gulp build
node app.js
I just updated the upper part of .env to:
# App
NODE_ENV=production
APP_URL=http://localhost/
APP_PORT=3000
[...]
opened browser, to http://localhost:3000/
It guided me through creating the user (already unstyled). Frontend works fine.
Thank you for your help and good work.
I write a lot of code related articles and I'd like to be able to add some classes to the pre tags in my posts so I can use PrismJS to add language based highlighting.
Is this possible right now, and if not is it planned?
Template caching isn't working in production because of a naming conflict with the admin and theme layout file (resolve in Postleaf/empower-theme@04ed6bd).
Turns out, there are more issues related to this:
useThemeViews()
and useSystemViews()
. A proper renderer needs to be used for admin and theme views to avoid this.dust
is internal to Adaro.)chunk.partial()
to render the theme toolbar in theme_helpers.js
is causing theme views to hang.I'm creating this issue for folks who may search for it in the future. I've posted my thoughts on Google AMP, and why I've chosen to not add it to Postleaf at this time:
This will probably become its own project, but I'm posting here so people can find it easily. I don't feel like the importer belongs in core for a few reasons:
Maybe this can be a plugin down the road. Until then, I'm thinking a CLI will be the most appropriate option.
Here are the platforms users have asked for the most.
This MIT-licensed lib might help convert WP exports to a Postleaf-friendly format.
Another option for supportive platforms is a plugin that exports data into a Postleaf-friendly backup file, which would be really easy to create (ZIP with JSON files and uploads).
Can't even get this to install on a fresh Debian 8 installation.
root@postleaf:/var/www/postleaf# node app.js
Error: Postleaf failed to start! ð
SequelizeUniqueConstraintError: Validation error
Maybe work on better installation guides? The PHP version of PostLeaf was easy to install ... so far pretty disappointed in how the NodeJS version is thus far.
Currently, Postleaf looks for an oEmbed service when a URL gets pasted into the editor or the embed tool. If the site doesn't support oEmbed, the URLs just gets inserted as-is.
There probably aren't a lot of cases where a user pastes a URL into the editor and actually wants the URL to as-is. Using Discourse today, I noticed they produce a card block (onebox) for non-oEmbed URLs:
This would be a great enhancement for Postleaf. As with oEmbed providers, the theme should be able to customize their appearance to match the surrounding content.
Possible candidates to replace the existing oEmbed lib:
Error received is: SequelizeConnectionError: SQLITE_CANTOPEN: unable to open database file
Looks like it's because the /data
directory doesn't exist.
At the moment many of the URLs are relative in Postleaf .i.e /themes/empower-theme/css/styles.css
There are some performance improvements by having absolute URLs instead. http://website.com/themes/empower-theme/css/styles.css
Essentially the browser has less work to do to locate files with absolute URLs vs relative URLs.
Perhaps add a password confirm field on forms related to setting, resetting and updating passwords.
Add the french translation
Note: This issue tracker is ONLY for bug reports and feature requests. If this is a personal support issue, please ask on the forum instead: community.postleaf.org
$ gulp build
events.js:154
throw er; // Unhandled 'error' event
^
TypeError: this is not a typed array.
at Function.from (native)
at /home/hari/experiments/node/postleaf/node_modules/imagemin-svgo/index.js:25:19
at optimizeOnceCallback (/home/hari/experiments/node/postleaf/node_modules/svgo/lib/svgo.js:44:17)
at /home/hari/experiments/node/postleaf/node_modules/svgo/lib/svgo.js:65:9
at Object.sax.onend (/home/hari/experiments/node/postleaf/node_modules/svgo/lib/svgo/svg2js.js:156:13)
at emit (/home/hari/experiments/node/postleaf/node_modules/sax/lib/sax.js:640:35)
at end (/home/hari/experiments/node/postleaf/node_modules/sax/lib/sax.js:683:5)
at Object.write (/home/hari/experiments/node/postleaf/node_modules/sax/lib/sax.js:991:14)
at Object.SAXParser.close (/home/hari/experiments/node/postleaf/node_modules/sax/lib/sax.js:157:38)
at module.exports (/home/hari/experiments/node/postleaf/node_modules/svgo/lib/svgo/svg2js.js:169:28)
Note: This issue tracker is ONLY for bug reports and feature requests. If this is a personal support issue, please ask on the forum instead: community.postleaf.org
I want to make sure everyone can use Postleaf, so RTL language support is imperative. Follow this thread for updates.
Just noticed that it may be possible for navigation items to lose order when updating. Those updates need to be performed in series instead of using Promise.all()
.
When spacing before/after an inline element, a
is erroneously produced instead of a normal space. Appears to be a TinyMCE bug.
Reported here: tinymce/tinymce#3057
Add support for JSON Feed.
This was just released. Why add support for it?
It's new, but it's simple, awesome, and it's getting a ton of coverage:
And it can't really hurt anything to support it.
Is there anything else you'd like to see in the docs?
Inserting an embed card results in the following markup:
<div data-embed="true" data-provider="undefined">
[embed card markup]
</div>
The data-provider
attribute shouldn't be present in this case.
Hello again,
There's any plan in the roadmap to create a plugin (or app) system so we can extend the functionality of the CMS?
Maybe you can use the project tab to define next ideas 😄
Cheers.
This is an example attempt at building a contained release of Postleaf and all dependencies for CentOS 7.
https://drive.google.com/open?id=0Bw79xAK-G5jhQTNnNmoxcGxxWXc
Installation:
wget https://drive.google.com/open?id=0Bw79xAK-G5jhQTNnNmoxcGxxWXc
tar -zxvf postleaf-centos-7.3.tar.gz
cd postleaf
cp .env-example .env
nano .env // setup your env settings
chmod +x run.sh
./run.sh // sets PATH variables, calls node from bin directory
The only dependency missing from this example is sqlite, which is installed by default on DigitalOcean droplets.
With this technique you can create a build process for each major server OS. You can bake in all dependencies and assets post-gulp build. This greatly simplifies the installation process.
First, install Postleaf on the target OS normally, including all dependencies (node, sqlite, gm, etc.)
Move all dependency binaries to a folder inside the postleaf project (I used bin
)
Write a startup script to modify the PATH environment variable for the node process (see run.sh
) to include the bin
directory. Now all calls to binaries like GM will look inside our bin
folder first.
Note we also use our local node binary instead of the globally installed Node. This is a big deal since many node-based projects require different versions of node, they really need to bundle their preferred version to avoid conflicts. Really important if you want to run more than one node app on the same box.
We might be able to get rid of run.sh
if we can set the PATH environment variable at runtime (top of app.js
). Not sure about this.
We should check the licensing on GM to make sure it can be bundled legally, and make sure we include the license alongside the binary if necessary.
/assets/css/lib.css
is a 404
No gulp build errors, lib.css
is present with content inside assets/css
Hello all,
It's a general question instead of a bug, is Posteaf generating the sitemap.xml
file or there's an endpoint for that e.x. /sitemap
?
If don't, any plans to add it into the alpha version? I believe this is a very important feature since Postleaf is SEO friendly.
Thanks.
Not sure if this should be a TinyMCE plugin or something built into editor.js
, but I'd love to add this sooner than later.
My preferred approach is to do this on the fly like Medium as opposed to when content is rendered. This is inline editing, after all. 💪
Add support for custom content regions in templates. Super useful for managing content such as sidebars, headers, footers, etc.
Example:
{@region id="sidebar"}
<p>Default content can go here</p>
{/region}
It would be very useful to have nested navigation pages.
Built in node.js Promises are 4x slower than blue bird, It's better to bring in the package bluebird and add the line js const Promise = require('bluebird');
I can do a PR if you think it's warranted, but it's probably a good idea overall to do it.
Add
"scripts": {
"postinstall": "gulp build"
},
to package.json
to run gulp build
after install
Note: This issue tracker is ONLY for bug reports and feature requests. If this is a personal support issue, please ask on the forum instead: community.postleaf.org
Be able to create new tag(s) on the fly when creating/editing a post. Instead of having to go into tags and create it in there.
If you add a Tag in lower case the order doesn't work as expected
Note: This issue tracker is ONLY for bug reports and feature requests. If this is a personal support issue, please ask on the forum instead: community.postleaf.org
What about publishing a simple api for postleaf for major postleaf functionality?
Perhaps it would fit in as part of #27.
eg.
const postleaf = require("postleaf-api");
const api = postleaf.login("user","pass");
const post = api.post({ title:"Title", content:"This is a post", publish:true});
I created a post with slug untitled post
. After post was created, I opened it again, changed content and saved again.
I created a new post again. I opened post settings
, clicked revisions tab
and saw the revisions from the previous untitled post
. I was able to open the first post's preview.
I closed Chrome, stopped and restarted Postleaf and deleted all Postleaf cookies, but revisions are shown.
Note: This issue tracker is ONLY for bug reports and feature requests. If this is a personal support issue, please ask on the forum instead: community.postleaf.org
I think it could be useful to allow for navigation links to have the target="_blank"
attribute set on them.
I sometimes link out to external sites such as my Github account in the main menu or subdomains for labs, projects etc and I like to open them in a new tab if possible.
Hey @claviska,
Do you have any plans to make a roadmap to keep track of the order features will be implemented? GitHub has that really nice boards feature now that everyone seems to use instead of Trello. Would be nice to see what the short and long term goals are for the project.
The way homepage/blog routes are currently defined, the app needs to be restarted when Settings > Homepage changes. This needs to be rewritten so that's not required.
Currently the only way to create new tags is to go to the tags section and create them there.
It would be a big time saver to simply be able to type them into the tags section of the Settings > Metadata panel when writing or editing a post and have them saved that way. Similar to as WordPress...but better...because it's not WordPress :)
Running node app.js
returns:
SequelizeUniqueConstraintError: Validation error
gulp build
node app.js
Using CentOS 7.3, Node 7, sqlite 3, GraphicsMagick 1.3.25, after running gulp build
NPM faills.
Attached npm errors log
npm-debug.log.zip
Note: This issue tracker is ONLY for bug reports and feature requests. If this is a personal support issue, please ask on the forum instead: community.postleaf.org
I've followed the article here for Ubuntu:16.04
https://www.postleaf.org/installing-postleaf-on-digitalocean?v=1
But when I run node app.js
I get the following error:
Error: Postleaf failed to start!
SequelizeUniqueConstraintError: Validation error
Not sure where to go from here. Any suggestions what this error means?
sudo npm install -g npm-gyp npm-pre-gyp sqlite3 sequelize gulp
)npm install
gulp build
node app.js
Menu on the dropdown menu with the Postleaf cut off in Safari
Note: This issue tracker is ONLY for bug reports and feature requests. If this is a personal support issue, please ask on the forum instead: community.postleaf.org
I've followed the instructions for Installing Postleaf on Digital Ocean using the tagged version 1.0.0-alpha.2
but when I run node app.js
I get the following url http://34.253.2.242/undefined/install
See the screenshot below:
Follow the tutorial with 1.0.0-alpha.2
Some folks don't realize they don't have the necessary dependencies installed when they run Postleaf. This can lead to sporadic bugs. A quick check on startup could save a lot of troubleshooting.
It would be nice to have a feature similar to Laravel, Symfony, Doctrine, Grav CMS etc. where a user can run commands from the console to perform the following tasks:
postleaf init
Run gulp build
and setup db and files/folders required before startup and perhaps walk a user through prompts to set the .env
variables. Like Yeoman.
This would also be a good way to auto generate the random hash, similar to how Laravel does it on install.
postleaf theme <theme-name>
Install themes e.g. postleaf theme empower
postleaf backup
Backup/zip the following directories cache
, data
, themes
, uploads
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.