drfeely.com/website/app/(pages)/articles/(content)/new_article

26 lines
383 B
Text
Raw Normal View History

2023-08-26 17:05:20 +00:00
#!/bin/sh
for arg in $@; do
mkdir ${arg}
component_name="Article$(echo ${arg} | sed -e 's/-\(.\)/\U\1/g;s/^\(.\)/\U\1/;s/-//g')"
cat > "${arg}/page.tsx" <<EOF
import Article from "@/components/Article";
const ${component_name} = () => {
return (
<Article
title=""
author=""
>
</Article>
);
};
export default ${component_name};
EOF
done