<p>I've been using Hugo to build a site that I'm working on, but am having to bend over backwards to make things work in Hugo. Unfortunately there is very little documentation for adding any complexity beyond a simple blog page (for example multiple nested menus)-- it seems like basic blogs were the only use case envisioned by the developers. </p>
<p>I've seen several comments on here recommend starting from the html/template library, and that sounds great except I don't know a whole lot of go beyond "Hello, World" and that almost feels like it'd be taking ten steps back at this point. </p>
<p>To get to the point-- Working with Hugo has made me really like the idea of building a static site. I work with a guy that has a TON of experience working with big data, and we ended up developing a database to organize and then generate all the different markdown files for the site. If we do decide to move away from Hugo, how would we go about making that database usable? (To be clear, we don't want to actually put the db on a server, we just want to use it as a way to organize all the content before compiling a static site.) Sorry to have rambled on, but if anyone has any advice for me I would really appreciate it. </p>
<hr/>**评论:**<br/><br/>egonelbre: <pre><p>What kind of website do you want to create? Can you give the link to the current site? Any other site that has a similar structure? What does the DB contain?</p>
<p>It's hard to recommend anything useful without knowing anything about the project. Here's the basic principle <a href="https://play.golang.org/p/gFDz-bDtSy" rel="nofollow">https://play.golang.org/p/gFDz-bDtSy</a></p></pre>federalfarmer7: <pre><p>It's a website for our buddy's real estate company. <a href="http://www.tamborrel.com/" rel="nofollow">Here</a> is a similar example. The db contains each line of markdown that is necessary for Hugo to build it correctly. </p>
<p>So for the example site that I linked there would be a folder for the menu item "buying" that contained a markdown file for each of the links in the drop down menu. And each home under /buying/featured-listings would have its own markdown file.
So the content folder of the site would look something like this:</p>
<p>.</p>
<pre><code>|-content
|-Property Search
|-Explore
|-Buying
|-search-for-homes.md
|-featured-listings.md
|-house1.md
|-house2.md
|-Selling
|-...
</code></pre>
<p>THANK YOU for your help btw</p></pre>FIuffyRabbit: <pre><p>Why even use a database? Just put them in files and run a hugo server. Plus you can create your own layouts if you know html. </p>
<p>This isn't even a hugo problem. More of a problem of not understanding how templates work.</p></pre>mwholt: <pre><p>Are you just looking for a way to serve static files (specifically Markdown)?</p></pre>elithrar_: <pre><p>Have you tried asking on the Hugo repository/chat? Re-writing this all to achieve a nested menu seems a little crazy; Hugo can definitely achieve that. </p></pre>
这是一个分享于 的资源,其中的信息可能已经有所发展或是发生改变。
入群交流(和以上内容无关):加入Go大咖交流群,或添加微信:liuxiaoyan-s 备注:入群;或加QQ群:692541889
0 回复
- 请尽量让自己的回复能够对别人有帮助
- 支持 Markdown 格式, **粗体**、~~删除线~~、
`单行代码`
- 支持 @ 本站用户;支持表情(输入 : 提示),见 Emoji cheat sheet
- 图片支持拖拽、截图粘贴等方式上传