a source code of my personal website and blog
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docker
docs
scaffolds
source
themes/custom
.ftpconfig
.gitignore
Dockerfile
LICENSE
Makefile
README.md
_config.yml
deploy.sh
package.json

README.md

overview

this is source of wittchen.io website

contents

installing

git clone https://github.com/pwittchen/wittchen.io.git
cd wittchen.io/
make install

to upgrade project dependencies, type:

npm-upgrade

if you encounter EACCESS errors during resolving dependencies, take a look at npm docs

you can also call sudo npm install --unsafe-perm instead of npm install

running

make run

docker

please note: in order to prepare this docker image correctly, you need to have npm and hexo installed locally; in this case, generated files will be just copied into the docker image and served via simple HTTP server and Python; it's not the best approach and it can be improved in the future

  • to create container, type: make docker_build
  • to run created container, type: make docker_run
  • to kill running container, type: make docker_kill
  • to delete created container, type: make docker_delete

update

git add -p
git commit
git push

secrets

configure FTP credentials in .ftpconfig file

we're using custom deploy.sh bash script with lftp under the hood because default ftpsync deployment is buggy, flaky and often doesn't work

we don't want to commit FTP credentials to any remote repo

to protect them, type:

make protect_secrets

to expose secrets again, type:

make expose_secrets

please note: protect_secrets rule is invoked during install rule

deployment

make deploy

theme

this blog has customized hexo theme based on apollo

to generate *.css file from *.scss and rebuild theme, type:

make theme

after that gulp will be in watching mode and if you want to stop it, press Ctrl+C

writing

to generate new post, type:

hexo new post <title>

to generate new draft, type:

hexo new draft <title>

to publish draft, type:

hexo publish <title>

to create new page, type:

hexo new page <title>

to discard uncommited changes and files in posts, drafts and pages, type:

make discard

rest

you can use the following REST API:

GET /api/site.json
GET /api/posts.json
GET /api/posts/{page_number}.json
GET /api/tags.json
GET /api/tags/{tag_name}.json
GET /api/articles/{article_id}.json
GET /api/pages/{page_id}.json

docs

  • to generate docs, type: make docs
  • to update docs, type: make update_docs
  • to clean docs, type: make clean_docs
  • to run website with docs, type: make run_docs

tools

the following tools were used during development of this site: