GithubHelp home page GithubHelp logo

Custom page selection about docuapi HOT 4 CLOSED

eine avatar eine commented on August 17, 2024
Custom page selection

from docuapi.

Comments (4)

bep avatar bep commented on August 17, 2024 1

No, that statement is still correct.

from docuapi.

eine avatar eine commented on August 17, 2024

Thanks. It seems that I need to revisit hugo's templating/layout engine...

from docuapi.

bep avatar bep commented on August 17, 2024

A little longer explanation:

  • A template in the project with the same name in the project will always win over the theme version
  • layouts/index.html will win over layouts/_default/list.html for the home page.

So, creating either layouts/index.html or layouts/_default/list.html in your project with your custom logic will work.

from docuapi.

eine avatar eine commented on August 17, 2024

Thanks! The point is that I used hugo quite some time ago, when baseof didn't exist (I believe), sections where limited to a single level IIRC, etc. Later, I saw that it was all reworked to support more complex and nested site layouts (which was cool to have). Now, this specific theme seems to use some of the latest features: most of the logic is defined in functions (https://github.com/bep/docuapi/tree/master/layouts/partials/funcs), which I had not used; the theme itself is a go module/package that imports other go modules, which feels awkward; and, overall, it is a single page site. So, it is just much content to digest. I need to take it slowly...

FTR, I am not documenting an API, but a project composed of a CLI tool (golang) and a GitHub Action (Typescript): https://eine.github.io/issue-runner/#introduction. I took this theme because I think it is probably the best available hugo theme for docs with lots of quotes and code examples. However, I am aware that it is currently very optimized to be a single page. It will need some work to generate sections.

from docuapi.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.