Giter VIP home page Giter VIP logo

osmium's Introduction

Osmium logo
Osmium

A static blog site builder. Powered by Notion and Next.js

Osmium is a heavily-modded version of the awesome Nobelium

Powered by Vercel


Highlights

🚀 It’s fast

  • Fully leverage SSR/SSG to pre-render pages as much as possible
  • Use Notion’s private API to ensure data-fetching efficiency

😌 It’s easy

  • Use only Notion and you got a fully functional blog
  • Manage your blog and posts in familiar Notion way

🤖 It’s smart

  • Auto-build-and-deploy your blog without any manual commands (if you are using Vercel or Netlify)
  • Once deployed, just write your blog and posts will automatically update thanks to ISR

Quick Start

  • In GitHub
  • In Notion
    • Duplicate this Notion Database, and share to web (optional but recommended)
    • In the newly created database, find Config and open it
    • Open the Osmium configurator, fill the form with your preferences and click the top-right button to copy your config
    • Back to the page Config in Notion, remove the content of the code block and paste your config into it
    • (Optional) Change the icon of the Config page. You can choose whichever type you like, no matter emoji or icon or image. That will be the logo and favicon of you blog
  • In Vercel (recommended) or other platform you choose to deploy to
    • If you use Vercel, create a new project and link to your Osmium fork, then set the following environment variables:
      • NOTION_DATABASE_ID: The ID of the Notion Database you just created, usually a 32-digit or 36-digit hex code. You can find it from the page link in the share menu of the page. If you find two IDs, use the first one
      • NOTION_ACCESS_TOKEN (optional, not recommended): If you decide not to share your database, you can make Osmium grabbing data privately with the token. You can find it after the name token_v2 in your browser cookies
        • Notes: Notion token is only valid for 180 days. Don’t forget to update it in Vercel project settings before expiry. We’ll probably switch to the Notion Public API to resolve this issue in the future. Also, images may not be properly displayed in this case
    • If you are not a Vercel user, just build and deploy your fork as a normal Next.js app with the environment variables described above
  • You are all set! Would you star this project? 🌟

Migrate from Nobelium

See https://osmium-blog.vercel.app/migrate-from-nobelium

FAQs

See https://osmium-blog.vercel.app/faqs

License

MIT

osmium's People

Contributors

fishpigbird avatar silentdepth 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

Watchers

 avatar  avatar  avatar

osmium's Issues

Issue with Vercel Deployment

DB is shared publicly
NOTION_DATABASE_ID
NOTION_ACCESS_TOKEN
Envs both set

Fetching config...
Calling `getPage` with ["34e19677-475e-4c80-af8f-5c8ae2dfc830"]
node:internal/process/promises:288
            triggerUncaughtException(err, true /* fromPromise */);
            ^
HTTPError: Response code 401 (Unauthorized)
    at Request.<anonymous> (/vercel/path0/node_modules/.pnpm/[email protected]/node_modules/got/dist/source/as-promise/index.js:118:42)
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  code: 'ERR_NON_2XX_3XX_RESPONSE',
  timings: {
    start: 1711363761941,
    socket: 1711363761943,
    lookup: 1711363761944,
    connect: 1711363761947,
    secureConnect: 1711363761954,
    upload: 1711363761954,
    response: 1711363762075,
    end: 1711363762078,
    error: undefined,
    abort: undefined,
    phases: {
      wait: 2,
      dns: 1,
      tcp: 3,
      tls: 7,
      request: 0,
      firstByte: 121,
      download: 3,
      total: 137
    }
  }
}
Node.js v18.19.1
 ELIFECYCLE  Command failed with exit code 1.
Error: Command "pnpm run build" exited with 1

[UI Improvement] Code block copy bottom

When I click the code block's copy bottom, the "copied" prompt will exceed the original scope of the code block.
Example

If the code line's length exceed the passage's width, when I scroll the code, It looks a little wired.
Example

Suggestion: delete this copy bottom

【功能讨论】画廊或正文点击page的反馈

osmium画廊展示
notionnext画廊展示

在画廊中和正文中点击

  • 在osmium中点击画廊或正文项目直接跳转至Notion。
  • 在notionnext中点击画廊是查看图片

讨论

画廊就可查看图片和点击属性即可。现在的跳转至Notion不是理想操作。
对于正文中的page项目,应该怎么办呢?直接跳转到notion?还是直接屏蔽?还是缓存?

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.