text-ssg
textToHTML_V2
text-ssg | textToHTML_V2 | |
---|---|---|
9 | 14 | |
2 | 0 | |
- | - | |
0.0 | 0.0 | |
over 2 years ago | over 2 years ago | |
JavaScript | JavaScript | |
MIT License | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
text-ssg
-
Lab 10 - Time to release
GitHub: @Kevan-Y Repo: https://github.com/Kevan-Y/text-ssg Thanks contributor: @irenejoeunpark @DukeManh @AndreWillomitzer
-
GitHub continuous integration basics (my experience).
For my pull request to his project text-to-ssg I tested one of his functions called getAllFiles(). I wrote an expect() function expecting the files function to throw if it does not find the file (it's not the function itself throwing, but the fs.readfile function throwing).
-
Lab 8 - Add Testing Jest
Issue: https://github.com/Kevan-Y/text-ssg/issues/26 Commit: https://github.com/Kevan-Y/text-ssg/commit/2ca3d50f599b95620c1d28782fac9af9275746b8
-
Lab 6 - Adding Docusaurus features
I decided to use a third party package to have the full markdown feature + highlight with highlight.js. Issue#24
-
Lab 5 - Refectory code and git rebase
After making all the commits for the above change. I wanted to squash into 1 commit. I first run the command git rebase -i master and pick the commit that I needed to combine together to squash and leave one commit to be pick. After saving the files I wasn't happy with the name of the commit, I run the command git commit --amend and changed the name. (b092da9)
-
Lab 3 - Merging and resolving code conflict
So I started to create a branch call issue-19 for my Issue#19 then another branch call issue-20 for my Issue#20. I checkout issue-19 and started to add my language support for HTML tag. After finishing implementing my feature 8bcd08a, I committed my changes and switched to my issue-20 branch where I have to add a support markdown horizontal line. After finishing implementing this feature 9bee88d. I found out I have to go back to my issue-19 branch and add another commit to update documentation f2608c4. The same thing for issue-20 bc7ec05. After all, was done, I checkout my master branch then merged my issue-19 branch first which I did not have any issue merged it since it was a Fast-forward merge. But when I merged my issue-20 branch I had to resolve the conflict first do a commit for resolving the conflict 7ea3f6e, this is also called a 3-way-merge. After all, this is done I pushed my master branch to remote, then closed my issue + adding a message Closed by .
-
Lab 2 - Create issue and pull requests
Duc Bui Manh has to implement his markdown feature to my code. He first created an Issue#15, then created a pull request PR#16 for his change. The way of implementing a smarter than my way using some regex. I pull his code and do some testing on my side. I found that the markdown for the link was wrong, the href contains some tags. Also, the heading was wrapped with
-
Lab 1 reviewing other student code sources
After I reviewed Eugene code, he had to review mine. I always like people to review my code and tell me what I can improve on. For me it is a way to learn how to write efficient code in the future. When Eugene testing my SSG code, even with some error checking I put in place he was still able to find some bug in my code. One of the issues Issue #1 he found was my code wasn't checking recursively for any .txt files. One of the solutions is to implement a recursive check to check if there is any .txt file in the children's directory. The second big bug Issue #5 was that the generated HTML file does not pass HMTL5 standards. I notice that for a .txt file that has a name with space, it will convert to an HTML file with name + space. The solution was to replace all space with hyphens when creating the HTML file. The same logic applies to folders too.
-
Node.js static site generator (Release 0.1.0)
Sample of file generated: https://text-ssg.vercel.app/ GitHub Repo: https://github.com/Kevan-Y/text-ssg
textToHTML_V2
-
Publishing my first npm package
As mentioned, I published a package as part of the course and the way to install it is via terminal. My tool is called textToHTML. You may type npx texttohtmlv2 in your command line. It will prompt you to install the package (say yes). Then, to see if it's working you can try the help command by typing npx texttohtmlv2 -h in the terminal. It should display a list of other things to try out.
-
GitHub continuous integration basics (my experience).
Last week in class we added automated testing to our Static Site Generators (mine is called textToHTML). This included some tests for Jest which make sure the core functionality of our programs work as expected.
-
Lab 9 - GitHub Actions Workflow
I pick Andre repo, I created an issue stating, to separate generate HTML into a function, then add test case for that function. After finishing my fix. I created a PR, I see that the workflow Andre setup is working correctly.
-
Jest: execution testing & automated setup.
Jest is a testing framework used for writing unit tests for your application. It allows you to write tests and test suite files ending in .test.js or .spec.js. In these files, you are able to test individual pieces of your application. For example, in my textToHTML SSG I have a function that processes Markdown syntax, called... processMarkdown()... I know, super creative.
-
Linting: Oxyclean for your code.
Having set up linting/formatting in my own SSG called textToHTML, commit link, I was curious what it would find.
-
DocuSaurus Adventures and SSG Inspiration
I saw how DocuSaurus handled the Markdown features, and also accessibility on their HTML templates. As such I decided for my own SSG to improve the Markdown capabilities and also add tags to each of the generated pages.
Given that we were now allowed to use an open source library to implement these features instead of coding from scratch, I chose Markdown-it.
Down to brass tacks
Implementing the changes were fairly simple, as in my original method I used a function to take the content (excluding head, meta tags, body) and process the Markdown using regexp. Instead what I did now was pass my content to the markdown function which then calls the "md.render()" method and returns that content.
var md = require('markdown-it')({ html: true, linkify: true, typographer: true }); const processMarkdown = (data) => { return md.render(data); };
Enter fullscreen mode Exit fullscreen mode -
Code Custodian: A lesson in refactoring.
In terms of the Yargs code, I made a module and required it in my main file in order to get access to "argv" value. This helped me make my main textToHTML.js file much cleaner because the setup code for Yargs was put into it's own file and textToHTML.js just handles the file logic.
-
Open Source: git remotes and merges
Links: My partner's SSG, Issue-14, Pull Request
-
My repo has branches...and their branches have branches.
This week in OSD600 we went back to contributing to our own Static Site Generators. We had to pick 2 additional features to implement. For my repository textToHTML_V2 I decided to pick:
-
My first experience with Pull Requests and merging.
Some of the pull requests on my own repository include one where my partner had to fix the name of the HTML file generated from .md inputs. Pull Request 11 . That was really the only thing I needed my partner to change because we both asked about the code we were writing along the way so the pull request merge was smooth.
What are some alternatives?
cmd-ssg - deliverable 0.1 for OSD600 open source course at seneca
GMOT-SSG - My Static Site Generator!
create-html-boilerplate - Generate a vanilla HTML/CSS boilerplate in a flash! ⚡
markdown-it - Markdown parser, done right. 100% CommonMark support, extensions, syntax plugins & high speed
OSD_SSG - Static site generation tool
qck - quick - Static Site Generator made with vanilla JS work inside CLI.
greenwood - Greenwood is your full-stack workbench for the web, focused on supporting modern web standards and development to help you create your next project.