arktronic / ecto1

Ghost blog downloader/scraper/static-site-maker
ISC License
6 stars 1 forks source link

How to use `ecto1` package to publish ghost blog to github pages #1

Closed diliprk closed 2 years ago

diliprk commented 2 years ago

Hello Ark, I am trying to push a static version of my ghost blog to GitHub pages and I came across your ecto1 repo which says it can do static site generation. I did ghost install local and setup my ghost blog on my local Mac computer. How do I push the static version of this ghost blog from my Mac to Github pages (repo) using ecto1 ?

Most blogs only write about ghost static site generation using a packaged called buster running on python2.7 which is deprecated. Could you kindly share any tutorial or documentation to achieve this using ecto1?

Best Regards, Dilip

arktronic commented 2 years ago

Hi Dilip,

The ecto1 script scrapes the contents of a Ghost blog and downloads them into a directory named public. You can then upload the contents of that directory to GitHub Pages. Does that help?

Thanks, Sasha

diliprk commented 2 years ago

I am looking for an alternative to buster or some easy way to create a static site from my local host ghost blog. So i hope ecto1 is an option for this?

Some references: https://elrakabawi.github.io/blog/2017/12/28/installing-ghost-on-github-with-buster-mac-os-x/index.html

https://inesmartins.github.io/simplest-way-to-host-your-ghost-blog-on-github-pages/index.html

On Mon, 28 Nov, 2022, 9:41 pm Sasha Kotlyar, @.***> wrote:

Hi Dilip,

The ecto1 script scrapes the contents of a Ghost blog and downloads them into a directory named public. You can then upload the contents of that directory to GitHub Pages. Does that help?

Thanks, Sasha

— Reply to this email directly, view it on GitHub https://github.com/arktronic/ecto1/issues/1#issuecomment-1329360321, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE3DPA345CYLYRBNEUFX4ITWKTKRHANCNFSM6AAAAAASND6JAI . You are receiving this because you authored the thread.Message ID: @.***>

arktronic commented 2 years ago

Hi Dilip,

Since I've never used Buster, I cannot give you a migration guide. The process should be similar, however, to the sites you linked: while the Ghost instance is running, you would execute ecto1 with the necessary parameters specified (see the README), and a static website will be saved to a newly created public directory. You would then upload the contents of that directory to a GitHub repo for publishing via GitHub Pages.

Thanks, Sasha

diliprk commented 2 years ago

Hi Sasha, Thank you for your feedback, I set the environment variables in vim .bash_profile on my Mac

export ECTO1_SOURCE=http://localhost:2368
export ECTO1_TARGET=https://qubitquants.github.io

and then I copied your ecto1.py and serve.py scripts to my local ghost folder containing my local website. I ran them using python3 ecto1.py to first generate the static site and then later python3 serve.py to preview the statically generated site on localhost:8000 and it worked. After that, I pushed the public folder (which I renamed to static in both your scripts) to the Github pages public Git Repo.

My Site is now live at: https://qubitquants.github.io/

arktronic commented 2 years ago

Hi Dilip,

Just so you're aware, you do not need to set those environment variables in your bash profile. You can prepend them to the python3 ecto1.py command as shown in the README instead. This makes it easier if you have multiple sites, etc.

Thanks, Sasha