-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
38 changed files
with
2,239 additions
and
841 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
{ | ||
"endOfLine": "auto", | ||
"pluginSearchDirs": ["."] | ||
"endOfLine": "auto" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"presets": [ | ||
[ | ||
"@babel/preset-react", | ||
{ "runtime": "automatic", "importSource": "preact" } | ||
], | ||
[ | ||
"@babel/preset-env", | ||
{ | ||
"targets": { | ||
"node": "current" | ||
} | ||
} | ||
] | ||
] | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
const path = require("path"); | ||
|
||
const { jsx } = require("preact/jsx-runtime"); | ||
const { render: renderToStaticMarkup } = require("preact-render-to-string"); | ||
|
||
let Provider; | ||
|
||
module.exports = { | ||
outputFileExtension: "html", | ||
init() { | ||
require("@babel/register")({ | ||
extensions: [".jsx"], | ||
}); | ||
const jsFuncs = this.config.javascriptFunctions; | ||
const ProviderFC = require("../src/_includes/EleventyContext.jsx").default; | ||
Provider = ({ children }) => jsx(ProviderFC, { value: jsFuncs, children }); | ||
}, | ||
compile(_, inputPath) { | ||
return function (data) { | ||
const Component = require(resolveInputPath(inputPath)).default; | ||
const html = renderToStaticMarkup( | ||
jsx(Provider, { children: jsx(Component, data) }) | ||
); | ||
return html.startsWith("<html") ? `<!DOCTYPE html>${html}` : html; | ||
}; | ||
}, | ||
read: false, | ||
getData(inputPath) { | ||
return require(resolveInputPath(inputPath)).data; | ||
}, | ||
compileOptions: { | ||
permalink: "raw", | ||
}, | ||
}; | ||
|
||
/** @param {string} inputPath */ | ||
const resolveInputPath = (inputPath) => path.join(process.cwd(), inputPath); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { useEleventy } from "./_includes/EleventyContext"; | ||
|
||
export const data = { | ||
permalink: "404.html", | ||
}; | ||
|
||
export default (props) => { | ||
const { sassinline } = useEleventy(); | ||
return ( | ||
<html lang="ja"> | ||
<head> | ||
<meta charSet="UTF-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<title>404 Not Found</title> | ||
<link rel="icon" href="/favicon.ico" /> | ||
<link rel="stylesheet" href="https://use.typekit.net/bdo3rru.css" /> | ||
<style | ||
dangerouslySetInnerHTML={{ | ||
__html: sassinline("portfolio-critical.scss"), | ||
}} | ||
/> | ||
</head> | ||
|
||
<body className="body-layout"> | ||
<main className="main-content"> | ||
<div className="nav-title"> | ||
<h2 className="subtitle"> | ||
<a href="/" className="_uncolor"> | ||
Honai Ueoka's Portfolio | ||
</a> | ||
</h2> | ||
<h1 className="title">404 Not Found</h1> | ||
</div> | ||
</main> | ||
</body> | ||
</html> | ||
); | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
export const BlogHeader = () => ( | ||
<header class="site-header"> | ||
<div class="title"> | ||
<a href="/blog/" class="_reset-a"> | ||
Honai's Blog | ||
</a> | ||
</div> | ||
</header> | ||
); |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.