Code Monkey home page Code Monkey logo

samdriver-xyz's Introduction

Personal Site

Simple article site without a database.

Running locally

Assuming a Windows machine using WSL and Docker.

docker-compose up -d

Add 127.0.0.1 netdev.samdriver.xyz to your Windows hosts file.

Access site at http://netdev.samdriver.xyz/

Deploying

Assuming you're me, or have stolen the appropriate private key.

rsync -e \"ssh\" -av --info=progress2 --delete --exclude=\".git\" --exclude=\"vendor\" ~/code/samdriver.xyz/ [email protected]:/home/sdriver/samdriver.xyz

Or if using VS Code, run the sync-live task.

Converting Images

Convert images to webp when possible. This will work well in the majority of cases. Consider switching -near_lossless 60 for -q 80 (or similar) if dealing with photos. If images have important colour information encoded along with alpha (e.g. a 4 channel texture) add the -exact option.

for f in *.png; do cwebp -near_lossless 60 "$f" -o "${f%.png}.webp"; done

Dependencies

The base site project intentionally has no dependencies for the live version other than PHP itself.

It does have development dependencies for automated tests. These are not required for the project to function, and do not need to be present on a live server.

Some pages are built using various JavaScript tools. Look for a readme.md in their directory within public/article-data.

Testing

docker-compose run --rm phpunit tests/

Currently the project uses a different autoloader for testing than it does for live. The testing autoloader is provided by Composer, while the "real" autoloader is found at ./app/autoloader.php.

Article Specific Building

Some articles use build tools to prepare JavaScript, for example complex-refraction. If there are build steps required, there will also be a readme.md file explaining them.

TODO

  • Auto-generate outline on side of articles.
  • Update Docker version to use Apache, to match server.

samdriver-xyz's People

Contributors

anatta336 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.