Giter Site home page Giter Site logo

oika / astro-notion-blog-multi-lang Goto Github PK

View Code? Open in Web Editor NEW

This project forked from otoyo/astro-notion-blog

0.0 0.0 0.0 1.31 MB

๐Ÿš€ Begin building your very own Notion Blog with Astro.

Home Page: https://astro-notion-blog.pages.dev/

License: MIT License

JavaScript 24.78% TypeScript 29.99% CSS 1.39% Astro 43.83%

astro-notion-blog-multi-lang's Introduction

English | ๆ—ฅๆœฌ่ชž

astro-notion-blog-multi-lang

GitHub stars GitHub license

This is a fork repository of astro-notion-blog.

Differences from the original

The differences from the original (as of v0.9.2) are as follows

  • Difference in layout
    • Site name will be displayed on the header image
    • Eye-catching images are also displayed on article pages (settings can be changed)
  • Multilingual support
    • You can publish articles by language
  • Other (for developers)
    • Updated Astro from V3 to V4
    • Added exclusion control so that the process of acquiring article information from Notion is not executed more than once
    • Reviewed type definitions and corrected all type errors
      • Added type checking at build time

DEMO: https://astro-notion-blog-multi-lang.pages.dev/en/

How to use

Please refer to the original repository for basic installation procedures.

In addition, the following steps are required for multilingual support.

  • Please add the following properties to the Notion database
    • Language
      • Multi select
      • Define language keys such as ja, en, zh, etc as option.
      • Please select the language of the article with this property
    • Meta
      • Checkbox
      • Do not check this box for regular articles
  • Please create the following notes (for the number of languages) in the database
    • Note name: Title of the site
    • Excerpt: Description of the site
    • Date: Please use a date in the past, such as 2000/01/01
    • Published: Checked
    • Meta: Checked
    • Slug: title
    • Language: Target language

You can also duplicate this template for your own use.

Addition of supported languages

By default, Japanese, English, and Chinese are supported. If you want to add other languages, the following source modifications are required in the forked repository.

  • astro.config.mjs
    • In defineConfig, add languages to i18n.locales
  • content-constants.ts
    • Add languages to LANGUAGE_KEYS, LANGUAGE
    • Add label texts to HEADING

Change Settings

The following can be changed by rewriting src/setting.ts.

  • layout
    • showsFeaturedImageInPostPage: Whether to display the eye-catching image on the article page as well
    • siteTitleColor: Text color of site title
  • i18n
    • defaultLanguage: Default language
      • Also change i18n.defaultLocale in astro.config.mjs.

astro-notion-blog-multi-lang's People

Contributors

otoyo avatar oika avatar suzu-gears avatar trickstar13 avatar michiof avatar hkob avatar mosugi avatar norikt avatar

astro-notion-blog-multi-lang's Issues

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.