Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
68 commits
Select commit Hold shift + click to select a range
beea20d
fixed disqus integration, changing to .Site.Params.DisqusShortname
mateja82 Apr 24, 2020
8bcc620
Add french translations
DanielMuller Apr 27, 2020
1389c49
Merge pull request #260 from mateja82/disqus_fix
LisaFC Apr 27, 2020
8b78635
Merge pull request #262 from DanielMuller/i18n-fr
LisaFC Apr 27, 2020
a9972c2
add Spanish template
BuhoSolido May 2, 2020
5d5e640
Merge pull request #268 from NeliumCode/master
LisaFC May 7, 2020
1b79173
Add Russian translations
vildam May 14, 2020
053672c
Merge pull request #274 from vildam/master
LisaFC May 14, 2020
88311ff
Fix a offline search issue that escaped HTML entities is shown
tekezo May 23, 2020
3c17f0f
Add offlineSearchSummaryLength to config.toml
tekezo May 23, 2020
4e0c7e8
Add offlineSearchMaxResults to config.toml
tekezo May 23, 2020
bac04df
Fix a offline search result when excerpt contains HTML entities
tekezo May 23, 2020
ef07806
Apply Prettier to offline-search.js
tekezo May 23, 2020
0176e3d
Update offline search result design
tekezo May 23, 2020
b203f77
adding Hungarian toml
ferdinandyb May 25, 2020
2c4a0a5
Merge pull request #277 from priestoferis/master
LisaFC Jun 15, 2020
f75dcb3
Merge pull request #276 from tekezo/feature/offline-search-redesign
LisaFC Jun 15, 2020
b005fbb
Merge pull request #275 from tekezo/fix/offline-search-html-entities
LisaFC Jun 15, 2020
445cdfe
remove duplicates
Jun 16, 2020
2d533ca
Configure feedback so it works for our own site!
LisaFC Jun 19, 2020
98f8f87
Merge pull request #293 from google/LisaFC-patch-1
LisaFC Jun 19, 2020
44eebab
Update jQuery to 3.5.1
coliff Jun 22, 2020
c583bd7
Merge pull request #294 from coliff/patch-1
LisaFC Jun 22, 2020
2089852
Merge pull request #289 from aboettger/patch-1
LisaFC Jun 22, 2020
b2d3cce
Remove browsers from PostCSS Config
coliff Jun 22, 2020
47c9fcf
Merge pull request #295 from coliff/patch-1
LisaFC Jun 23, 2020
a13cb01
force sidebar search to hide on desktop but show on mobile, when enabled
mgibson323 Jun 23, 2020
91fe818
fix mobile toggle menu "jump" on close
Arhell Jun 28, 2020
b0563f9
Merge pull request #300 from Arhell/fix-menu
LisaFC Jun 29, 2020
6bc7b75
addresses @LisaFC's review: https://github.com/google/docsy/pull/297#…
mgibson323 Jun 30, 2020
3b8c2c2
Addresses @LisaFC's review: https://github.com/google/docsy/pull/297#…
mgibson323 Jun 30, 2020
0996a7b
Create .editorconfig
coliff Jul 1, 2020
3587df0
Merge pull request #297 from mgibson323/master
LisaFC Jul 1, 2020
02904c3
Merge pull request #302 from coliff/patch-1
LisaFC Jul 2, 2020
0f9b3cf
Bump lodash from 4.17.15 to 4.17.19 in /userguide
dependabot[bot] Jul 17, 2020
8895718
Add Navidrome's website to the examples
deluan Jul 19, 2020
b7ac712
Merge pull request #310 from deluan/patch-1
LisaFC Jul 20, 2020
3ac2be8
Merge pull request #309 from google/dependabot/npm_and_yarn/userguide…
LisaFC Jul 20, 2020
cbe5c17
Fix to work with latest highlight styles
LisaFC Jul 21, 2020
e778e90
Add highlight params
LisaFC Jul 21, 2020
434d652
Update lookandfeel.md
LisaFC Jul 21, 2020
a29b5be
Update lookandfeel.md
LisaFC Jul 22, 2020
02bbd1d
Fix offline search typo
tekezo Jul 22, 2020
3d1400d
Merge pull request #313 from tekezo/fix/offline-search-typo
LisaFC Jul 22, 2020
2bedb2f
Merge pull request #312 from google/LisaFC-chroma
LisaFC Jul 22, 2020
ac9df05
Merge remote-tracking branch 'google/master'
ouuan Jul 28, 2020
97410c4
Fix weird color issues for code blocks inside tables etc
LisaFC Jul 28, 2020
9030b75
Merge pull request #314 from google/LisaFC-code-colour
LisaFC Jul 29, 2020
964a8f9
updating submodules for fun and profit
LisaFC Jul 30, 2020
4f4e187
Revert "updating submodules for fun and profit"
LisaFC Jul 30, 2020
f750b9d
Reverting
LisaFC Jul 30, 2020
cbff608
Old bootstrap for now
LisaFC Jul 30, 2020
cf2d130
add License Badge in README.md
atharwa-24 Jul 30, 2020
acf9e51
Updating to most recent stable Bootstrap
LisaFC Jul 31, 2020
d6e21af
Merge pull request #318 from atharwa-24/master
LisaFC Jul 31, 2020
2afa46d
update README.md
atharwa-24 Jul 31, 2020
af65281
add contributors badge count
atharwa-24 Jul 31, 2020
9be4f3f
fixed some typos
atharwa-24 Jul 31, 2020
f09755e
Add reading time to blog posts
dhenneke Aug 4, 2020
5d1c0f9
Merge pull request #322 from dhenneke/feat/blog-reading-time
LisaFC Aug 5, 2020
d21040a
Merge pull request #319 from atharwa-24/master
LisaFC Aug 10, 2020
3303577
Fix warning on bg-gradient-variant mixin
hube12 Aug 18, 2020
8ac584f
Merge pull request #328 from hube12/master
LisaFC Aug 19, 2020
a652029
Add docs.agilebase.co.uk example
okohll Aug 24, 2020
d13fdbb
add rel attribute to prevent clickjacking
lpmi-13 Aug 25, 2020
81f7abf
Merge pull request #329 from okohll/patch-1
LisaFC Aug 25, 2020
25f7336
Merge pull request #330 from lpmi-13/fix_security_issue
LisaFC Aug 25, 2020
361075b
Merge branch 'master' of github.com:google/docsy into master
ouuan Aug 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Editor configuration, see https://editorconfig.org

root = true

# All files
[*]
charset = utf-8
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
17 changes: 13 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Docsy
# Docsy

Docsy is a [Hugo](https://gohugo.io/) theme for technical documentation sets, providing simple navigation, site structure, and more.

Expand All @@ -22,12 +22,12 @@ The following are basic prerequisites for using Docsy in your site:

## Example and usage

You can find an example project that uses Docsy in the [Docsy Example Project repo](https://github.com/google/docsy-example). The Docsy Example Project is hosted at [https://example.docsy.dev/](https://example.docsy.dev/).
You can find an example project that uses Docsy in the [Docsy Example Project repo](https://github.com/google/docsy-example).The Docsy Example Project is hosted at [https://example.docsy.dev/](https://example.docsy.dev/).

To use the Docsy theme for your own site:

- (Recommended) Copy the [example project](https://github.com/google/docsy-example),
which includes the Docsy theme as a submodule.
which includes the Docsy theme as a submodule.
You can customize this pre-configured basic site into your own Docsy themed site.
[Learn more...](https://github.com/google/docsy-example)

Expand All @@ -47,4 +47,13 @@ cd docsy/userguide/
hugo server --themesDir ../..
```

Note that you need the `themesDir` flag when running Hugo because the site files are inside the theme repo.
Note: you need the `themesDir` flag when running Hugo because the site files are inside the theme repo.

## Contributing ![GitHub](https://img.shields.io/github/contributors/google/docsy)

Please read [CONTRIBUTING.md](https://github.com/google/docsy/blob/master/CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
See also the list of [contributors](https://github.com/google/docsy/graphs/contributors) who participated in this project.

## License ![GitHub](https://img.shields.io/github/license/google/docsy)

This project is licensed under the Apache License 2.0 - see the [LICENSE.md](https://github.com/google/docsy/blob/master/LICENSE) file for details
30 changes: 18 additions & 12 deletions assets/js/offline-search.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,10 @@
});
});
})
.slice(0, 10);
.slice(
0,
$targetSearchInput.data('offline-search-max-results')
);

//
// Make result html
Expand Down Expand Up @@ -143,27 +146,30 @@
);
} else {
results.forEach((r) => {
const $cardHeader = $('<div>').addClass('card-header');
const doc = resultDetails.get(r.ref);
const href =
$searchInput.data('offline-search-base-href') +
r.ref.replace(/^\//, '');

$cardHeader.append(
$('<a>').attr('href', href).text(doc.title)
const $entry = $('<div>').addClass('mt-4');

$entry.append(
$('<small>').addClass('d-block text-muted').text(r.ref)
);

const $cardBody = $('<div>').addClass('card-body');
$cardBody.append(
$('<p>')
.addClass('card-text text-muted')
.text(doc.excerpt)
$entry.append(
$('<a>')
.addClass('d-block')
.css({
fontSize: '1.2rem',
})
.attr('href', href)
.text(doc.title)
);

const $card = $('<div>').addClass('card');
$card.append($cardHeader).append($cardBody);
$entry.append($('<p>').text(doc.excerpt));

$searchResultBody.append($card);
$searchResultBody.append($entry);
});
}

Expand Down
3 changes: 2 additions & 1 deletion assets/json/offline-search-index.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{{- $.Scratch.Add "offline-search-index" slice -}}
{{- range where .Site.AllPages ".Params.exclude_search" "!=" true -}}
{{- $.Scratch.Add "offline-search-index" (dict "title" .Title "ref" .RelPermalink "body" .Plain "excerpt" (.Summary | truncate 100)) -}}
{{/* We have to apply `htmlUnescape` again after `truncate` because `truncate` applies `html.EscapeString` if the argument is not HTML. */}}
{{- $.Scratch.Add "offline-search-index" (dict "title" .Title "ref" .RelPermalink "body" (.Plain | htmlUnescape) "excerpt" (.Plain | htmlUnescape | truncate (.Site.Params.offlineSearchSummaryLength | default 70) | htmlUnescape)) -}}
{{- end -}}
{{- $.Scratch.Get "offline-search-index" | jsonify -}}
2 changes: 1 addition & 1 deletion assets/scss/_boxes.scss
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
@include link-variant("#{$parent}--#{$color-name} p > a", $link-color, $link-hover-color, false);

@if $enable-gradients {
@include bg-gradient-variant("#{$parent}--1#{$color-name}#{$parent}--gradient", $color-value);
@include bg-gradient-variant("#{$parent}--1#{$color-name}#{$parent}--gradient", $color-value,true);
}
}

Expand Down
14 changes: 5 additions & 9 deletions assets/scss/_code.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,13 @@
// Highlighted code.
.highlight {
@extend .card;
margin: 2rem 0;
padding: 1rem;
background-color: $gray-100;

pre, div {
background-color: inherit !important;
}

padding: 0;

pre {
margin: 0;
padding: 0;
padding: 1rem;
}
}

Expand Down Expand Up @@ -43,6 +38,7 @@


> code {
background-color: inherit !important;
padding: 0;
margin: 0;
font-size: 100%;
Expand Down
14 changes: 14 additions & 0 deletions assets/scss/_sidebar-tree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,11 @@
padding: 0 0 1rem;
}
}

& > .td-sidebar-nav__section {
padding-top: .5rem;
padding-left: 1.5rem;
}
}

.td-sidebar {
Expand Down Expand Up @@ -129,4 +134,13 @@
width: 100%;
}
}

#content-desktop {display: block;}
#content-mobile {display: none;}

@include media-breakpoint-down(md) {

#content-desktop {display: none;}
#content-mobile {display: block;}
}
}
2 changes: 1 addition & 1 deletion assets/scss/support/_mixins.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Some simple mixins.

@mixin bg-gradient-variant($parent, $color) {
@mixin bg-gradient-variant($parent, $color,$ignore-warning: false) {
#{$parent} {
background: $color linear-gradient(180deg, mix($body-bg, $color, 15%), $color) repeat-x !important;
}
Expand Down
2 changes: 1 addition & 1 deletion assets/vendor/Font-Awesome
Submodule Font-Awesome updated 538 files
2 changes: 1 addition & 1 deletion assets/vendor/bootstrap
Submodule bootstrap updated 524 files
43 changes: 43 additions & 0 deletions i18n/es.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@


# UI strings. Botones y similares.

[ui_pager_prev]
other = "Previo"

[ui_pager_next]
other = "Siguiente"

[ui_read_more]
other = "Contiuar leyendo"

[ui_search]
other = "Buscar"

# Used in sentences such as "Posted in News"
[ui_in]
other = "en"

# Footer text
[footer_all_rights_reserved]
other = "Derechos reservados"

[footer_privacy_policy]
other = "Política de privacidad"


# Post (blog, articles etc.)
[post_byline_by]
other = "Por"
[post_created]
other = "Creado"
[post_last_mod]
other = "Última modificación"
[post_edit_this]
other = "Editar esta página"
[post_create_issue]
other = "Notificar una incidencia con la documentanción"
[post_create_project_issue]
other = "Notificar una incidencia en un proyecto"
[post_posts_in]
other = "Añadir entrada"
43 changes: 43 additions & 0 deletions i18n/fr.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@


# UI strings. Buttons and similar.

[ui_pager_prev]
other = "Précédent"

[ui_pager_next]
other = "Suivant"

[ui_read_more]
other = "Lire plus"

[ui_search]
other = "Rechercher ce site…"

# Used in sentences such as "Posted in News"
[ui_in]
other = "dans"

# Footer text
[footer_all_rights_reserved]
other = "Tous droits résérvés"

[footer_privacy_policy]
other = "Politique de confidentialité"


# Post (blog, articles etc.)
[post_byline_by]
other = "Par"
[post_created]
other = "Crée"
[post_last_mod]
other = "Dernière modification"
[post_edit_this]
other = "Modifier cette page"
[post_create_issue]
other = "Créer un problème dans la documentation"
[post_create_project_issue]
other = "Créer un problème dans le projet"
[post_posts_in]
other = "Messages dans"
47 changes: 47 additions & 0 deletions i18n/hu.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@


# UI strings. Buttons and similar.

[ui_pager_prev]
other = "Előző"

[ui_pager_next]
other = "Következő"

[ui_read_more]
other = "További olvasnivaló"

[ui_search]
other = "Keresés ezen az oldalon…"

# Used in sentences such as "Posted in News"
# TODO: this structure will not work in Hungarian
# so I left it as is
[ui_in]
other = "in"

# Footer text
[footer_all_rights_reserved]
other = "Minden jog fenntartva"

[footer_privacy_policy]
other = "Adatvédelmi szabályzat"


# Post (blog, articles etc.)
[post_byline_by]
other = "Készítette"
[post_created]
other = "Elkészítve"
[post_last_mod]
other = "Utolsó módosítás"
[post_edit_this]
other = "Oldal szerkesztése"
[post_create_issue]
other = "Dokumentáció issue létrehozása"
[post_create_project_issue]
other = "Projekt issue létrehozása"
# TODO: this structure will not work in Hungarian
# so I left it as is
[post_posts_in]
other = "Posts in"
43 changes: 43 additions & 0 deletions i18n/ru.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@


# UI strings. Buttons and similar.

[ui_pager_prev]
other = "Предыдущая"

[ui_pager_next]
other = "Следующая"

[ui_read_more]
other = "Подробнее"

[ui_search]
other = "Поиск по сайту…"

# Used in sentences such as "Posted in News"
[ui_in]
other = "в"

# Footer text
[footer_all_rights_reserved]
other = "Все права защищены"

[footer_privacy_policy]
other = "Политика конфиденциальности"


# Post (blog, articles etc.)
[post_byline_by]
other = "Автор"
[post_created]
other = "Создано"
[post_last_mod]
other = "Изменено"
[post_edit_this]
other = "Отредактировать страницу"
[post_create_issue]
other = "Предложить изменения документации"
[post_create_project_issue]
other = "Предложить доработки по проекту"
[post_posts_in]
other = "Публикации в"
2 changes: 1 addition & 1 deletion layouts/_default/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>{{ .Title }}</h1>
{{ partial "feedback.html" .Site.Params.ui.feedback }}
<br />
{{ end }}
{{ if (.Site.DisqusShortname) }}
{{ if (.Site.Params.DisqusShortname) }}
<br />
{{ partial "disqus-comment.html" . }}
{{ end }}
Expand Down
5 changes: 4 additions & 1 deletion layouts/blog/content.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ <h1>{{ .Title }}</h1>
{{ with .Params.author }}{{ T "post_byline_by" }} <b>{{ . | markdownify }}</b> |{{ end}}
<time datetime="{{ $.Date.Format "2006-01-02" }}" class="text-muted">{{ $.Date.Format $.Site.Params.time_format_blog }}</time>
</div>
{{ if (and (not .Params.hide_readingtime) (.Site.Params.ui.readingtime.enable)) }}
{{ partial "reading-time.html" . }}
{{ end }}
{{ .Content }}
{{ if (.Site.DisqusShortname) }}
{{ if (.Site.Params.DisqusShortname) }}
<br />
{{ partial "disqus-comment.html" . }}
<br />
Expand Down
Loading