Code Monkey home page Code Monkey logo

hatena-blog-theme-boilerplate's People

Contributors

kga avatar nsk-1010 avatar susisu avatar ueday 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

Watchers

 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

hatena-blog-theme-boilerplate's Issues

Google Chrome is getting CORS errors

発生している問題

  • Chromeでは公開ウェブサイトからプライベートネットワークエンドポイントへの直接アクセスを非推奨としている
  • そのため、現在の設定でアクセスするとCORSエラーとなってしまう
  • Access-Control-Request-Private-Network: trueAccess-Control-Allow-Private-Network: trueを含む必用があるようです1
  • また、その設定をしてもstylesheetの credential mode が incluedeになっているようでアクセスできないようです2

解決策

  • Access-Control-Request-Private-Network: trueAccess-Control-Allow-Private-Network: truevitejs/vite#7134 (comment) で会話されている設定をすることで反映することができそうです。
  ...
  css: {
    devSourcemap: true,
    postcss: {
      plugins: [autoprefixer()],
    },
  },
+  plugins: [
+    {
+      name: "configure-response-headers",
+      configureServer: (server) => {
+        server.middlewares.use((_req, res, next) => {
+          res.setHeader("Access-Control-Request-Private-Network", "true");
+          res.setHeader("Access-Control-Allow-Private-Network", "true");
+          next();
+        });
+      },
+    },
+  ],
};
  • credential modeについてはcrossorigin="anonymous"とするとアクセスできるかと思います。

    <script type="module" src="http://localhost:5173/@vite/client"></script>
    <link rel="stylesheet" crossorigin="anonymous" type="text/css" href="http://localhost:5173/scss/boilerplate.scss" />

Footnotes

  1. Private Network Access: introducing preflights  |  Blog  |  Chrome for Developers

  2. Link Tag Helper と Script Tag Helper (CORE)

httpsでのbrowser-sync実行方法について

はてな担当様

新規にサブサイトを作成したらアドレスはhttpsでした。
npm start を実行してもbrowser-syncはhttpのアドレスしか認識してなく自動更新されません。

ローカル環境のアクセス先:
Local: http://localhost:3000
External: http://192.168.3.8:3000
管理画面のアクセス先:
UI: http://localhost:3001
UI External: http://192.168.3.8:3001

質問:
pacage.jnsnのbrowser-syncにどのようなオプションを追加すれば
httpsのサイトと同期できるか教えて頂けないでしょうか。

宜しくお願いいたします。

node-sassのバージョンによりNode jsのバージョン指定が必要

こちらのデザインテーマを動かした際の発見を報告させてもらいます。

node-sass が動作するNodeのバージョンは指定があります。

https://github.com/sass/node-sass#node-version-support-policy

現状のnode-sassのバージョンだと、対応するNodeのバージョンはNode 8です。
私の環境(Node 16がインストールされている)だと、npm install で詰まりました。

対応するNode 16に対応するnode-sass 7.0.1 にバージョンアップすると npm install および npm run scss が実行可能になったことを共有しておきます。

.entry-content pre の font-size が重複している

_core.scssファイルにおいて、.entry-content pre内にfont-sizeプロパティが2回登場し、重複しています。

    pre {
        background: $bg-light;
        border: none;
        white-space: pre-wrap;
        text-overflow: ellipsis;
        font-size: 100%;
        line-height: 1.3;
        font-size: .8rem;
        padding: 10px;
        & > code {
            margin: 0;
            padding: 0;
            white-space: pre;
            border: none;
            background-color: transparent;
            font-family: 'Monaco', 'Consolas', 'Courier New', Courier, monospace, sans-serif;
        }
    }

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.