{"id":25195153,"url":"https://github.com/siongui/userpages","last_synced_at":"2025-05-08T02:46:14.596Z","repository":{"id":11475846,"uuid":"13944800","full_name":"siongui/userpages","owner":"siongui","description":"my blog for sharing (source code for siongui.github.io)","archived":false,"fork":false,"pushed_at":"2024-07-21T13:54:16.000Z","size":149332,"stargazers_count":72,"open_issues_count":3,"forks_count":28,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-31T16:53:10.096Z","etag":null,"topics":["blog","go","gopherjs","html","javascript","pelican","python"],"latest_commit_sha":null,"homepage":"https://siongui.github.io/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siongui.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2013-10-29T02:39:13.000Z","updated_at":"2025-01-04T10:39:56.000Z","dependencies_parsed_at":"2024-07-21T15:24:29.467Z","dependency_job_id":null,"html_url":"https://github.com/siongui/userpages","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siongui%2Fuserpages","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siongui%2Fuserpages/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siongui%2Fuserpages/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siongui%2Fuserpages/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siongui","download_url":"https://codeload.github.com/siongui/userpages/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252989941,"owners_count":21836665,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","go","gopherjs","html","javascript","pelican","python"],"created_at":"2025-02-10T00:50:22.423Z","updated_at":"2025-05-08T02:46:14.579Z","avatar_url":"https://github.com/siongui.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"===============\nHow to Develope\n===============\n\n.. image:: https://img.shields.io/badge/Language-Python-blue.svg\n   :target: https://www.python.org/\n\n.. image:: https://img.shields.io/badge/Language-Go-blue.svg\n   :target: https://golang.org/\n\n.. .. image:: https://godoc.org/github.com/siongui/paligo?status.svg\n   :target: https://godoc.org/github.com/siongui/paligo\n\n.. image:: https://github.com/siongui/userpages/workflows/Pelican%20site%20CI/badge.svg\n    :target: https://github.com/siongui/userpages/blob/master/.github/workflows/pelican.yml\n\n.. .. image:: https://travis-ci.org/siongui/userpages.svg?branch=master\n    :target: https://travis-ci.org/siongui/userpages\n\n.. image:: https://gitlab.com/siongui/siongui.gitlab.io/badges/master/pipeline.svg\n    :target: https://gitlab.com/siongui/siongui.gitlab.io/-/commits/master\n\n.. .. image:: https://goreportcard.com/badge/github.com/siongui/paligo\n   :target: https://goreportcard.com/report/github.com/siongui/paligo\n\n.. image:: https://img.shields.io/badge/license-Unlicense-blue.svg\n   :target: https://github.com/siongui/userpages/blob/master/UNLICENSE\n\n.. See how to add travis ci image from https://raw.githubusercontent.com/demizer/go-rst/master/README.rst\n   https://github.com/demizer/go-rst/commit/9651ab7b5acc997ea2751845af9f2d6efee825df\n\nDevelopment Tool: Pelican_ (static site generator written in Python)\n\nDevelopment Environment: `Ubuntu 20.04`_\n\n\nFirst-time Setup\n----------------\n\n1. On a fresh/clean installation of Ubuntu, update system first. Otherwise will\n   get unable to locate package error.\n   See `this SO answer \u003chttps://stackoverflow.com/a/58072486\u003e`__.\n\n   .. code-block:: bash\n\n     $ sudo apt-get update\n\n2. Install git_ and pip_:\n\n   .. code-block:: bash\n\n     $ sudo apt-get install git\n     $ sudo apt-get install python3-pip\n\n   From the `answer in Ask Ubuntu \u003chttps://askubuntu.com/a/1031733\u003e`_,\n   we can use python-is-python3 and prevent Python 2 from being installed\n   on Ubuntu 20.04\n\n   .. code-block:: bash\n\n     $ sudo apt-get install python-is-python3\n     $ sudo apt-mark hold python2 python2-minimal python2.7 python2.7-minimal libpython2-stdlib libpython2.7-minimal libpython2.7-stdlib\n\n3. Install language packages to add locale (English, Traditional Chinese, and\n   Thai):\n\n   .. code-block:: bash\n\n     $ sudo apt-get install language-pack-en\n     $ sudo apt-get install language-pack-zh-hant\n     $ sudo apt-get install language-pack-th\n\n   Or you can install languages in \"Settings\" -\u003e \"Region \u0026 Language\", which\n   installs more related packages such as fonts for languages.\n\n4. git clone source code:\n\n   .. code-block:: bash\n\n     $ cd\n     $ mkdir dev\n     $ cd ~/dev/\n     $ git clone https://github.com/siongui/userpages.git --depth=1\n     # or clone with full depth\n     $ git clone https://github.com/siongui/userpages.git\n\n5. Install Python tools:\n\n   .. code-block:: bash\n\n     $ cd ~/dev/userpages/\n     $ pip3 install -r requirements.txt\n\n   Note that in `.travis.yml \u003c.travis.yml\u003e`_, pip is actually pip3 if bionic and\n   python 3.8 is set in Travis CI config.\n\n6. Install Pelican `i18n_subsites`_ plugin and download `normalize.css`_:\n\n   .. code-block:: bash\n\n     $ cd ~/dev/userpages/\n     $ make download\n\n7. Generate CSS file:\n\n   .. code-block:: bash\n\n     $ cd ~/dev/userpages/\n     $ make scss\n\n\nDaily Development\n-----------------\n\n.. code-block:: bash\n\n    # start edit and develope\n    $ cd ~/dev/userpages/\n    # re-generate the website and start dev server\n    $ make\n    # open your browser and preview the website at http://localhost:8000/\n\n\nAuto-deploy by GitHub Actions\n-----------------------------\n\nSee `workflow file \u003c.github/workflows/pelican.yml\u003e`_\n\n\nAuto-deploy by `Travis CI`_ (Obsoleted)\n---------------------------------------\n\nSee `GitHub Pages Deployment - Travis CI`_.\n\nFirst save your `personal access token`_ in `repository settings`_.\n\nFor User Pages, the following is sample config:\n\n.. code-block:: yaml\n\n  deploy:\n    provider: pages\n    repo: USERNAME/USERNAME.github.io\n    target_branch: master\n    skip_cleanup: true\n    github_token: $GITHUB_TOKEN\n    local_dir: output\n    on:\n      branch: master\n\nFor Project Pages, the following is sample config:\n\n.. code-block:: yaml\n\n  deploy:\n    provider: pages\n    skip_cleanup: true\n    github_token: $GITHUB_TOKEN\n    local_dir: output\n    on:\n      branch: master\n\n\nDeploy to `GitLab Pages`_ via `GitLab CI/CD`_\n---------------------------------------------\n\nSee `.gitlab-ci.yml \u003c.gitlab-ci.yml\u003e`_.\n\n1. Use `Ubuntu image in Docker Hub \u003chttps://hub.docker.com/_/ubuntu\u003e`_.\n   The *ubuntu:latest* tag points to the \"latest LTS\".\n\n2. Need to update Ubuntu first to install Ubuntu packages.\n   See `this SO answer \u003chttps://stackoverflow.com/a/58072486\u003e`__.\n\n3. `Travis CI`_ can deploy to any repository, but need `personal access token`_\n   to do so.\n   `GitLab CI/CD`_ can deploy to the repository where CI/CD runs without\n   credentials.\n\n\nUNLICENSE\n---------\n\nAll works, including posts and code, of Siong-Ui Te are released in public domain.\nPlease see UNLICENSE_.\n\n\nReferences\n----------\n\n.. [1] `pelican-edit-url \u003chttps://github.com/pmclanahan/pelican-edit-url\u003e`_\n       inspires the *Edit on Github* link.\n\n.. [2] | JINJA_FILTERS in `Settings — Pelican documentation \u003chttp://docs.getpelican.com/en/latest/settings.html\u003e`_\n       | `Jinja custom filters documentation \u003chttp://jinja.pocoo.org/docs/dev/api/#custom-filters\u003e`_\n\n.. [3] | Home Screen Icon on Android/iPhone \u0026 PWA support\n       | `website icon on android home screen - Google search \u003chttps://www.google.com/search?q=website+icon+on+android+home+screen\u003e`_\n       | `Tutorial: Home Screen Icons | Responsive Web Design Training Tutorial | Webucator \u003chttps://www.webucator.com/tutorial/developing-mobile-websites/home-screen-icons.cfm\u003e`_\n       | `pwa manifest - Google search \u003chttps://www.google.com/search?q=pwa+manifest\u003e`_\n       | `WebPageTest - Website Performance and Optimization Test \u003chttps://www.webpagetest.org/\u003e`_\n\n.. [4] | `Add single page application support for Github pages · Issue #408 · isaacs/github · GitHub \u003chttps://github.com/isaacs/github/issues/408\u003e`_\n       | `GitHub - rafgraph/spa-github-pages: Host single page apps with GitHub Pages \u003chttps://github.com/rafgraph/spa-github-pages\u003e`_\n       | `S(GH)PA: The Single-Page App Hack For GitHub Pages — Smashing Magazine \u003chttps://www.smashingmagazine.com/2016/08/sghpa-single-page-app-hack-github-pages/\u003e`_\n       | `GitHub - dmsnell/gh-pages-404-redirect: Can I use a custom 404 handler on GitHub pages to host a routed single-page app? \u003chttps://github.com/dmsnell/gh-pages-404-redirect\u003e`_\n       | `Redirect a GitHub Pages site with this HTTP hack | Opensource.com \u003chttps://opensource.com/article/19/7/permanently-redirect-github-pages\u003e`_\n       | `javascript - Is there a configuration in Github Pages that allows you to redirect everything to index.html for a Single Page App? - Stack Overflow \u003chttps://stackoverflow.com/questions/36296012/is-there-a-configuration-in-github-pages-that-allows-you-to-redirect-everything\u003e`_\n\n.. [5] | `github pages symbolic link - Google search \u003chttps://www.google.com/search?q=github+pages+symbolic+link\u003e`_\n       | `Pages: allow symlinks · Issue #553 · isaacs/github · GitHub \u003chttps://github.com/isaacs/github/issues/553\u003e`_\n       | `Added .nojekyll to workaround symlink issue in GitHub Pages. Ref: isaacs/github#553 · siongui/paligo@b9fe689 · GitHub \u003chttps://github.com/siongui/paligo/commit/b9fe689770d705743a29bd33a3c7583a5c81bec1\u003e`_\n\n\n.. _Pelican: https://blog.getpelican.com/\n.. _Ubuntu 20.04: https://releases.ubuntu.com/20.04/\n.. _git: https://git-scm.com/\n.. _pip: https://pypi.python.org/pypi/pip\n.. _i18n_subsites: https://github.com/getpelican/pelican-plugins/tree/master/i18n_subsites\n.. _normalize.css: https://necolas.github.io/normalize.css/\n.. _Travis CI: https://travis-ci.org/\n.. _GitHub Pages Deployment - Travis CI: https://docs.travis-ci.com/user/deployment/pages/\n.. _personal access token: https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token\n.. _repository settings: https://docs.travis-ci.com/user/environment-variables#defining-variables-in-repository-settings\n.. _GitLab Pages: https://docs.gitlab.com/ee/user/project/pages/\n.. _GitLab CI/CD: https://docs.gitlab.com/ee/ci/\n.. _Google Adsense: https://www.google.com/search?q=Google+AdSense\n.. _UNLICENSE: https://unlicense.org/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiongui%2Fuserpages","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiongui%2Fuserpages","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiongui%2Fuserpages/lists"}