hello mate can this work for having an incrusted blog inside a static web page
Opened this issue · 5 comments
I want to create a box inside of a static website that is a blog poster inside of it, I also want to this be inside of a drop-down menu, I stumble upon this repo when I was looking for something like this on Google so I was wondering if I can use this tool for this purpose, I hope I have explained myself well enough and I wish you a pleasant day ahead.
PD: sorry for making an issue just for asking for help.
If you mean you want to embed a kagami blog inside of a static webpage, that's doable, I'm not sure what the usability of this would look like, I don't know if you want to put the entire blog webpage in the drop-down menu, (via <iframe>
?) or you want your drop-down menu to have the titles for every blogpost seen by kagami?
Maybe I'm just misunderstanding, but you could add javascript to your header navigation in .kagami/head.htm
to scrape the page content from the external /index.htm
you want to embed into your drop down.
Maybe you could illustrate what you want the finished result to look like?
hello so sorry for the delay, I got a link tree clone as a project here on gith hub and I thought why do not have a little blog post in the link tree for important links and articles this is the little showcase
and i want have a drop down menu like this that when i click on expands and putting down the links
so it will be like this
i do not be good explaining myself so that is why took the liberty of make this captions jajajaja,
Are you sure you're not misunderstanding the use case for kagami?
You want everything on the website accessible from the homepage without navigating to other static pages.
I actively avoided doing this statically because it adds complexity and requires duplicated effort and duplicated code rendering the same markdown in slightly different ways on different pages.
But it can be done on a static webpage with no additional changes to kagami, I thought of 3 ways to do this, but they all require some effort on your part.
- Write client-side JS to read and process the
/rss.xml
file which has a list of all blogposts with canonical links and post dates and then add the post titles to your dropdown menu, the feed is already XML format and should be easier to do than just scraping from the/index.htm
containing your blogposts. - If you want the actual full or partial content from other pages to appear on your homepage, you could just scrape them from your own site and paste the body of those pages.
- The easiest one by far is just to make that "Posts" button open up an
<iframe>
to the/index.htm
containing your blogposts.
yes is mostly sure i am misunderstanding the use case for kagami XD , i am now gonna take the path of the iframe , thanks dude, btw can you tellme the use cases of kagami?, why did you make the proyect, i have read the readme but now i am more curious about it, have in mind some others examples of kagami applications, thanks so much for your answers.
About use cases, I wanted a simple alternative to pandoc flavored markdown, but with a shell-based pre-processor not unlike C preprocessor, let kagami
just build your static site for you without being forced to customize anything, any markdown document on your site that has date metadata counts as a blogpost and is treated like one, the title comes from whatever is the first heading, you can still use inline HTML for all the stuff markdown doesn't support, which is a lot in hindsight.
What I really wanted was what make
is to compiling software, I wanted to compile my website from source documents and shell scripts, but also allow content on that site to change dynamically whenever you re-run kagami, giving you a middle-ground alternative to using client-side javascript for dynamic content without resorting to using backend languages like CGI scripts, PHP or Node.js.
I've already come into plenty of limitations using javascript, if you have your own VPS, running kagami in a cron job would step around, say... me wanting to hotlink images on someone else's website when they actively randomize URLs to stop people like me.
I don't even use a VPS, github gives me free CI/CD through actions and I can accomplish the same thing without using requiring dynamic web hosting.