Zenn CLI Installation and Project Creation
-
Installing Zenn CLI
Zenn CLI allows you to write and preview articles or books in your local environment. First, we will use npm (Node.js package manager) to install Zenn CLI.
npm install zenn-cli --global
-
Creating a New Zenn Article
zenn new:article
GitHub Setup
- Create a GitHub Repository
- Access the GitHub website and sign in.
- Click the '+' icon on the top right of the homepage and select 'New repository'.
- Input the repository name (e.g., zenn-contents). While the name is up to you, zenn-contents is recommended.
-
Push the Zenn Project to the GitHub Repository
- Clone the new GitHub repository using the following command:
git clone [GitHub Repository URL]
- Move to the cloned repository directory and copy the Zenn project contents there.
- Commit and push the changes to the GitHub repository with:
git add . git commit -m "Initial commit" git push origin main
Editing and Publishing the Article
- Edit the Article in VSCode
- Open Visual Studio Code (VSCode).
- Select 'File' > 'Open' and open the cloned GitHub repository.
- Edit the markdown file inside the
articles
directory with your article content.
- Push Changes to GitHub
- Click on the Git icon on the left sidebar in VSCode.
- Stage the changes, input a commit message, then click the '✓' button to commit.
- Click the '...' icon above and select 'Push' to push the changes to GitHub.
- GitHub Integration on Zenn
- Access the Zenn website and log in.
- From the dashboard, select 'GitHub Integration'.
- Follow on-screen instructions to integrate GitHub with Zenn.
- Publish the Article on Zenn
- Navigate to your Zenn dashboard.
- Click on 'Articles' and then click the 'Publish' button next to the article you wish to release.
Top comments (0)