neilan99 / nan1-ssg Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
I believe it is best practice to add the node_modules to a .gitignore file (so that it doesn't get committed in git).
I think the main 2 reasons for this are:
The plan is to swap out the current implementation of markdown support to a fully supported version from an open source library.
See this line:
Line 14 in 7c85792
Instead use version from package.json (ex const { version } = require(β./package.jsonβ);)
Add a lang attribute to the root HTML element, which indicates the language for the HTML to use.
All the .js files should be in a separate src folder. Testing files should also be in their own folder. File names are preferred as lower case (generate-html.js vs generateHTML.js).
Use the markdown support found in this library: showdown
I believe for this project, we are required to be able to run the command without explicitly using "node" before the command.
ie:
main -i hello.txt
instead of
node main -i hello.txt
Line 156 in 46e9603
In generateHTML.js Lines 156 and 157 are essentially the same variable, I think you should remove one for brevity.
The same goes for Line 163 and Line 164.
I'd like to work on this to add support for converting .md to .html files, and also add the ability to parse bolded text.
The current colour contrast from foreground to background makes the text hard to read. Also, the text should be left aligned instead of centre aligned.
Whenever ---
appears in a markdown file, it should be translated to an <hr> tag in HTML.
Instead of having users specify all of the SSG options as command line arguments, they should be able to pass in a JSON formatted configuration file containing all options.
Ex:
nan1-ssg --config ./ssg-config.json
Example config
file:
{
"input": "./site",
"output": "./build",
"stylesheet": "https://cdn.jsdelivr.net/npm/water.css@2/out/water.css",
"lang": "fr"
}
Hello, I would like to commit a new test here
currently the program doesn't allow you to specify a folder containing text files other than the one where the program resides
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.