Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

conf.py 1.3 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
  1. # -*- coding: utf-8 -*-
  2. import pybtex.plugin
  3. from pybtex.style.sorting import BaseSortingStyle
  4. from pybtex.style.formatting import plain
  5. project = 'Book Data Tools'
  6. copyright = '2020–2021 Boise State University'
  7. author = 'Michael D. Ekstrand'
  8. extensions = [
  9. 'myst_parser',
  10. 'sphinxcontrib.bibtex'
  11. ]
  12. myst_enable_extensions = [
  13. 'deflist',
  14. 'colon_fence'
  15. ]
  16. bibtex_bibfiles = [
  17. 'papers.bib'
  18. ]
  19. html_theme = 'furo'
  20. html_theme_options = {
  21. 'repository_url': 'https://github.com/BoiseState/bookdata-tools',
  22. 'light_css_variables': {
  23. 'font-stack': 'Lato, sans-serif',
  24. 'font-stack--monospace': 'Source Code Pro, monospace'
  25. }
  26. }
  27. html_baseurl = 'https://bookdata.piret.info'
  28. templates_path = ['_templates']
  29. class ChronoSort(BaseSortingStyle):
  30. def sorting_key(self, entry):
  31. year = entry.fields.get('year', '')
  32. month = entry.fields.get('month', '')
  33. title = entry.fields.get('title', '')
  34. return year, month, title
  35. def sort(self, entries):
  36. sorted = super().sort(entries)
  37. sorted.reverse()
  38. return sorted
  39. class ChronoStyle(plain.Style):
  40. default_sorting_style = 'chrono'
  41. pybtex.plugin.register_plugin('pybtex.style.sorting', 'chrono', ChronoSort)
  42. pybtex.plugin.register_plugin('pybtex.style.formatting', 'chrono', ChronoStyle)
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...