Giter Site home page Giter Site logo

soph-iest's Introduction

soph-iest -- personal website

Deployed at www.soph-iest.me.

Building + Deployment

  • Built with yarn build, and exported to /docs/ with yarn export. You really shouldn't be editing the /docs/ directory manually, as it's simply the static exports of the full build used for deployment.

Tech Stack

The site is built through and through with React, using the Next.js framework for deployment. The site is built statically, and hosted through GitHub Pages. The overall structure is built for scalability -- it's already set up to be run server-side, but is being deployed statically in the meantime until that becomes desirable.

Internationalization

The structure for the translation of the site is something I've cooked up just for this project. Though the site was originally built with i18next middleware, that setup tends to create a lot of weird Schrodinger's bugs in my experience, and it also doesn't lend itself well to static deployment.

Thus, the current build. The components take in a prop (jp) indicating which language to render in: the text, and items that should/should not appear are conveniently set up with simple ternaries using the prop as the condition. This prop is passed from the page-level, where each page is set up to an appropriate URL using the /pages/ folder, with alternate languages set up with nested pages (meaning the URL for, say, the Japanese version of the contact page is then .../contact/jp -- in my opinion, a pretty intuitive way to manage URLs for locales). The prop is current set up to simply be a boolean for optimization purposes, because at no point will I be implementing any other languages beyond the 2nd; however, it should be obvious that this could easily be switched to a short string, such as the language code, with some light refactoring.

When building a new component, just make sure you take in a prop (jp) and then render text or components conditionally on that prop. Pages should be duplicated; the page should be put under a folder with its intended name, and an "index.js" page, plus a "jp.js" page where the Layout and Component each are passed a jp={true} parameter.

If you're looking for an internationalization system for a web application of your own -- I probably wouldn't recommend this setup. The build pattern is very customized to my own specific use case -- static development and deployment, for exactly 2 languages, with 1 language preferred for all users, and components that should only render in some languages. Thus, for others using next.js and looking for an internationalisation framework, I'd probably recommend i18next -- optimally the direct framework approach, rather than routing it with middleware.

soph-iest's People

Contributors

amity avatar

soph-iest's Issues

Resume

Upload resume, displayed on its own page?

About - site page

Meta : include link to this repo, plus indicate structure, and thanks (Bootstrap, etc, lol)

Fully-featured project pages

Each major project should have a small page, accessible by clicking the portfolio carousel link.
These can be a re-usable component, and include a brief summary, photos, and links to the repos / deployments.

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.