-
Notifications
You must be signed in to change notification settings - Fork 743
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compile md files together in one file for easy reading of TILS of each topic #58
Comments
Interesting idea, do you know if thats possible with pandoc not in Windows, and did you think about a way to add/modify the TOC links from the main readme? I just looked around and found a relevant project: |
Made a short bash script, which creates a README.md into every category folder, if you execute it in the main TIL folder. While testing, i found also a missing TIL: Better said, wrong link/filename (LOOK FOR THE MISSING F): It generates a simple TOC and then concatenates the markdown files in the order they appear in the main README.md, but it does not modify the original files:
|
awesome man, just tried your script on GitHub actions works perfectly and fast (21s). You can open a pull request and include this workflow and your script (named compile.sh for this workflow) # This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the master branch
push:
branches: [ master ]
pull_request:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# Runs a single command using the runners shell
- name: Run a one-line script
run: echo Hello, world!
# Runs a set of commands using the runners shell
- name: Run a multi-line script
run: |
echo "Compiling..."
chmod +x ./compile.sh
./compile.sh
- name: Commit and push changes
run: |
git config --global user.name "jbranchaud"
git config --global user.email <email>
git add -A
git commit -m "combine files in a single README "
git push |
@shoebham just to make it a bit more candy, you could try this version, it generates a main README with links to the category single-page:
|
I tried compiling all markdown files of every category in one file in every directory(category) locally with pandocs
I tried this in powershell
this created a compilation file like ack-compilation.md in ack folder containing combined markdown file content,
Maybe someone can automate the process for this github repo as reading TILS together for any particular category is much better than clicking links for every TIL.
This is the result
The text was updated successfully, but these errors were encountered: