Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dispherical/gitme
https://github.com/dispherical/gitme
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/dispherical/gitme
- Owner: dispherical
- Created: 2020-11-22T02:02:01.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2021-06-01T15:45:29.000Z (over 3 years ago)
- Last Synced: 2024-10-27T13:48:51.310Z (3 months ago)
- Language: JavaScript
- Size: 58.6 KB
- Stars: 3
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
GitME, the GitHub README generator.
What is GitME?
GitME is a README.md generator built with Node.js and Markdown, and you can render files using EJS, or Nunjucks.
You can get data from thedata
folder, such as making requests to an extenal API, generating random numbers, etc.There are currently two files which the demo uses to set metadata and make sample icons that you can use in your README file,
like the Node.js icon or the golang icon. You can fnd the full list of icons indata/icons.js
.How does it work?
GitME will render the README.md file, then, GitME will push the rendered README file to your repo using Node.js and GitHub actions.
How do you get started?
- Click the “Use this template” on this repo.
- Make the repo name Username/Username. For example, if your username is johndoe, then your repo would be called johndoe.
Note: If you already have a repo with your username, then rename it to something else, then repeat steps 1 and 2.- Pull the repo locally, make changes, and push them to your repo. Or, you could use the Standard built-in GitHub editor.
- Set your ENV vars. Leave the
GH_TOKEN
alone as that allows GitME to push your README file.name: gitme
on: [push]
jobs:
gitme-compile-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12.x"
- run: npm install
- run: node index.js
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Leave this alone!
REPO: username/repo # replace with your username and repo, keep the "/"
BRANCH: main # Or whatever branch you want to use
EMAIL: [email protected] # The email you use for Git Commits.
NAME: aboutDavid # Your name or usernameHow do you get data from stuff like APIs?
If you know about how 11ty and the
_data
file works, you can skip this as it is processed the same way/
- Make a file in the data folder. The name of that file (minus the
.js
) will be what you refer to it as.
For example, if you made a file calledtest.js
, what you will refer to it as in your template file would betest
. For this example, lets make ittest.js
.- Let’s export a sample object with some data:
module.exports = {
sample: "Hello World!"
};Great, we now have some data!
- Lets get it in our template. By default, GitME will render the index.md file using ejs.
In theconfig.js
, you can changerenderEngine
tonunjucks
if you want to. Here are some ways you can access the demo file:Nunjucks:
# {{ text.sample }}
EJS:
# <%= text.sample %>
Both of them would render:
Hello World!
as you can use markdown.