Code Monkey home page Code Monkey logo

blog's Introduction

blog

This is the blog that powers rauchg.com, built on next.js and deployed to the cloud via Vercel.

How to run

First, install Vercel CLI.

Development

vc dev

Deployment

Staging

vc

This is the equivalent of submitting a PR with the GitHub integration

Production

vc --prod

This is the equivalent of git push to master (or merging a PR to master)

Architecture

Pure components

Every stateless pure component is found under ./components.

Every component that has to do with styling the post's markup is found under ./components/post/

These components make up the style guide of the application.

Blog posts

Every blog post is a static page hosted under pages/$year/.

This allows every post to load arbitrary modules, have custom layouts and take advantage of automatic code splitting and lazy loading.

This means that the bloat of a single post doesn't "rub off on" the rest of the site.

An index of all posts is maintained in JSON format as ./posts.json for practical reasons.

blog's People

Contributors

alexcarpenter avatar aranajhonny avatar arun-is avatar awareness481 avatar chibicode avatar cpojer avatar dependabot[bot] avatar huozhi avatar leerob avatar leo avatar lfades avatar markozxuu avatar martinstarman avatar perstirpes avatar rauchg avatar shuding avatar styfle avatar trace2798 avatar tywayne avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

blog's Issues

Implement lightbox for images

When an image is being rendered smaller than the original, ideally upon hovering it would render a 🔍 cursor, and upon tapped, we render the large image version in a lightbox.

This would apply to both images embedded in tweets and otherwise.

Firebase DB views permissions

I'm seeing some permissions errors:
permission_denied at /views/foo: Client doesn't have permission to access the desired data. Could you share your firebase database rules json? Do you open up read/write to public for this? Thanks!

License

I took lots of design and some development (css for projects page and fonts) inspiration from your site for my own, but just noticed your repo doesn't have a license.

Is this okay with you? I'd be happy to change mine if you are not comfortable with my usage.

Overflow-x issue on Blog/2020/static-hoisting.js

Context

Initially I thought the overflow-x issue included all the blog posts but it was only for the latest blog post Static Hoisting

That led me to believe that the issue wasn't in the default styles of the website but rather something specific in the 'Static Hoisting' blog post.

The bug happens due to the following code on static-hoisting.js

<div style={{ marginTop: "30px", height: "710px" }}>
      <div
        style={{
          position: "absolute",
          left: 0,
          width: "100vw",
          background: "#eee",
          padding: "30px 0 35px",
          display: "flex",
          alignItems: "center",
          justifyContent: "center"
        }}
      >
        <div className="mobile-diagram-wrapper">
          <Diagram />
        </div>
      </div>
    </div>

As far as I understand, the fact that we have a vertical-scrolling bar means that width: 100vw will exceed the available screen size because of the vertical scrolling bar taking a finite amount of space.

While not an absolute authority, Stackoverflow seems to support my assertion.

My suggested fix would be simply using

max-width: 100%

Although it is only a two character change I'm submitting a PR so I can include this under my resume/achievements.

ES6 string checking

Should we change (res.info.match(/^h2/)) to (res.info.includes("h2")) (ES6) ?

Multiple-second delay for loading in-site links with no visual feedback

Whenever I click one of the essay links, it takes multiple seconds for anything to happen (usually 3), there is no feedback for this, so when it first happened, it took long enough for me to think clicking was broken, and I started cmd-clicking the different links, only after a few more seconds to go back to the original tab and noticed it had finally changed article.

I saw you had a tweet for using Rico's progress bar thing, that would go a log way.

For several of my own apps, I would do a gradual fade out of opacity for the page which works just as well: https://github.com/browserstate/ajaxify/blob/f086e25d691f0a2da39427369063c4324c134d7d/ajaxify-html5.js#L112-L115

vc dev:error

Vercel CLI 30.2.3

Running Dev Command “next dev --port $PORT”
ready - started server on 0.0.0.0:3000, url: http://localhost:3000
Ready! Available at http://localhost:3000
warn - You have enabled experimental features (appDir, mdxRs) in next.config.js.
warn - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

info - Thank you for testing appDir please leave your feedback at https://nextjs.link/app-feedback
event - compiled client and server successfully in 1119 ms (262 modules)
wait - compiling...
event - compiled client and server successfully in 174 ms (262 modules)
wait - compiling /middleware (client and server)...
event - compiled successfully in 172 ms (59 modules)
wait - compiling /page (client and server)...
event - compiled client and server successfully in 2.2s (797 modules)
error - node_modules/@upstash/redis/esm/platforms/nodejs.js (27:36) @ startsWith
error - Error [TypeError]: Cannot read properties of undefined (reading 'startsWith')
at new Redis (webpack-internal:///(sc_server)/./node_modules/@upstash/redis/esm/platforms/nodejs.js:30:37)
at eval (webpack-internal:///(sc_server)/./app/redis.ts:7:15)
at (sc_server)/./app/redis.ts (/Users/alita/Downloads/blogtest/blog/.next/server/app/page.js:1921:1)
at webpack_require (/Users/alita/Downloads/blogtest/blog/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///(sc_server)/./app/get-posts.ts:6:64)
at (sc_server)/./app/get-posts.ts (/Users/alita/Downloads/blogtest/blog/.next/server/app/page.js:1844:1)
at webpack_require (/Users/alita/Downloads/blogtest/blog/.next/server/webpack-runtime.js:33:42)
at eval (webpack-internal:///(sc_server)/./app/page.tsx:9:68)
at (sc_server)/./app/page.tsx (/Users/alita/Downloads/blogtest/blog/.next/server/app/page.js:1899:1)
at Function.webpack_require (/Users/alita/Downloads/blogtest/blog/.next/server/webpack-runtime.js:33:42) {
digest: undefined
}
null

Unable To Make Changes In Code + Website Title + Links After Converting Into Static HTML Export

I have followed this tutorial https://learnnextjs.com/excel/static-html-export to export your website to this https://mrwullah.github.io/wu/.

Now I made some changes into the website title and urls which didn't reflect from here: https://github.com/mrwullah/wu

Then I made changes offline, and uploaded it to: https://github.com/mrwullah/min which hides my 'out' folder entirely. These changes are reflected in localhost machine.

Please advise accordingly.

Duplicate line in Static Hoisting post

Since [Next.js 9](https://nextjs.org/blog/next-9#automatic-static-optimization), the next build process has started automatically outputting the optimal asset on a per-page
Since [Next.js 9](https://nextjs.org/blog/next-9#automatic-static-optimization), the next build process has started automatically outputting the optimal asset on a per-page (entrypoint) basis. Futher, with [Next.js 9.3](https://nextjs.org/blog/next-9-3#next-gen-static-site-generation-ssg-support) the hooks for static-site generation were refined, and [incremental static generation](https://static-tweet.now.sh/) was introduced for [appending](https://static-tweet.now.sh/#incremental-static-generation) and [updating](https://nextjs.org/blog/next-9-5#stable-incremental-static-regeneration) pages.

npm install fails

2532 verbose stack Error: [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
2532 verbose stack Exit status 1
2532 verbose stack     at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:304:16)
2532 verbose stack     at EventEmitter.emit (events.js:182:13)
2532 verbose stack     at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14)
2532 verbose stack     at ChildProcess.emit (events.js:182:13)
2532 verbose stack     at maybeClose (internal/child_process.js:961:16)
2532 verbose stack     at Process.ChildProcess._handle.onexit (internal/child_process.js:248:5)
2533 verbose pkgid [email protected]
2534 verbose cwd /Users/user/Sites/trial-apps/rauchg-blog
2535 verbose Darwin 17.7.0
2536 verbose argv "/usr/local/Cellar/node/10.7.0/bin/node" "/usr/local/bin/npm" "install"
2537 verbose node v10.7.0
2538 verbose npm  v6.2.0
2539 error code ELIFECYCLE
2540 error errno 1
2541 error [email protected] install: `node-pre-gyp install --fallback-to-build --library=static_library`
2541 error Exit status 1
2542 error Failed at the [email protected] install script.

implement an rss feed for readers

just found your blog via twitter, and would love to see a an rss feed so I can read from my reader and don't have to check back once in a while

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.