Sign in

can I post a new article by programming

  • This topic has 8 replies, 3 voices, and was last updated 1 month, 2 weeks ago by .
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #6067
    pluto

    I know Publii is a client for users,it’s very easy to use. but are there some advanced method for coder.

    I want to post a article by my program or script,are there has some api support it ?

    #6086
    Tomasz Dziuda

    Hi,

    At this moment unfortunately there is no external API to use with Publii.

    --
    Do you appreciate the support you've received today? If so, consider donating to the Publii team by clicking here; we'll be sure to use your donation to make Publii even better!

    #6098
    Mathias

    All posts are stored in db.sqlite. You can create posts by entering them directly into the database (not officially supported, but it works for me 😉 )

    Unfortunately, an automatic (eg. from command-line) deploy is not an option. This would be very nice no have but I think it’s not a priority for our kind developers.

    #6102
    pluto

    Hi,

    At this moment unfortunately there is no external API to use with Publii.

    Thanks for your answer,and Thanks for providing us the Publii software 😉

    #6103
    pluto

    All posts are stored in db.sqlite. You can create posts by entering them directly into the database (not officially supported, but it works for me 😉 )

    Unfortunately, an automatic (eg. from command-line) deploy is not an option. This would be very nice no have but I think it’s not a priority for our kind developers.

    Thanks,I has found the db.sqlite,and I also see the db table in db.sqlite. Yet, I wasn’t sure whether inserting directly into the db.sqlite would succeed.

    if you already success,I think I maybe can success too. I will try it.

    #6104
    Mathias

    I do it because on some of my websites I publish huge amounts of information that are provided to me in the form of a database.

    The data model of Publii is very simple. Make a few posts, look at the database and replicate what Publii does using SQL.

    The only issue I ever had, was with empty fields. Not sure anymore what it was, but it had to do with filling them either with NULL or ” (empty string). If you get it wrong, the website will not generate.

    #6119
    pluto

    I do it because on some of my websites I publish huge amounts of information that are provided to me in the form of a database.

    The data model of Publii is very simple. Make a few posts, look at the database and replicate what Publii does using SQL.

    The only issue I ever had, was with empty fields. Not sure anymore what it was, but it had to do with filling them either with NULL or ” (empty string). If you get it wrong, the website will not generate.

     

    After coding, I can insert articles into SQLite. When there are few articles, everything is normal. But when there are too many articles (I have inserted more than 15000 articles with the program), the client can’t open. I’m sure there’s no NULL in the database.

    I tried to reduce the number of articles to more than 3000, and deleted all tag associations. The client can barely open, but the page performance is very poor.

    I see that the article list in the client is not paged. Is it blocked because all the data is queried

    #6120
    pluto

    This is the case when the client cannot be opened. Refer to the picture

    Attachments:
    #6122
    Mathias

    Hi there,

    Been there, done that 🙂 Exactly the same happened to me. Creating too many posts will slow down the opening of the website to the point you think Publii is no longer responding. Deploying will take even longer.

    The developers helped me out and even rewrote parts of the code to improve the speed. I now have a website with 2141 posts which opens and deploys a bit slowly, but not too much.

    The first thing you should do, is edit your config.json file, and make these changes:

    • “createContentStructure”: false,
    • “renderSimilarPosts”: false,

    These are very costly processes that slow down your website incredibly. Try this and give it a shot. I imagine 15.000 posts will never be possible, but 3000 should be manageable.

     

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.