Sign in

Is it there a way to selectively upload only new items?

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #3314
    geppettvsgeppettvs

    In the first days, when I started using Publii, I found it too fast to publish my page.

    With a few weeks using it, I have found the upload takes more and more time, as it publishes the whole website and not only the new or updated/modified posts and its contents.

    Is it there a way to just upload the affected new or updated/modified items?

    I know that if I publish a new post, the main page and other elements will be modified or affected by this new post. So it would be nice to have these elements updated at the time I upload a new post.

    But the rest of the static pages/elements will be the same. So I guess there should be a way to do what I say, maybe already solved but I haven’t noticed that options so far.

    Thank you very much.

    #3316
    BobBob
    Support

    Hi geppettvs,

    There are many elements that affect the length of the upload process, for example, Related posts – when you add a new post the list of related posts changes on all post pages.

    Have a look at the “How to speed up rendering process?” article, it may help you optimize your upload time.

    --
    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!

    #3317
    geppettvsgeppettvs

    Hey Bob, thank you very much for your answer.

    I understand there will be many things which will be affected by new posts. And I understand that will take a lot of time which I don’t care to spend if that’s a major change to the blog.

    But look.

    Sometimes I misspell a word, or let’s say: If I want to change a picture, removing an old picture and placing a new one.

    If I modify a single character to the newest post, having in mind that everything else will be the same. The affected post has just a character difference, but the whole page will be uploaded again.

    I guess the only way to do such thing is publishing my blog to a local folder, then manually uploading via FTP with the proper FTP client, which will ask what to do with current files on the server, so I can answer “If size differs” or not to overwrite current files on the server.

    Anyway, as Publii solves by itself the FTP task, it would be great to have this options when uploading a correction like the one I mentioned.

    Thank you!

    #3323
    Tomasz DziudaTomasz Dziuda
    Moderator

    @geppettvs – if Publii uploads many files due small change on the post there are two possibilities:

    1. Your small change affects many subpages and they should be updated anyway.
    2. There is a problem on your server with uploading files.publii.json file – this file is used to compare file contents checksums, if file not exists on the list or checksum is different – Publii uploads a file.

    --
    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!

    #3325
    geppettvsgeppettvs

    Hello Tomasz.

    Thank you for your answer.

    Your point 2 sounds technically logic. Nevertheless I haven’t done anything to modify the behavior of Publii on this point.

    So now I wonder if there’s something I should have done before in order to make Publii work faster.

    If so, can you please point me to an online doc where to find such information?

    Let me say that I am just working with the default Publii options. So once I finish writing my new post, or comiting my minor changes to an old post, I just press the “Sync your website” button and when I see the “Website synchronization” window I hit the “Sync your website” again.

    I have noticed there is a warning which reads:

    Remember! Any duplicate files or filenames already in the destination location that match the Publii-generated files will be overwritten.

    Which makes me think that, if -as mentioned before- I change a single character (misspelled word or something), the whole images and other stuff will be uploaded.

    This should be solved by the comparison method you mentioned in your point 2, but I don’t know how to check if it is working on my end.

    I am using Linux, Ubuntu 18.04 LTS and Publii is running pretty fine on this OS.

    Any ideas are welcome.

    Thanks in advance.

    #3338
    Tomasz DziudaTomasz Dziuda
    Moderator

    How many files is uploaded during sync? And how many files has your website at all?

    --
    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!

    #3345
    geppettvsgeppettvs

    Hello Tomasz.

    I am attaching a screenshot of my Publii uploading the blog. I didn’t commit any change, didn’t change anything. Just opened the application and hit the “Sync your website” button as I originally mentioned.

    uploading-with-no-mofifications

    As you can see, Publii is uploading the whole website. This time it is showing “Uploading website (nnn of 479 operations done)” but If I publish new posts the number of operations will increase.

    I mean: the whole website is being uploaded, no matter what I do.

    Thank you very much.

    #3348
    geppettvsgeppettvs

    Hello Tomasz.

    I am attaching a screenshot of my Publii uploading the blog. I didn’t commit any change, didn’t change anything. Just opened the application and hit the “Sync your website” button as I originally mentioned.

    uploading-with-no-mofifications

    As you can see, Publii is uploading the whole website. This time it is showing “Uploading website (nnn of 479 operations done)” but If I publish new posts the number of operations will increase.

    I mean: the whole website is being uploaded, no matter what I do.

    Thank you very much.

    I am now attaching a new screenshot. Publii finished uploading the whole website 15 minutes after I posted my previous answer.

    uploading-finished

    So, I guess it is not doing the file checksum.

    Any ideas?

     

    #3353
    Tomasz DziudaTomasz Dziuda
    Moderator

    Could you check if there is files.publii.json file on your server and if it is not corrupted?

    --
    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!

    #3359
    geppettvsgeppettvs

    Tomasz,

    I have checked on my web server and I can see the file files.publii.json does exist in the root of the blog folder, as you can see highlighted on this screenshot.

    publii-the-file-exists

    The file contents seems not to be corrupted, as I can open this file in nano and the file contents looks human readable, I have checked the rest of the document and everything seems to be fine. Please check this screenshot.

    publii-file-contents-nano

    The only thing I can’t understand, is why the elements declarations shows the path as an absolute path and not a relative one.

    I mean, it reads:

    {
    "path": "/1er-sincronizada-2020/index.html",
    "type": "file",
    "md5": "0f1c47053ce17ef69adf5ee04b63bb76"
    },

    Where the path is /1er-sincronizada-2020/index.html, nevertheless, the absolute path on the server would be something starting with /home/USERNAME/public_html/blog/…

    I am aware that the local paths will be different, based on my preferences and I don’t know if the path is just a part of the full path and the program itself will do something to gather the proper server’s folders information in order to run file checksums.

    If this is not the normal behavior and you think I need to do something to fix this problem with the paths, do you mind telling me where can I set this variable?

    Thanks in advance.

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