loikein / blog-hugo

好耶,是船新的博客

Home Page:https://blog.loikein.one/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Blog with Hugo

Netlify Status

Well, here we are. Migration purely for new content fun.

Build

Local

# generate pagefind index first
hugo && npm_config_yes=true npx pagefind --source "public"
# run local server
hugo server --buildDrafts --disableFastRender

Codespace

Not in use any more
  • Install Browser Preview (auchenberg.vscode-browser-preview)

  • Install Chrome: (Credit: How to install Chrome browser properly via command line? - Ask Ubuntu)

    cd ..
    
    pwd
    # /workspaces
    
    sudo apt-get install libxss1 libappindicator1 libindicator7
    
    wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
    
    sudo apt install ./google-chrome*.deb
  • Configure the extension with:

    "browser-preview.chromeExecutable": "/usr/bin/google-chrome",
    "browser-preview.ignoreHttpsErrors": true,
    "browser-preview.startUrl": "localhost:1818",
  • Run Hugo server with fixed port: (all options)

    hugo server --buildDrafts --port 1818 --baseURL "https://loikein-blog-hugo-w8cj-1818.githubpreview.dev/"
  • Access https://loikein-blog-hugo-w8cj-1818.githubpreview.dev/ once to log into GitHub.

  • Then can access:

    • localhost:1818 directly from the Browser Preview, or
    • https://loikein-blog-hugo-w8cj-1818.githubpreview.dev/ from iPad, etc.
  • Notice that any draft (only exists on local machine) will not show up.

Refs

About

好耶,是船新的博客

https://blog.loikein.one/

License:GNU Affero General Public License v3.0


Languages

Language:CSS 99.4%Language:HTML 0.6%