Link exchange with friends?:
jlord / balrog Goto Github PK
View Code? Open in Web Editor NEWLearn by making presents: A Static Site Generator (WIP)
License: Other
Learn by making presents: A Static Site Generator (WIP)
License: Other
Link exchange with friends?:
I think it's fine to just keep all the orig. markdown files in the /contents dir.
Put all post metadata and content into JSON format because I think it will probably be useful for websitey things down the road.
That way we can do
$ npm run build
$ npm run server
and see the output of the stuff!
So that you can select certain files to not be parsed or templated.
Do this.
When cropping the text from the latest post, if the character it cuts on is a part of a link (and I imagine other things) it breaks stuff.
So you should check first that it's not inside of a link... complicated!
Yes.
in blog feed
Wooo!
Hi there,
We noticed that your repo has a high severity vulnerability:
Here is the test report for this repo.
If you’d like to fix this vulnerability, Snyk lets you generate a pull request that recommends the best upgrade path - there’s a link to fix this vulnerability on the test report.
Stay secure :-)
Ben from the Snyk team
Figure out how they work and implement them so that page layouts and common sections like headers and footers can be separate.
When running balrog
, HTML files are generated and written to both the outputDir and sourceDir (content/ and site/).
So the original metadata parser works by convention: it expects the headers to represent title, author, date and tags in that specific order. This is super lightweight (implementation is only ~10 lines!) and awesome if your posts always conform to that.
However, for some of my stuff I wanted some finer control over what kinda metadata I can put into the doc. To that end, I wrote balrog-meta-htmlcomment to be able to declare metadata upfront in an HTML comment. This still allows the markdown files to be displayed directly (which would have been the issue with YAML frontmatter) but gives some better control.
We need to figure out a good way to declare which style of metadata parser to use. I'm thinking a couple of things:
config.json
, like metadata: ('htmlcomment' | 'default')'
or something like that.balrog use meta-htmlcomment
. This would also install the package if necessary.I should also pull out/modularize the default parser.
Right now Balrog reads and creates the metadata from the top four lines but leaves it in the general "content" of the post. Instead, wrap it in a class so that it's easier to style.
Making doing a blog feed with pagination optional
Also make a missing pagination template mean blog feed is not paginated but shows all posts.
So everything in /content/
will be parsed, no questions. For posts, if you have /content/posts/whatevs.md
and the url might be "http://example.org/posts/whatevs.html". For something like /content/about.md
, it'd be "http://example.org/about.html". Anything else in there will be copied to /site
without modification, so this handles static assets cleanly and without extra code or config.
Build all the files into a /site
directory and have requests point to that directory as the root.
Generate an Archives Page that is a list of post meta data, sorted by date.
A clean up function that runs at the end of everything and
site/blog
markdown files, for archiving, into site/blog/markdown
site/blog/page/0.html
> site/blog/page/index.html
site/blog/page/index.html
> site/blog/index.html
assests
folder iss #14It's also possible that some of these things could be built into other processes and not done in a 'cleanup' function.
Make archive page for tags, too.
Check and fix why it's not handling them correctly.
Make 'em
Is there something funky now that I've made 0.html > index.html and moved it out of the /pages directory?
When you define the template for blog feed pages you can still say /pages/*
and it works, so somewhere in the code it probably is still setting /pages/
as the source for the blog feed. Maybe it's fiiiinnneee.
Currently pagination.js and generate-dir.js are both adding headers to each page/post... would be best to do this only once.
template has config.JSON
, documentation say config.JSON
but code look for config.json
therefor it fails on Linux. The easiest would be to change the code IMHO.
In an effort to keep the post markdown files pure, I'll need to parse the first four lines to pull out the posts metadata.
# Title
### Author
#### Date
##### the, tags
Fix pagination so that links don't try to go to a page -1 or a page that doesn't exist.
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.